Passer à la navigation

Create Batch from Rows

The application/json form of POST /v2/batch. Send the records in a rows array instead of a JSONL file. Each row is the same object as a JSONL line and has the same limits: 20 to 500 rows by default, 5 MB or less as JSONL, and unique request_id values. Errors name a refused row by line, where line N is rows[N-1].

Batch needs the Scale plan or above and approval for your organization; see Create Batch.

Dialogue edit rows (early access). A row’s payload can carry dialogueEdit to render a completed preview. Send one video input, the video the preview was made from, and no audio. Every dialogue edit row in a batch must use the same source video. If one row can’t be rendered, the whole batch is refused with that row’s lineNumber. See Batch Processing.

Authentification

x-api-keystring
Authentification par clé API via en-tête

Requête

This endpoint expects an object.
rowslist of objectsRequis

The batch records, 20-500 by default. Each row contains request_id, endpoint exactly /v2/generate, and a generation payload, as on a JSONL line.

webhook_urlstringOptionnel

URL that receives a POST when the batch completes or fails, signed with your organization’s webhook secret in the Sync-Signature header. Omit it or leave it empty to skip notifications. A non-empty value must be an http:// or https:// URL; an invalid URL returns 400. See Webhooks.

dry_runbooleanOptionnelPar défaut false

When true, validates the rows, including dialogue edit expansion, and returns { "status": "VALIDATED" } without creating a batch. Requires the same organization approval and plan as batch creation.

Réponse

This endpoint returns an object.
Batch Responseobject
OR
Validation Responseobject

Erreurs

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error