Streaming

Stream structured JSON objects via SSE

Streams partial JSON objects as they're generated using Server-Sent Events (SSE). Provides real-time streaming of structured data with partial object parsing. Event types: session (session ID), partial-object (partial JSON with parsed object), object (final validated object), result (final usage stats), error (errors), done (stream complete).

post/stream-object

Request body

systemstring
promptstring required
sessionIdstring
modelstring
allowedToolsstring[]

Response

SSE stream with real-time partial JSON objects

Changes

Changed in 4 of the 7 revisions of this API.122