requests array. You don’t upload a JSONL file; OpenRouter handles JSONL persistence internally.
Batch results are available asynchronously. A successful submission returns
202 Accepted with status: "validating", which means the request was persisted and queued for validation, not that every request has completed.Submit a batch
Submit a batch with:Endpoint
The batch-level
model applies to every request. A request body can omit model to inherit the batch-level value. If a request body sets its own model, it must match the batch-level model or the submission is rejected.
202 Accepted
24h.
Poll for results
Use the batch ID to retrieve the current status:Endpoint
Shell
Status progression
failed, expired, cancelling, and cancelled. The terminal statuses are completed, failed, expired, and cancelled. Poll until the batch reaches a terminal status.
request_counts contains the total number of requests and the number that completed or failed:
request_counts
results is null. When a batch completes, results is returned inline as an array in the same response. There is no separate results-download endpoint.
Each result maps back to an input using custom_id. Exactly one of response or error is populated for each result:
Result item
Completed batch
Reporting issues
Each completed result’sresponse.body.id is that request’s OpenRouter generation ID (for example gen-batch-...). To flag a bad generation, copy that ID and submit it through Report Feedback using the By generation ID flow.
Generation-level feedback is available for the
/v1/chat/completions, /v1/responses, and /v1/messages skins. You can also share feedback or report issues in our Discord.Use different API shapes
Set the top-levelendpoint to choose the request shape used by every body in the batch. Supported shapes:
- Chat completions:
/v1/chat/completions - Responses:
/v1/responses - Anthropic Messages:
/v1/messages
/v1/messages and puts the Messages-shaped request in each item’s body:
Anthropic Messages batch
endpoint. To mix API shapes, submit separate batches.
Embeddings
Embeddings are rolling out on providers that support them. Set the top-levelendpoint to /v1/embeddings and put the embeddings request in each item’s body. Each body takes an input (a string, an array of strings, a token array, or an array of token arrays). Multimodal inputs, input_type, and provider preferences are not supported on the Batch API. Use the sync API for those.
An input can be a single string or an array of strings. When it is an array, that request embeds every string in one call:
Embeddings batch
GET https://openrouter.ai/api/beta/batches/:id). These items are the entries of the completed batch object’s results array (shown in full above); each carries the standard embeddings response in its body, and there is one result item per custom_id. A request whose input is an array of strings returns one embedding object per string in data (ordered by index); a single-string request returns exactly one:
Embeddings results
Batch inputs and results are stored as JSONL artifacts in Google Cloud Storage and automatically deleted 30 days after creation, matching the upstream batch retention window. Download any results you need before the 30-day retention window elapses.