Runs

Stream a run's events

GET
/api/v1/orchestrations/runs/{run_id}/events/stream

The same events as a stream: everything after after (or the Last-Event-ID header), then the run followed live. Each frame carries an id: line, so a client that drops can reconnect from the last one it saw. stream_complete ends the stream once the run has ended. Open it at any point in a run's life, as often as you like — it does not affect the run. Read it with fetch and the Authorization header; a key in the URL is a 401.

apiKey
headerAuthorizationBearer <token>

An API key, sk-syn- and 32 characters. On SynapseOrch Cloud an owner or admin makes it under Settings → Developer; on a self-hosted install, under Settings → API Keys.

run_id*string

The run.

after?string

Start after this event id; 0 (the default) is from the start.

Lengthlength <= 64
Default"0"
Last-Event-ID?|

The last event id you saw, to pick up where a dropped connection left off.

Response Body

A stream of server-sent events.

response?stringtext/event-stream
curl -X GET "https://api.synapseorch.com/api/v1/orchestrations/runs/run_01a10a1553d57036bae3d17421a4ba16/events/stream" \  -H "Authorization: Bearer sk-syn-..."
id: 1data: {"type": "orchestration_start", "run_id": "run_orch_k3j9x2a_1734567890123_4f2a9c"}id: 2data: {"type": "step_start", "orch_step_id": "step_research", "step_name": "Research", "step_type": "agent"}id: 42data: {"type": "orchestration_complete", "run_id": "run_orch_k3j9x2a_1734567890123_4f2a9c", "status": "completed"}data: {"type": "stream_complete"}