Send a message
Send a message to get an AI-powered response. Omit conversation_id to
start a new conversation, or provide one to continue an existing conversation.
A conversation keeps the same conversation_id on every turn. A conversation runs
one message at a time, so sending while it is processing returns 409.
Returns 202 Accepted immediately. The AI processes in the background.
Poll GET /v0/chat/{conversation_id} until status is completed.
With stream: true, returns 200 with server-sent events instead:
message.started: same body as the202.tool_call.started: the agent started a tool, such as a knowledge base search (ToolCall).tool_call.completed: that tool finished, with what it found inrefs(ToolCall).message.completed: the answer (ChatStreamCompleted). The stream then ends.message.failed: anError. The stream then ends.
Comment lines (: keep-alive) are sent every 15 seconds and can be ignored. If the
connection drops, the answer is still saved; read it with GET /v0/chat/{conversation_id}.
Retrying a streamed request with the same Idempotency-Key returns the 202 body.
Authorizations
Headers
Body
Response
Server-sent events, when stream is true.
The response is of type string.