v1

latestOpenAPI 3.1.02026-07-26132433.7 KB
Batches

Create a batch

Submit a batch from an uploaded JSONL input file. Returns immediately with status: in_progress.

post/v1/batches

Headers

x-project-idstring

Optional project identifier. Scopes the request to a specific project when provided.

Request body

input_file_idstring required

ID from POST /v1/files with purpose=batch.

endpoint'/v1/chat/completions' required

Must match the url on every JSONL line.

completion_window'24h'
metadataobject

Optional tags echoed back on retrieve.

Response

Batch accepted

idstring
object'batch'
endpointstring
status'validating' | 'in_progress' | 'finalizing' | 'completed' | 'failed' | 'expired' | 'cancelling' | 'cancelled'
input_file_idstring
output_file_idstring nullable
error_file_idstring nullable
completion_windowstring
created_atinteger
expires_atinteger
metadataobject