Zur Navigation springen

Create Batch from Rows

The application/json form of POST /v2/batch, the same endpoint as “Create Batch”: send the records in a rows array instead of a JSONL file. Each row is the same object as one JSONL line and is validated the same way: 20-500 rows by default, 5 MB or smaller when serialized as JSONL, unique request_id values, and endpoint exactly /v2/generate. Errors name a refused row by its line, where line N is rows[N-1]: dialogue edit refusals return it as lineNumber, other record errors only in message. Requires the Scale plan or higher. In early access, enabled per organization, a row’s payload can carry dialogueEdit to render a completed preview from POST /v2/dialogue-edits: send one video input, the video the preview was made from, and no audio input. All dialogue edit rows in a batch must come from the same source video. Each row is expanded at submit into the request POST /v2/generate builds for that preview and is charged the same. A dialogue edit row that cannot be rendered refuses the whole batch with the /v2/generate errorCode (for example dialogue_edit_not_found, 422) and lineNumber. See Batch Processing.

Authentifizierung

x-api-keystring
API-Key-Authentifizierung via Header

Anfrage

This endpoint expects an object.
rowslist of objectsErforderlich

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_urlstringOptional

Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails, with a Sync-Signature header (t=<unix>,v1=<hmac_sha256>) signed with the organization webhook secret.

dry_runbooleanOptionalStandardwert ist false

When true, validates the rows, including dialogue edit expansion, and returns { "status": "VALIDATED" } without creating a batch.

Antwort

This endpoint returns an object.
Batch Responseobject
OR
Validation Responseobject

Fehler

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