Skip to main content

Overview

Submit, list, poll, and delete asynchronous batches of inference requests. See https://openrouter.ai/docs/batch-quickstart.

Available Operations

list

Lists batches in the workspace of the authenticating API key, newest first. To fetch the next page, pass the previous page’s last_id as after. List items omit results. Use GET /batches/{id} to get them. See the Batch API Quickstart.

Example Usage

Parameters

Response

operations.ListBatchesResponse

Errors

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.BatchObject

Errors

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.BatchDeletedObject

Errors

get_batches

Returns a batch with its status and request counts. Batches in a terminal status include results. Failed batches report the reason in error.message. See the Batch API Quickstart.

Example Usage

Parameters

Response

components.BatchObject

Errors