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

# List batches

`GET /v1/batches`

## Request

- Base URL: `https://api.tokenlab.sh`
- URL: `https://api.tokenlab.sh/v1/batches`
- Auth: HTTP bearer

## Query parameters

- `limit` integer
- `after` string

## Response `200`

List of batches

- BatchListResponse
  - `object` 'list', required
  - `data` BatchObject[], required
    - `id` string, required
    - `object` 'batch', required
    - `endpoint` '/v1/chat/completions' | '/v1/embeddings', required
    - `errors` object, nullable
    - `input_file_id` string, required
    - `completion_window` '24h', required
    - `status` 'validating' | 'queued' | 'in_progress' | 'finalizing' | 'completed' | 'failed' | 'cancelling' | 'cancelled' | 'expired', required
    - `output_file_id` string, nullable
    - `error_file_id` string, nullable
    - `created_at` integer, required
    - `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` BatchRequestCounts, required
      - `total` integer, required
      - `completed` integer, required
      - `failed` integer, required
    - `metadata` object, nullable
  - `first_id` string, nullable
  - `last_id` string, nullable
  - `has_more` boolean, required

## Other responses

- `401`: Unauthorized - Invalid or missing API key

---

[API](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway.md) · [All operations](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/tokenlab/apis/tokenlab-ai-gateway/revisions/3208bfbcda22?raw)
