List batches
Returns a paginated list of your batches, newest first.
Use cursor-based pagination: pass last_id from the response as the after parameter to fetch the next page.
Query parameters
Pagination parameters
Search query to filter batches by metadata, input filename, or batch ID (case-insensitive substring match)
Comma-separated list of related resources to include. Supported: "analytics"
Filter by member user ID (resolves to api_key_id). Available in org context for any member, or in personal context for platform managers.
Filter by batch status. Supported: "in_progress", "completed", "failed", "cancelled", "expired". "in_progress" includes validating and finalizing sub-states. "cancelled" includes cancelling. "expired" matches batches with SLA issues (overdue or finished past deadline).
Only return batches created after this ISO 8601 timestamp
Only return batches created before this ISO 8601 timestamp
When true, sort active (non-terminal) batches before completed/failed/cancelled ones. Each group is sorted by creation time (newest first). Default: false.
Comma-separated completion windows to include. Common values:
- 24h — long-running batch jobs
- 1h — async flex requests
- 0s — realtime tracking rows for the Open Responses API
- background — best-effort background batches (platform managers only)
When omitted the server returns batches with any completion window; the dashboard sends completion_window=24h by default so realtime tracking rows don't pollute the Batches view.
Response
List of batches. Check has_more to determine if additional pages exist.
Example response
{
"data": [
{
"completion_window": "24h",
"created_at": 1703187200,
"endpoint": "/v1/chat/completions",
"id": "batch-abc123",
"input_file_id": "file-abc123",
"object": "batch",
"request_counts": {
"completed": 98,
"failed": 2,
"total": 100
},
"status": "completed"
}
],
"first_id": "batch-abc123",
"has_more": false,
"last_id": "batch-abc123",
"object": "list"
}Changes
No recorded changes to this endpoint across all 1 revision of this API.