Create batch
API reference for POST /v3/router/batches. Start a batch from an uploaded JSONL file.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Time window the batch runs in. Only 24h is supported.
24h Endpoint each line is sent to. The batch model must support it.
/v1/responses, /v1/chat/completions, /v1/embeddings, /v1/completions, /v1/moderations, /v3/router/decisions ID of an uploaded JSONL file whose purpose is batch.
Up to 16 key/value pairs, keys up to 64 characters and values up to 512.
Expiration applied to the output and error files.
Response
Batch created. Poll or list it until it reaches a terminal status.
Time window the batch runs in, always 24h.
Creation time, in Unix seconds.
Endpoint each line of the input file is sent to.
Batch identifier.
ID of the uploaded JSONL input file.
Object type, always batch.
Per-line progress counters.
Current batch status.
validating, in_progress, finalizing, completed, failed, expired, cancelling, cancelled Time the batch finished cancelling, in Unix seconds.
Time cancellation was requested, in Unix seconds.
Time the batch completed, in Unix seconds.
ID of the JSONL file holding per-line errors, when any line failed.
Errors that prevented the batch from running, when the status is failed.
Time the batch expired, in Unix seconds.
Time the batch expires, in Unix seconds.
Time the batch failed, in Unix seconds.
Time the batch began assembling its result files, in Unix seconds.
Time the batch started running, in Unix seconds.
Metadata supplied at creation.
Model resolved for the batch.
ID of the JSONL file holding successful responses, set once the batch completes.
Token usage summed over the successful lines.