Chat
Stream an AI chat response
Submits a message to the AI chat service and receives a Server-Sent Events (SSE) response. Events are emitted in the order shown below as processing progresses.
Each event uses the following wire format:
Events
Event | Repeats | Data shape |
|---|---|---|
| Yes | See below |
| Yes | See below |
| Yes |
|
| Once | See below |
| Once | See below |
| Once |
|
tool_call
Emitted before each tool is invoked. The tool field identifies which tool was called.
| Extra fields |
|---|---|
|
|
|
|
tool_result
Emitted after each tool completes.
| Extra fields |
|---|---|
|
|
|
|
Complete
Field | Type | Description |
|---|---|---|
| string (UUIDv4) | ID of the conversation. |
| string | The complete AI response. |
| array \| absent | Contextual content references used to generate the response. One entry per content type, best match by distance. |
| string | Vector store ID of the resource. |
| number | Semantic distance score. Lower is a closer match. |
| string | Human-readable name. |
| string | Short description. |
| string | Content type (e.g. |
| string | URL slug. |
qa_score
Emitted after complete. Does not block the client.
Field | Type | Description |
|---|---|---|
| integer (1–10) | Composite quality score. |
| integer (1–4) | How directly the response addresses the question. |
| integer (1–3) | Coverage of key points. |
| integer (1–3) | Clarity and structure of the response. |
| string | One-sentence explanation of the score. |
Request parameters
Responses
Retrieve a chat conversation
Returns the full message history for a given conversation, with user messages and AI responses interleaved in chronological order.