Create Batch

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

Headers

x-api-keystringRequired

Request

This endpoint expects a multipart form containing a file.
inputfileRequired

JSON lines file containing batch requests. Maximum file size: 5MB. Maximum requests per batch: 1000.

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