Batch

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.

get/batches

Request

  • Base URL
    https://openrouter.ai/api/v1
  • Auth
    HTTP bearer

Query parameters

limit, integer

Maximum number of batches to return, from 1 through 100.

Example:20
after, string

Batch id from the previous page's last_id.

Example:batch_7a4b02
status, BatchListStatus[]

Repeat this parameter to include more than one status.

[
  "completed",
  "failed"
]
created_after, union

Only include batches created strictly after this timestamp.

string
OR
string date
OR
string date-time
created_before, intersection

Only include batches created strictly before this timestamp.

Only include batches created strictly before this timestamp.

Response

A newest-first page of batches.

BatchListResponse required

A newest-first page of metadata-only batch objects.

data, BatchListItem[] required
first_id, string nullable required
has_more, boolean required
last_id, string nullable required
object, 'list' required

Example response

{
  "data": [],
  "first_id": null,
  "has_more": false,
  "last_id": null,
  "object": "list"
}

Changes

    • info

      added the optional property data/items/output to the response with the status

    • info

      added the required property data/items/expires_at to the response with the status

    • info

      added the required property data/items/provider to the response with the status