Send a message
https://api.chat-data.com/ api/ v2/ chat/ chatSend messages to a chatbot and receive a response. The API supports both streaming and non-streaming modes, as well as OpenAI-compatible response formats.
When stream is set to true, the response is a stream of text chunks that should be consumed with a
ReadableStream reader and TextDecoder.
When openAIFormat is set to true, responses match OpenAI's /chat/completions API format. For streaming
responses, this means Server-Sent Events (SSE) in OpenAI's chunk format. If the request fails after the stream has started, it ends with HTTP 200 and no data: [DONE].
When skipCache is set to true, the response cache is bypassed and the LLM is invoked even if a cached response
exists for the same messages array. This is useful for regenerating answers. Credits, rate limits, AI actions, and the chat webhook
all behave identically to a normal send — its payload for a skipCache: true request includes
regenerate: true. The persisted conversation's trailing assistant message (if any) is replaced by the new response.
Request body
Sending 2 of 10 fieldsmessagesarray of objectuser or assistant, and the last message must not be empty.chatbotIdstringOnly these fields are sent (application/json).