Trigger a task run
Triggers a new run on an existing task. The run is queued and processed asynchronously. Poll GET /v2/task-runs/{run_id} until the run reaches a terminal status (completed, failed, or cancelled).
Payload Requirements
- Fields must match the task's type; sending inapplicable fields returns 400.
- For TEMPLATE_EVALUATION / CODE_EVALUATION tasks, all trigger fields are optional — an empty body uses server defaults.
- For RUN_EXPERIMENT tasks, experiment_name is required.
For RUN_EXPERIMENT tasks
Supply experiment_name (required) plus any of the optional per-run fields: dataset_version_id, example_ids (exclusive with max_examples), max_examples, tracing_metadata, evaluation_task_ids.
The fields data_start_time, data_end_time, max_spans, override_evaluations, and experiment_ids are not applicable and will return 400 if supplied.
The response includes experiment_id once the experiment is provisioned.
For TEMPLATE_EVALUATION / CODE_EVALUATION tasks
Supply data_start_time, data_end_time, max_spans, override_evaluations, and/or experiment_ids as needed. RUN_EXPERIMENT-specific fields are not applicable for these task types.
Valid example (trigger a run_experiment run)
{
"experiment_name": "GPT-4o Baseline v2",
"max_examples": 50
}
Invalid example (run_experiment trigger missing required experiment_name)
{
"max_examples": 50
}
<Note>This endpoint is in beta, read more here.</Note>
Path parameters
A universally unique identifier (base64-encoded opaque string).
The unique task identifier (base64)
Request body
Response
Returns a single task run object