Overview
Submit, list, poll, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.Available Operations
- list - List batches
- create_batches - Create a batch
- delete - Delete a batch
- get_batches - Get a batch
list
Lists batches in the workspace of the authenticating API key, newest first. To fetch the next page, pass the previous page’slast_id as after. List items omit results. Use GET /batches/{id} to get them. See the Batch API Quickstart.
Example Usage
Parameters
Response
operations.ListBatchesResponseErrors
create_batches
Creates a batch of requests that run asynchronously against a single endpoint (/v1/chat/completions, /v1/responses, /v1/messages, /v1/embeddings). Returns 202 with status: "validating". Poll GET /batches/{id} for progress and results. See the Batch API Quickstart.
Example Usage: chatCompletions
Example Usage: messages
Example Usage: providerPinned
Example Usage: responses
Parameters
Response
components.BatchObjectErrors
delete
Deletes a batch in a terminal status (completed, failed, expired, or cancelled) and its stored requests and results. Batches still in progress return 409. Billing and usage records are kept. See the Batch API Quickstart.
Example Usage
Parameters
Response
components.BatchDeletedObjectErrors
get_batches
Returns a batch with its status and request counts. Batches in a terminal status includeresults. Failed batches report the reason in error.message. See the Batch API Quickstart.