Render a batch (spends credits)
run_batchRenders a batch: every pending job is queued, and the call returns once they are queued. Images render in the background; track them with get_batch and collect them with get_batch_outputs. It spends the workspace organization's credits for the pending jobs: create_batch's creditCost, unless jobs were added or removed since. When the balance is too low nothing is queued, the error says not enough credits, and the batch stays a draft. A successful run publishes the draft; update_batch can still add, change or remove its pending jobs. An archived batch returns an error, and a batch with a pending job on a deleted template returns Template not found and queues nothing. Jobs reset to pending by update_batch or update_job render on the next call. If the workspace has webhook endpoints, they receive the results unless webhooks is false. Run it only after the user agrees to the cost; check rows first with validate_batch. Needs batches:create on the connection and renders:create in the user's workspace role.
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": {
"batchId": "<batchId>"
},
"name": "run_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| batchId | Yes | Batch ID returned by create_batch or list_batches | |
| webhooks | No | Whether this run sends its results (batch.completed, job.completed) to the workspace's webhook endpoints. Omit to keep the batch's setting, which is on; pass false only when the user asks not to notify their endpoints |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| failed | Yes | Jobs that could not be queued | |
| message | Yes | ||
| dispatched | Yes | Pending jobs queued by this call; 0 on a repeat call |