Skip to main content
Total latency = slowest single request, not the sum. Batch 20 prompts and pay the same wall-clock time as 1 prompt.

Request

Response

Results are returned in the same order as your requests array, indexed by index.

Parameters

Top-level

Per-request object

Each entry in requests supports the same parameters as a single /chat request:

Billing

Each successful request in the batch is charged at that model’s standard rate. Failed requests are not charged. The total is deducted from your balance before the batch runs (pre-flight check). If your balance is insufficient for the estimated total, the entire batch is rejected before any models run.

Code examples

Limits

Error handling

Individual request failures don’t fail the batch by default. Check result.success and result.error per item:
Use "fail_on_any_error": true if you need all-or-nothing semantics.