Run batch (fan-out)
run_batchRun many jobs at once with a concurrency limit and an optional total price limit. Returns a batch_id immediately; each job has its own result, failed jobs do not stop the others. Jobs can depend on other jobs of the batch (depends_on, inputs.from_index).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"jobs": "<jobs>"
},
"name": "run_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| jobs | Yes | Jobs (1–1000). Each takes the same fields as run_job, plus depends_on (indexes of jobs in this batch). | |
| name | No | Optional name of the batch. | |
| defaults | No | Fields applied to every job unless the job sets them (e.g. template, timeout_s, artifacts). | |
| webhook_url | No | Optional public https:// URL that gets a signed POST (batch.finished) when all jobs ended. | |
| max_total_cost | No | Optional price limit for the whole batch in your account's billing currency, e.g. "2.00". Refused if the worst case could exceed it. | |
| idempotency_key | No | Optional: the same key returns the same batch (safe to retry this call). | |
| max_concurrency | No | How many jobs of the batch may run at the same time (default 10). | |
| max_total_cost_eur | No | Optional price limit for the whole batch in EUR – only for accounts billed in EUR; prefer max_total_cost. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| job_ids | Yes | IDs of the jobs in the batch, in order. | |
| batch_id | Yes | Batch ID (bat_…). | |
| currency | No | Currency of max_cost. | |
| max_cost | No | Worst-case cost of the batch (empty if unknown). |