For a complete guide on handling responses, see the Chat Overview.Prefer real-time bidirectional communication? Use the WebSocket endpoint instead.
Bearer token obtained from the authenticate endpoint.
Set to
text/event-stream to receive SSE responses.The natural language message to send.
ID of an existing chat to continue the conversation. Omit to create a new chat.
ID of the database integration to query. Required for database queries.
Custom title for new chats. If omitted, a title is generated automatically.
AI model to use for this message. If omitted, the default model is used. See List Models for available values.
Response
The response is a stream of Server-Sent Events. See Chat Overview for details on handling the stream.Event types
| Event | Data | Description |
|---|---|---|
chat_metadata | {"id": "chat_...", "user_message_id": "msg_..."} | Chat ID and persisted user message ID. Emitted at the start of every response. |
processing | {"status": "thinking"} | AI is processing the request |
visualization | Full chart or table payload | A chart or table was generated. See Visualizations. |
message | {"content": "...", "id": "msg_..."} | The final response |
error | {"error": "..."} | An error occurred |