Create Batch

API for Batch Processing. Available only for Scale and Enterprise plans.

Headers

x-api-keystringRequired

Request

This endpoint expects a multipart form containing a file.
inputfileRequired

JSON lines file containing batch requests. Minimum 20 records required. Maximum file size: 5MB. Maximum requests per batch: 500.

webhook_urlstringOptional
Optional webhook URL to receive batch completion notifications. A POST request will be sent when the batch completes or fails.
dry_runbooleanOptionalDefaults to false
When true, validates the input file without processing. Returns validation status without creating generations.

Response

This endpoint returns an object.
Batch Responseobject
OR
Validation Responseobject

Errors