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

# Introduction To The AI Gateway

> Base URL, authentication, and endpoint families for the Phaseo Gateway.

## Base URL

Production base URL:

```http theme={null}
https://api.phaseo.ai/v1
```

All endpoint paths in this reference are relative to that `/v1` base URL.

## OpenAPI

Use the OpenAPI file if you want to import the API into Postman, Hoppscotch, or an SDK generator.

<Card title="Phaseo Gateway OpenAPI" icon="list-bullet" href="https://github.com/phaseoteam/Phaseo/blob/main/apps/docs/openapi/v1/openapi.yaml">
  View the specification file
</Card>

## Authentication

Most endpoints require a standard gateway API key. Management endpoints require a management API key created in the dashboard.

```http theme={null}
Authorization: Bearer phaseo_v1_sk_<kid>_<secret>
```

If authentication fails, the API returns `401`.

## Endpoint families

| Endpoint                                                                                                       | Purpose                          |
| -------------------------------------------------------------------------------------------------------------- | -------------------------------- |
| `POST /chat/completions`, `POST /responses`, `POST /messages`                                                  | Text generation                  |
| `POST /embeddings`, `POST /moderations`                                                                        | Embeddings and moderation        |
| `POST /audio/speech`, `POST /audio/transcriptions`, `POST /audio/translations`                                 | Speech and audio                 |
| `POST /images/generations`, `POST /images/edits`                                                               | Image generation and editing     |
| `POST /videos`, `GET /videos`, `GET /videos/models`, `GET /videos/{video_id}`                                  | Video jobs and status            |
| `POST /music/generate`, `GET /music/generate/{music_id}`                                                       | Music generation jobs            |
| `POST /ocr`, `POST /batches`, `GET /batches`, `GET /batches/{batch_id}`, `POST /files`, `GET /files/{file_id}` | OCR, batches, and files          |
| `GET /models`, `GET /providers`, `GET /pricing/models`, `POST /pricing/calculate`, `GET /activity`             | Discovery, pricing, and activity |

## Billing and rate limits

* Phaseo does not apply its own rate limits. Limits are enforced by upstream providers.
* Paid requests require enough wallet balance to pass the preflight credit check.
* Free models with `:free` do not require deposited credits.
