---
title: "Retrieve a batch"
method: GET
path: "/api/v1/batches/{batch_id}"
tags: ["openAiBatch"]
---

# Retrieve a batch

`GET /api/v1/batches/{batch_id}`

Retrieve an OpenAI-compatible batch job by ID.

## Path parameters

- `batch_id` string, required

## Query parameters

- `provider_id` string, required

## Headers

- `Authorization` string, required
- `X-Data-Respan-Params` string

## Response `200`

Batch details.

- OpenAIBatchRetrieveBatchResponse200
  - `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` ApiV1BatchesBatchIdGetResponsesContentApplicationJsonSchemaRequestCounts
    - `total` integer
    - `completed` integer
    - `failed` integer
  - `metadata` object
  - `errors` unknown

## Other responses

- `401` — Unauthorized - Missing or invalid authentication
- `404` — Not Found

## Changes

> 6 revisions in range; 3 could not be searched.

- **2026-07-31** `c26d550029f8` — 2 breaking, 19 warning, 2 info
  - removed the required property `id` from the response with the `200` status
  - removed the required property `status` from the response with the `200` status
  - deleted the `header` request parameter `X-Data-Respan-Params`
  - removed the optional property `cancelled_at` from the response with the `200` status
  - …19 more

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/v1/batches/:batch_id/get.md)

---

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