Overview
The/invoke/stdout
endpoint supports parallel execution, allowing you to run multiple coding tasks concurrently for faster development workflows. Each task runs independently, and you can track its output in real-time.
Request Structure
To run tasks in parallel, provide aparallel_tasks
array in your request to the /invoke/stdout
endpoint. See the Quickstart for details on authentication and other request parameters.
Task Configuration
Each object in theparallel_tasks
array requires the following fields:
Field | Type | Required | Description |
---|---|---|---|
prompt | string | ✅ | The prompt/query for this task. |
task_name | string | ✅ | A unique identifier for the task. |
Example
This example runs two tasks in parallel. The stream will contain interleavedcustom
events from each task, identified by task_name
.
Response Stream
The API returns a stream of Server-Sent Events (SSE). You can distinguish between outputs from different parallel tasks by checking thetask_name
in the data
payload of custom
events.
Example custom
event from the “testing” task: