This feature is currently in beta and requires the parallel-beta: events-sse-2025-07-24 header when using the Task API.

Overview

Task Runs support Server-Sent Events (SSE) at the run level, allowing you to receive real-time updates on ongoing research conducted by our processors during execution. For streaming events related to Task Groups, see the streaming endpoints on the Task Group API. Task Group events provide aggregate updates at the group level, while Task Run events represent updates for individual task runs. For a more comprehensive list of differences, see here.

Enabling Events Streaming

To enable periodic event publishing for a task run, set the enable_events flag to true when creating the task run. If not specified, events may still be available, but frequent updates are not guaranteed. Create a Task Run with events aggregation enabled explicitly:
curl -X POST "https://api.parallel.ai/v1/tasks/runs" \
  -H "x-api-key: YOUR_API_KEY" \
  -H 'content-type: application/json' \
  -H "parallel-beta: events-sse-2025-07-24" \
  --data '{
  "input": "What is the latest in AI research?",
  "processor": "lite",
  "enable_events": true
}'
To access the event stream for a specific run, use the /v1beta/tasks/runs/{run_id}/events endpoint:
curl -X GET "https://api.parallel.ai/v1beta/tasks/runs/trun_6eb64c73e4324b15af2a351bef6d0190/events" \
  -H "x-api-key: YOUR_API_KEY" \
  -H 'content-type: text/event-stream'
Notes:
  • All Task API processors starting from pro and above have event streaming enabled by default.
  • Event streams remain open for 570 seconds. After this period, the stream is closed.

Supported Events

Currently, four types of events are supported:
  • Progress Statistics Events: Provide updates on the number of sources considered and other aggregate statistics at a given point in time.
  • Message Events: Communicate reasoning at various stages of task run execution.
  • Run Status Events: Indicate the status of the run. These are also sent every 10 seconds.
  • Error Events: Report errors that occur during execution.
Additional Notes:
  • Event streams always start and end with status events.
  • Events are not sequenced, and the stream is not resumable. If you disconnect and reconnect, a status event will be sent first, and any subsequent progress statistics event will represent the point-in-time aggregate state.

Differences Between Task Group Events and Task Run Events

Currently, the events returned by Task Groups is not a strict superset of events returned by Task Runs. See the list of differences below:
Task Run EventsTask Group Events
PurposeEvents for a single Task Run.Events for an entire Task Group.
Run-level eventsProgress updates, messages, status changes.Only run status changes.
Resumable streamsNoYes, using event_id.
Events supportedProgress updates, messages, status changes for an individual run.Group status and run terminations.