create a batch of generations
batches_createSubmit many independent lipsync generations as one queued batch for large runs, such as localizing one video into many languages or syncing many videos to their own audio.
Instructions
Submit many independent lipsync generations at once as one Sync batch, such as localizing one campaign video into many languages or syncing many videos to their own audio. Each item is one /v2/generate body; Sync queues them, so they skip the per-generation concurrency limit, and results can take up to a day. Batch is a separate queued pipeline, built for large runs (20 to 500) on Scale plans and above that can wait hours; below Scale every row still takes a concurrent generation slot. For 2 or more independent jobs that should start now, on any plan, use jobs_create-many when available; when one result feeds the next, call lipsync_create or dubbing_create per video. Call with dryRun: true first to have the API check every item without creating anything. This is a paid action: every item is billed as its own generation. Before creating, estimate a representative item with generations_estimate-cost, tell the user the item count and the estimated total, and wait for their confirmation. Not idempotent: each call creates a new batch, so after an uncertain response check batches_list before creating again. Leave payload.projectId out for new work; a payload with projectId needs projectIntent=explicit, which only an explicit user selection or a project just created for this request allows. Batch may not be on every plan: a 402 names requiredPlan and billingUrl. Returns the batch id and each item's requestId; then call batches_get with wait: true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | The generations, in order; at least 20. Plans allow up to 500 per batch by default, and the whole batch must fit in 5 MB as JSONL. | |
| dryRun | No | Validate every item with the API without creating the batch or spending anything; answers status VALIDATED. | |
| webhookUrl | No | URL Sync POSTs the batch to when it finishes, signed with the organization webhook secret. | |
| projectIntent | No | Required when any payload sets projectId. Set only when the user explicitly chose that project, or it is the project just created for this request; never infer it from a matching name or an open editor. | |
| organizationId | No | Run only this call in another of the user’s Sync organizations, by id from organizations_list, when the user asks for it (for example “generate this in the Acme org”). The session keeps its organization; reads of the ids this call returns stay in this organization. Omit to use the session’s organization. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||