Skip to main content
GET
List all batches
This OpenAI-compatible list includes both inline and file-backed jobs. Items retain the standard batch shape, including file IDs, lifecycle timestamps, request counts, metadata, usage, and errors where applicable. See the Batch API guide for pagination examples, filter rules, and error behavior.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
integer
default:20

Number of batches to return.

Required range: 1 <= x <= 100
after
string

Return the next page of batches older than this batch ID. Use the current page's last_id. Cannot be combined with before.

before
string

Return the adjacent page of batches newer than this batch ID, still ordered newest first. Use the current page's first_id. Cannot be combined with after.

status
enum<string>[]

Filter by one or more statuses. Repeat the parameter or provide comma-separated values.

Available options:
validating,
in_progress,
finalizing,
completed,
failed,
expired,
cancelling,
cancelled
created_after

Return batches created strictly after this boundary. Accepts Unix seconds or a timezone-qualified ISO 8601/RFC 3339 timestamp with at most millisecond precision.

created_before

Return batches created strictly before this boundary. Accepts Unix seconds or a timezone-qualified ISO 8601/RFC 3339 timestamp with at most millisecond precision.

Response

A page of all visible batches ordered newest first.

object
string
required
Allowed value: "list"
data
object[]
required

All visible batches ordered newest first, including inline and file-backed jobs.

first_id
string | null
required

First batch ID in this page, or null for an empty page. Pass as before to return to the adjacent newer page.

last_id
string | null
required

Last batch ID in this page, or null for an empty page. Pass as after to fetch the next older page.

has_more
boolean
required

Whether more records exist in the direction being paged.