Перейти к содержимому
ChatVendor ChatVendor

Messenger API

Всё, что панель умеет с подключённым аккаунтом Telegram, WhatsApp или Instagram, — через REST: один ключ, один формат ответа, по разделам.

AI

Чат и анализ медиа с вашим ключом провайдера.

AI-запросы идут через подключённый вами ключ провайдера (OpenAI, Anthropic, Gemini, …); в тариф они не входят.

Base URL: https://chatvendor.net/api/v1 · каждый ответ {"success": true, "data": …}

POST /channels/{id}/ai/analyze AI analysis of a message photo/file

Право: ai:use

Параметры

idpath · integerобязательно

Channel id (from GET /channels)

Тело запроса (application/json)

peerstringобязательно
message_idintegerобязательно
promptstring
provider_idinteger
json_schemaobject

Ответ 200 · Analysis

id integertext stringjson object|nullurl string

curl -X POST https://chatvendor.net/api/v1/channels/1/ai/analyze \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"peer":"…","message_id":1}'
POST /ai/chat Chat completion with your own provider key

Право: ai:use

Тело запроса (application/json)

messagesobject[]обязательно
messages[].rolestring
messages[].contentstring
systemstring
provider_idinteger
max_tokensinteger

Ответ 200 · AiReply

text stringmodel stringusage object

curl -X POST https://chatvendor.net/api/v1/ai/chat \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"
  -H "Content-Type: application/json" \
  -d '{"messages":[]}'
GET /ai/providers Your AI providers

Право: ai:use

Ответ 200 · AiProvider[]

id integername stringtype stringmodel stringis_default boolean

curl https://chatvendor.net/api/v1/ai/providers \
  -H "Authorization: Bearer cv_live_xxxxxxxxxxxx"