Batch API
The Batch API is for asynchronous, high-volume inference jobs where you do not need an answer immediately.
Workflow
- Prepare a request bundle
- Create a batch with
POST /v1/batches - Poll
GET /v1/batches/{batch_id}— results are included inline once complete
1 & 2. Create the batch
Pass your requests inline — no separate file upload required.
curl
Node.js SDK
Python SDK
Go SDK
Java SDK
3. Poll and read results
Poll until status is a terminal value. When completed, the response includes a results array — no separate file download needed.
Common statuses:
validatingin_progressfinalizingcompletedfailedcancelledexpired
Notes
- All requests in a batch must use the same model.
- Batch jobs are best for throughput, not low-latency interactive use.
- Use
GET /v1/batchesto list recent batches andPOST /v1/batches/{batch_id}/cancelto cancel one. - Results are matched by
custom_id— the output order is not guaranteed.