Stream realtime events (SSE)

Establishes a unidirectional event stream. The server sends events as lines
formatted per the SSE spec. Clients should set Accept: text/event-stream
and keep the connection open.

The server sends a task.completed event whenever a requested task run reaches
any terminal state (completed, failed, or canceled).
The status field of the payload indicates which state was reached.

The server automatically closes the stream in the following cases:

  • All requested task runs have reached a terminal state.
  • The stream has not sent any events for 30 minutes.

For tasks with a timeout higher than 30 minutes, waiting clients should fall back
to polling with the Retrieve task run
endpoint.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
taskRunIds
array of strings
required

Filter to a subset of task run IDs.

taskRunIds*
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Bearer
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/event-stream
application/json