Skip to main content
GET
Stream session events as Server-Sent Events

Authorizations

Authorization
string
header
required

A Recursion API key, created in the console under API keys.

Headers

Last-Event-ID
string<uuid>

Exclusive lowercase canonical UUID event cursor used when after_event_id is absent. Malformed selected cursors return 400.

Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Path Parameters

session_id
string<uuid>
required

Session id (UUID) whose events are streamed.

Query Parameters

after_event_id
string

Exclusive lowercase canonical UUID event cursor. Takes precedence over Last-Event-ID. Clients that set this query parameter must replace it with their latest event id, or remove it to use Last-Event-ID, on every reconnect. Malformed selected cursors return 400.

types
string

Comma-separated managed event type filter.

hydrate
enum<string>

Opt in to inline image hydration. Event payload hydration is independent and enabled by default.

Available options:
images
image_urls
enum<string>

Set to signed to add a short-lived url (and url_expires_at) to stored image blocks within the per-read signing budget. Omitted when signing is unavailable or the budget is exhausted; the authenticated getSessionImage endpoint always works.

Available options:
signed
payloads
enum<string>

Set refs to stream external event stubs without resolving payload JSON.

Available options:
refs

Response

One JSON payload from the managed session event stream. Durable timeline events include their reconnectable id and raw event; synthetic lifecycle and error events carry only the applicable compatibility fields.

One JSON payload from the managed session event stream. Durable timeline events include their reconnectable id and raw event; synthetic lifecycle and error events carry only the applicable compatibility fields.

type
string
required

Managed event type emitted in both the SSE event field and this JSON payload.

anchor_event_id
string

Durable event id this event is anchored to, when supplied by event metadata.

content
object[]

Content blocks projected from the durable source event.

error
object

Public failure details for a failed event or session, or reconnect guidance after a stream read error.

id
string

Durable source event id used as the SSE id and reconnect cursor. Omitted for synthetic status and error events.

processed_at
string

RFC 3339 timestamp when the durable event was created or the synthetic status event was projected.

raw_event
object

Unmodified durable event backing this compatibility projection. Omitted for synthetic status and error events.

Example:
session_id
string

Session id associated with the event.

session_thread_id
string

Thread id associated with the durable source event.

stop_reason
any

Completion, execution, or session-status reason. Durable events use their string stop reason; synthetic status events use an object with a type field.

usage
object

Model token usage projected from the durable source event.

Example: