Skip to main content

GET /v1/batches

Returns a paginated list of all batches.

Authentication

Requires provider authentication headers:

Request

Headers

string
required
The provider to route the request to (e.g., openai)
string
required
Bearer token for the provider API

Query Parameters

integer
Number of batches to return (default: 20, max: 100)
string
Cursor for pagination - returns batches after this batch ID

Response

array
Array of batch objects
string
The object type, always “list”
boolean
Whether there are more results available
string
ID of the first batch in the list
string
ID of the last batch in the list

Example

Response Example

Filtering and Monitoring

Monitor Active Batches

Find Recent Failures

Best Practices

When working with large numbers of batches, always use pagination to avoid timeouts and manage memory efficiently.
The API doesn’t support server-side filtering by status or date. Retrieve batches and filter them in your application code.
Regularly poll the list endpoint to monitor batch progress and detect failures early.

Create Batch

Create a new batch

Retrieve Batch

Check specific batch status

Cancel Batch

Cancel a running batch