Runs
Introduction
A run is a workflow execution that contains one or more tasks. Runs let you chain tasks together, run them in parallel, or add conditional logic — all in a single API call.
Every task belongs to a run. When you use POST /tasks to create a single task, a run is automatically created behind the scenes.
Creating a run
Create a run by sending a POST request to /runs with a tasks array:
This run will ingest the video, then create a 720p version, transcribe it, and generate a summary — all as part of a single workflow.
Run object
Run statuses
Runs use the same status values as tasks:
| Status | Description |
|---|---|
waiting | Run has been created |
validating | Inputs are being validated |
queued | Run is queued for processing |
processing | Tasks are being processed |
finishing | All tasks are wrapping up |
succeeded | All tasks completed successfully |
failed | One or more tasks failed |
cancelled | Run was cancelled |
Sequential tasks with next
Use the next field to chain tasks sequentially. Tasks in next run after the parent task completes:
In this example:
- The video is ingested first
- Then a 720p version is created and speech transcription runs in parallel
- After the 720p video is created, a thumbnail is extracted from it
Conditional tasks
Add conditions to control which tasks run based on the input file properties:
Here, summary runs for all files, but subtitles and chapters only run when the ingested file is a video.
Retrieving runs
Get a single run
Returns the run object with its tasks array.
List runs
Supports cursor-based pagination with after, before, and limit parameters. Filter by status and control ordering with order (asc or desc).
Runs vs Tasks
POST /tasks | POST /runs | |
|---|---|---|
| Use case | Single operation on one file | Multi-step workflows |
| Input | url + kind | tasks array with next chains |
| Ingest | Automatic | Explicit (include ingest task) |
| Conditions | Not available | Use conditions kind |
| Chaining | Not available | Use next field |