> ## Documentation Index
> Fetch the complete documentation index at: https://docs.herogpu.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Run large workloads of AI inference asynchronously, wire-compatible with `/v1/batches` and `/v1/files`.

The Batch API processes hundreds, thousands, or up to 50,000 inference
requests at a discounted rate within a 24-hour window. It's the right
choice when you don't need a real-time response and want to avoid per-request
rate limits.

> [card] [Quickstart](https://docs.herogpu.com/docs/batch/getting-started.md)
>
> Run your first batch end to end in curl and Python: upload, create, poll, download.

> [card] [Objects & lifecycle](https://docs.herogpu.com/docs/batch/objects.md)
>
> The File and Batch objects, the status lifecycle, and every endpoint.

> [card] [JSONL format](https://docs.herogpu.com/docs/batch/jsonl-format.md)
>
> Line schemas for input, output, and error files, plus validation rules.

> [card] [Supported endpoints](https://docs.herogpu.com/docs/batch/supported-endpoints.md)
>
> The one endpoint a batch line can target, with its request and response body.

> [card] [Errors](https://docs.herogpu.com/docs/batch/errors.md)
>
> Every status and error-file code, with recovery guidance.

## Quick facts

| | |
| - | - |
| **Base URL (production)** | `https://api.herogpu.com` |
| **Auth headers** | `x-api-key` (required), `x-project-id` (optional) |
| **Completion window** | 24 hours (fixed) |
| **Supported batch endpoint** | `/v1/chat/completions` (only) |
| **Max requests per batch** | 50,000 |
| **Max input file size** | 200 MB total, 1 MB per line |
| **Max upload size** | 100 MB |
| **File retention** | 30 days |

## When to use the Batch API

| You need… | Use |
| - | - |
| A single immediate response | The synchronous endpoint directly (e.g. `POST /v1/chat/completions`) |
| Hundreds-to-thousands of completions, can wait minutes-to-hours | The Batch API |
| To avoid per-second rate limits during a backfill | The Batch API |
| Streaming responses | The synchronous endpoint, streaming is **not** supported in batch mode |

Every endpoint also has an interactive playground under
[API Reference → Batch API](https://docs.herogpu.com/api-reference/upload-file.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.