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

# Overview

> Where the endpoint reference lives, and the headers every endpoint shares.

The API is served at `https://api.zerogen.com/v1`. Every request authenticates
with an API key; see [Authentication](https://docs.zerogen.com/authentication.md).

Each endpoint's page in this tab gives its parameters, responses, errors and the
scope it needs. The same OpenAPI document is at
`https://api.zerogen.com/v1/openapi.json`, readable without a key.

## Request headers

| Header | Description |
| - | - |
| `Authorization` | Required. `Bearer` and your API key. |
| `Content-Type` | `application/json` on requests with a body. |
| `Idempotency-Key` | Optional on any `POST`. Makes the request safe to retry. See [Idempotency](https://docs.zerogen.com/idempotency.md). |
| `Prefer` | Optional on `POST /v1/generations` and `GET /v1/generations/{id}`. `wait=N` holds the response up to `N` seconds, at most 60, until the generation ends. |

## Response headers

| Header | Description |
| - | - |
| `Request-Id` | On every response. Identifies the request when you contact ZeroGen. |
| `RateLimit-Limit`, `RateLimit-Remaining`, `RateLimit-Reset` | On every authenticated response. See [Rate limits](https://docs.zerogen.com/rate-limits.md). |
| `Retry-After` | On a `429`. Seconds to wait before retrying. |
| `Location` | On a created generation or upload. Its path. |
| `Preference-Applied` | When the request sent `Prefer: wait=N`. The wait that was applied. |
| `Idempotent-Replayed` | `true` when the response replays an earlier request with the same `Idempotency-Key`. |
| `Deprecation`, `Sunset` | When the response names a deprecated model. See [Models](https://docs.zerogen.com/models.md#deprecated-models). |
| `Allow` | On a `405`. The methods the endpoint accepts. |
| `WWW-Authenticate` | On a `401`. |

Endpoint responses are never cached: each carries `Cache-Control: no-store`.


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