> ## 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.

> ## Agent Instructions
> Phaseo Gateway base URL: https://api.phaseo.app/v1. Send `Authorization: Bearer $PHASEO_API_KEY` with every request.
> Model IDs look like `provider/model`, for example `openai/gpt-6-astra`. Do not guess IDs: list them with `GET /v1/models` or check https://phaseo.app/models. `phaseo/free` routes to an available free model and needs no wallet balance.
> For new text integrations prefer `POST /v1/responses`. `POST /v1/chat/completions` (OpenAI format) and `POST /v1/messages` (Anthropic format) suit existing code.
> The full API contract is https://phaseo.app/docs/openapi/v1/openapi.yaml. Official SDKs: `@phaseo/sdk` (TypeScript) and `phaseo` (Python), plus Go, C#, PHP, Ruby and Rust.
> Search these docs over MCP at https://phaseo.app/docs/mcp, and install Phaseo skills with `npx skills add https://phaseo.app/docs`. If a page is wrong or out of date, report it with the MCP `submit_feedback` tool.
> Manage Phaseo accounts with the `phaseo` CLI (`npm install -g @phaseo/cli`, then `phaseo login` or `phaseo login --device-code`), the `/v1` Management API or the MCP server at `https://mcp.phaseo.app/mcp?access=manage`. Do not send users to the dashboard for account tasks. A person is still needed for sign-up, approving a sign-in, paying the first top-up on the checkout link that `phaseo credits add` returns when no card is saved, confirming each saved-card top-up from the emailed link, and account security (password, MFA, passkeys). Create API keys with `phaseo keys create --name <name> --json`; never guess one. Credit top-ups need `phaseo login --scopes billing:write` first. Task map: https://phaseo.app/docs/v1/developers/manage-from-an-agent.md.

# Gateway API Overview

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

Use this page to find the correct API path before opening an endpoint reference. All Phaseo Gateway endpoints share one base URL and use bearer authentication.

## Choose your path

| If you want to | Start with |
| - | - |
| Send your first request | [Quickstart](https://phaseo.app/docs/v1/quickstart.md) |
| Generate text or use tools | [`POST /responses`](./endpoint/responses) |
| Make typed decisions | [`POST /decisions`](./endpoint/decisions) |
| Keep an existing OpenAI-compatible integration | [`POST /chat/completions`](./endpoint/chat-completions) |
| Browse models and providers | [`GET /models`](./endpoint/models) and [`GET /providers`](./endpoint/providers) |
| Create music or manage files | [`POST /music/generations`](./endpoint/music-generate) and [`POST /files`](./endpoint/files) |
| Generate video (Beta) | [`POST /videos`](./endpoint/video-create) |
| Submit a batch or download results (Beta) | [`POST /batches`](./endpoint/batches-create) and [`GET /batches/{batch_id}/results`](./endpoint/batches-results) |

## Base URL

Production base URL:

```http theme={null}
https://api.phaseo.app/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] [Phaseo Gateway OpenAPI](https://github.com/phaseoteam/Phaseo/blob/main/apps/docs/openapi/v1/openapi.yaml)
>
> View the specification file

The documentation and SDKs use this same specification. Video, Batch, and Decisions endpoints are labelled **Beta**; workspace preview access may be required.

## Authentication

Use a standard Gateway API key for inference and a management API key with the appropriate permissions for administration. See [Authentication](https://phaseo.app/docs/v1/developers/authentication.md) and [Management API Keys](https://phaseo.app/docs/v1/developers/management-api-keys.md).

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

If authentication fails, the API returns `401`.

## API resources

| Resource | What it does |
| - | - |
| Inference | Generate text, images, audio, and embeddings; make decisions, rerank, moderate, or parse content. Start with [Responses](https://phaseo.app/docs/v1/api-reference/endpoint/responses.md) or [Decisions](https://phaseo.app/docs/v1/api-reference/endpoint/decisions.md). |
| Async Jobs & Files | Submit [video](https://phaseo.app/docs/v1/api-reference/endpoint/video-create.md) or [batch](https://phaseo.app/docs/v1/api-reference/endpoint/batches-create.md) jobs, transfer files, and configure webhooks. |
| Models & Pricing | Discover [models](https://phaseo.app/docs/v1/api-reference/endpoint/models.md), provider offers, and [estimated costs](https://phaseo.app/docs/v1/api-reference/endpoint/pricing-calculate.md). |
| Routing & Policies | Configure presets, provider credentials, private models, and [guardrails](https://phaseo.app/docs/v1/api-reference/endpoint/guardrails.md). |
| Usage & Monitoring | Inspect [logs](https://phaseo.app/docs/v1/api-reference/endpoint/logs-list.md), activity, analytics, evaluations, and service health. |
| Workspace Management | Manage [workspaces](https://phaseo.app/docs/v1/api-reference/endpoint/workspaces-list.md), keys, budgets, identities, and integrations. |

## Billing and rate limits

* Handle provider throttling and applicable access policies using the [rate-limit guide](https://phaseo.app/docs/v1/api-reference/limits.md).
* Paid requests require enough wallet balance to pass the preflight credit check.
* Free models with `:free` do not require deposited credits.


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