Stream Events
Stream Events within the workspace of your API key.
Call Create session first and replace the example session ID with its returned ID.
/anthropic/v1/sessions/{session_id}/events/stream◐ PartialOfficial Claude documentation ↗
Request parameters
session_idstring必填path: Session ID (path or query parameter).
event_deltasarray可选query: When set, the connection also receives streaming delta events.
Returns
200
Keep the SSE connection open and send a message in another request after replacing sesn_123. Stopping the stream disconnects the subscription, not the agent. SDK 0.124.0 filters session.usage; read history for full usage. Pass event_deltas[]=agent.message to receive incremental text previews before the final event; as in the official API, agent.thinking previews are start-only.
Errors follow the Claude Managed Agents format — see error codes
Response
HTTP 200
Server-sent events
text/event-stream — chunk / event object
No field schema is declared.