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

# List all batches

`GET /api/v1/batches`

## Request

- Base URL: `https://api.nano-gpt.com`
- URL: `https://api.nano-gpt.com/api/v1/batches`
- Auth: HTTP bearer

Lists all batches visible to the authenticated credential in the OpenAI-compatible batch shape, including inline and file-backed jobs. Results are newest first. Preserve the same filters on every paginated request.

## Query parameters

- `limit` integer
- `after` string
- `before` string
- `status` BatchStatus[]
- `created_after` union
  - integer
  - string
- `created_before` union
  - integer
  - string

## Response `200`

A page of all visible batches ordered newest first.

- FileBatchList
  - `object` 'list', required
  - `data` FileBatchListItem[], required: All visible batches ordered newest first, including inline and file-backed jobs.
    - `id` string, required: File-backed batch ID.
    - `object` 'batch', required
    - `endpoint` '/v1/chat/completions' | '/v1/responses', required
    - `input_file_id` string, required
    - `output_file_id` string, nullable
    - `error_file_id` string, nullable
    - `completion_window` '24h', required
    - `status` 'validating' | 'in_progress' | 'finalizing' | 'completed' | 'failed' | 'expired' | 'cancelling' | 'cancelled', required
    - `created_at` integer, required
    - `in_progress_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` BatchRequestCounts, required
      - `total` integer, required
      - `completed` integer, required
      - `failed` integer, required
    - `metadata` object, nullable
    - `usage` BatchUsage
      - `prompt_tokens` integer
      - `completion_tokens` integer
      - `total_tokens` integer
    - `errors` object, nullable
  - `first_id` string, nullable, required: First batch ID in this page, or null for an empty page. Pass as before to return to the adjacent newer page.
  - `last_id` string, nullable, required: Last batch ID in this page, or null for an empty page. Pass as after to fetch the next older page.
  - `has_more` boolean, required: Whether more records exist in the direction being paged.

## Other responses

- `400`: Invalid filters, timestamp range, or cursor.
- `401`: Missing or invalid authentication.

## Changes

- **2026-11-03** `cc8b07d75689`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nano-gpt/apis/nanogpt-api/changes/api/v1/batches/get.md)

---

[API](https://skmtc.dev/nano-gpt/apis/nanogpt-api.md) - [All operations](https://skmtc.dev/nano-gpt/apis/nanogpt-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nano-gpt/apis/nanogpt-api/revisions/cc8b07d75689?raw)
