GET /api/v1/cloud/sessions/{session_id}/events/stream
Streams public Session events as Server-Sent Events.
If the Session was created with incremental_streaming_enabled: true, this stream also emits incremental agent events such as agent.message_start, agent.content_block_delta, and agent.message_stop. There is no request parameter to turn incremental events on or off per stream connection; use the Session creation field.
Path parameters
| Parameter | Type | Description |
|---|---|---|
session_id | string | Session ID with the sess_ prefix |
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer $QODER_PAT |
Accept | No | Use text/event-stream |
Last-Event-ID | No | If provided, the stream resumes after the specified event ID. Returns 400 if the event ID does not exist, has been archived, or refers to a non-public internal event. |
Example request
Stream format
Each event is emitted with standard SSE fields:: heartbeat comment lines periodically to keep the connection alive.
Incremental events
Incremental events are normal SSE messages: the SSEevent: field and the JSON data.type field both contain the public event type.
agent.message_start, agent.content_block_start, agent.content_block_delta, agent.content_block_stop, agent.message_delta, and agent.message_stop. Delta names such as text_delta, thinking_delta, and input_json_delta appear inside agent.content_block_delta.delta.type; they are not top-level event types. See Session schemas.
Errors
| HTTP | Type | Trigger |
|---|---|---|
| 400 | invalid_request_error | Last-Event-ID does not identify a valid public event in this session (the event does not exist, has been archived, or is a non-public internal event) |
| 401 | authentication_error | PAT invalid or expired |
| 404 | not_found_error | Session does not exist |
Example: 404 Session not found
Related
Session event stream
Stream agent thinking, messages, tool calls, and status over SSE.