---
title: "Retrieve Openai Batch"
method: GET
path: "/v1/batches/{batch_id}"
tags: ["Files & Batches"]
---

# Retrieve Openai Batch

`GET /v1/batches/{batch_id}`

## Path parameters

- `batch_id` string, required

## Headers

- `xi-api-key` string, nullable
- `x-api-key` string, nullable

## Response `200`

Successful Response

- OpenAIBatchesOut
  - `id` string, required — The batch ID.
  - `object` 'batch' — The object type, which is always batch.
  - `endpoint` string, required — The API endpoint used for the batch.
  - `errors` BatchErrors
    - `object` string — The object type, which is always list.
    - `data` BatchErrorData[] — List of error objects.
      - `code` string, nullable — An error code identifying the error type.
      - `line` integer, nullable — The line number of the input file where the error occurred.
      - `message` string, nullable — A human-readable message describing the error.
      - `param` string, nullable — The name of the parameter that caused the error.
  - `input_file_id` string, required — The ID of the input file for the batch.
  - `completion_window` string, required — The time frame within which the batch should be processed.
  - `status` string, required — The current status of the batch.
  - `output_file_id` string, nullable — The ID of the output file.
  - `error_file_id` string, nullable — The ID of the error file.
  - `created_at` integer, required — The Unix timestamp of when the batch was created.
  - `in_progress_at` integer, nullable — The Unix timestamp of when the batch started processing.
  - `expires_at` integer, required — The Unix timestamp of when the batch will expire.
  - `finalizing_at` integer, nullable — The Unix timestamp of when the batch started finalizing.
  - `completed_at` integer, nullable — The Unix timestamp of when the batch completed.
  - `failed_at` integer, nullable — The Unix timestamp of when the batch failed.
  - `expired_at` integer, nullable — The Unix timestamp of when the batch expired.
  - `cancelling_at` integer, nullable — The Unix timestamp of when the batch started cancelling.
  - `cancelled_at` integer, nullable — The Unix timestamp of when the batch was cancelled.
  - `request_counts` BatchRequestCounts
    - `total` integer — Total number of requests in the batch.
    - `completed` integer — Number of requests that completed successfully.
    - `failed` integer — Number of requests that failed.
  - `metadata` object, nullable — Metadata associated with the batch.
  - `model` string, nullable — The model used for the batch.
  - `usage` BatchUsage
    - `input_tokens` integer
    - `input_tokens_details` BatchInputTokensDetails
      - `cached_tokens` integer
    - `output_tokens` integer
    - `output_tokens_details` BatchOutputTokensDetails
      - `reasoning_tokens` integer
    - `total_tokens` integer

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/deepinfra/apis/deepinfra-api.md) · [All operations](https://skmtc.net/deepinfra/apis/deepinfra-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deepinfra/deepinfra-api/versions/51b817b3f80f/schema)
