Skip to main content
Set "stream": true on Query or Send Message to receive the response as a text/event-stream of named Server-Sent Events.
cURL

Events

Each SSE frame carries an event name and a JSON data payload.

status

Progress updates while the answer is being researched.

delta

Incremental answer text. Concatenate text values in order to build the running answer.

complete

Terminal event with the final answer and citations. For session messages it also carries the stored message id and session_id.

error

Terminal event when generation fails mid-stream.

Keepalives

During long retrieval steps the stream emits SSE comment lines (: keepalive). Standards-compliant SSE parsers discard comments automatically; no handling is needed.

Consuming the stream

The final delta-accumulated text may differ slightly from the complete event’s answer (the complete answer is authoritative). Always end on complete or error; if the connection drops earlier, the partial assistant message is stored with status: "partial" and can be fetched via Get Messages.