Batch API
The native Batch API is a multi-step REST workflow, not a one-shot JSONL upload.
- Create the container with
POST /v1/batchesand{"name":"nightly"}. - Add
batch_requests[]withPOST /v1/batches/{batch_id}/requests. - Poll
GET /v1/batches/{batch_id}and inspect queued requests withGET /requests. - Read
GET /results, or cancel withPOST /v1/batches/{batch_id}:cancel.
Each request has a caller-supplied batch_request_id and a batch_request object. Pagination uses limit and pagination_token.