Stream session events
The same log as a live tail, framed as server-sent events: one event per row, id the seq, event the wire type, and data the same SessionEventBody the paged read renders.
The stream stays open across idle stretches – a keep-alive comment holds the connection while nothing happens – so one connection spans a session’s whole life rather than a single run. With no position named it starts at the live head, fixed before the response begins; a client that wants history pages the events route newest-first and deduplicates on seq against what the tail delivers.
With deltas=true the stream also carries delta frames: a model’s output as it is produced, one SessionDeltaBody each, with no id. Deltas are never stored and may be lost; each previews one target until the event that ends it lands – for a model call, the message_assistant with the same model_call_id – or a discard frame says it never will. A reader joining mid-target first receives the frames that target sent so far.
/v1/sessions/{session_id}/events/streamAuthorizationBearer token · headerrequiredsession_idstring<uuid>requiredafter_seqinteger<int64>deltasbooleanLast-Event-IDinteger<int64>created_atstring<date-time>requiredseqinteger<int64>requireddeltaDeltaBodyrequiredShow propertiesHide properties
dataobjectrequiredShow propertiesHide properties
partsDeltaPartBody[]requiredShow propertiesHide properties
DeltaPartBodydataobjectrequiredShow propertiesHide properties
indexinteger<int32>requiredtextstringrequiredtypestringrequiredtextdataobjectrequiredShow propertiesHide properties
indexinteger<int32>requiredthinkingstringrequiredtypestringrequiredthinkingdataobjectrequiredShow propertiesHide properties
argumentsstringrequiredidstringrequiredindexinteger<int32>requirednamestringrequiredtypestringrequiredtool_calltypestringrequiredappendtypestringrequireddiscardninteger<int32>requiredrun_idstringrequiredtargetDeltaTargetBodyrequiredShow propertiesHide properties
dataobjectrequiredShow propertiesHide properties
model_call_idstringrequiredtypestringrequiredmodel_callerrorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredunauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequirederrorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredunauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequirederrorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredunauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequirederrorErrorDetailrequiredShow propertiesHide properties
codeErrorCoderequiredunauthorizedforbiddennot_foundinvalid_requestconflictclient_outdatedprecondition_failedtoo_many_requestsinternalmessagestringrequired