batches

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.

get/batches

Query parameters

afterstring nullable

A cursor for use in pagination. after is an object ID that defines your place in the list.

limitinteger nullable

Maximum number of items to return (default: 20, max: 100)

Pagination parameters

searchstring nullable

Search query to filter batches by metadata, input filename, or batch ID (case-insensitive substring match)

includestring nullable

Comma-separated list of related resources to include. Supported: "analytics"

member_idstring uuid nullable

Filter by member user ID (resolves to api_key_id). Available in org context for any member, or in personal context for platform managers.

statusstring nullable

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

created_afterstring date-time nullable

Only return batches created after this ISO 8601 timestamp

created_beforestring date-time nullable

Only return batches created before this ISO 8601 timestamp

active_firstboolean

When true, sort active (non-terminal) batches before completed/failed/cancelled ones. Each group is sorted by creation time (newest first). Default: false.

completion_windowstring nullable

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.

first_idstring nullable
has_moreboolean required
last_idstring nullable
object'list' required

Object type for lists - always "list"

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.