---
title: "List batches"
method: GET
path: "/api/v1/batches"
tags: ["openAiBatch"]
---

# List batches

`GET /api/v1/batches`

List batches from the selected provider using customer-owned credentials. The response is relayed in the provider's OpenAI-compatible shape.

## Query parameters

- `provider_id` string, required
- `after` string
- `limit` integer

## Headers

- `Authorization` string, required

## Response `200`

OpenAI-compatible batch list.

- OpenAIBatchApiV1BatchesRetrieveResponse200
  - `object` 'list', required
  - `data` ApiV1BatchesGetResponsesContentApplicationJsonSchemaDataItems[], required
    - `id` string, required — Batch ID.
    - `object` string
    - `endpoint` string
    - `input_file_id` string
    - `output_file_id` string, nullable — Output file ID, available when the batch completes.
    - `error_file_id` string, nullable — Error file ID, when provider errors are available.
    - `completion_window` string
    - `status` 'validating' | 'pending' | 'in_progress' | 'finalizing' | 'completed' | 'failed' | 'expired' | 'cancelling' | 'cancelled', required
    - `created_at` integer — Unix timestamp.
    - `in_progress_at` integer, nullable
    - `expires_at` integer, nullable
    - `finalizing_at` integer, nullable
    - `completed_at` integer, nullable
    - `failed_at` integer, nullable
    - `expired_at` integer, nullable
    - `cancelling_at` integer, nullable
    - `cancelled_at` integer, nullable
    - `request_counts` ApiV1BatchesGetResponsesContentApplicationJsonSchemaDataItemsRequestCounts
      - `total` integer
      - `completed` integer
      - `failed` integer
    - `metadata` object
    - `errors` unknown
  - `first_id` string, nullable
  - `last_id` string, nullable
  - `has_more` boolean

## Other responses

- `400` — Provider route is missing or invalid.
- `401` — Authentication or customer-owned provider credential failed.
- `424` — The upstream provider failed.

---

[API](https://skmtc.net/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.net/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/4e064cf81dae/schema)
