Batch API

The native Batch API is a multi-step REST workflow, not a one-shot JSONL upload.

  1. Create the container with POST /v1/batches and {"name":"nightly"}.
  2. Add batch_requests[] with POST /v1/batches/{batch_id}/requests.
  3. Poll GET /v1/batches/{batch_id} and inspect queued requests with GET /requests.
  4. Read GET /results, or cancel with POST /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.