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

# Start here

> Make your first request, connect an application, or find the reference you need.

Use Phaseo to call models from multiple providers through one API, control routing, and track usage and costs.

```bash cURL theme={null}
curl https://api.phaseo.app/v1/responses \
  -H "Authorization: Bearer $PHASEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "phaseo/free", "input": "Hello"}'
```

```typescript TypeScript theme={null}
import Phaseo, { outputText } from "@phaseo/sdk";

const client = new Phaseo(); // reads PHASEO_API_KEY

const response = await client.generateResponse({
  model: "phaseo/free",
  input: "Hello",
});

console.log(outputText(response));
```

```python Python theme={null}
from phaseo import Phaseo

client = Phaseo()  # reads PHASEO_API_KEY

response = client.responses.create({"model": "phaseo/free", "input": "Hello"})

print(response.output_text)
```

No API key yet? Run `phaseo keys create` with the [Phaseo CLI](https://phaseo.app/docs/v1/guides/integrations/phaseo-cli.md) or [create one in the dashboard](https://phaseo.app/settings/keys), then follow the [quickstart](https://phaseo.app/docs/v1/quickstart.md).

## Start from where you are

[** Make your first request** Create a key, send a request, and read the result.](https://phaseo.app/docs/v1/quickstart.md)

[** Migrate an application** Update an existing provider or gateway integration.](https://phaseo.app/docs/v1/migration-guides.md)

[** Connect a coding assistant** Configure Codex, Claude Code, Cursor, or another assistant.](https://phaseo.app/docs/v1/guides/integrations/coding-assistants.md)

[** Build an agent** Give a model tools, stream its steps, and approve its actions with the Agent SDK.](https://phaseo.app/docs/v1/sdk-reference/agent-sdk/overview.md)

## Choose an SDK

[ TypeScript](https://phaseo.app/docs/v1/sdk-reference/typescript/overview.md)
[ Python](https://phaseo.app/docs/v1/sdk-reference/python/overview.md)
[ Go](https://phaseo.app/docs/v1/sdk-reference/go/overview.md)
[ C#](https://phaseo.app/docs/v1/sdk-reference/csharp/overview.md)
[ PHP](https://phaseo.app/docs/v1/sdk-reference/php/overview.md)
[ Ruby](https://phaseo.app/docs/v1/sdk-reference/ruby/overview.md)
[ Rust](https://phaseo.app/docs/v1/sdk-reference/rust/overview.md)

## Build and operate

| Task | Documentation |
| - | - |
| Look up a request field or endpoint | [API Reference](https://phaseo.app/docs/v1/api-reference/introduction.md) |
| Run a starter application | [Examples](https://phaseo.app/docs/v1/guides/examples.md) |
| Implement a specific workflow | [Cookbook](https://phaseo.app/docs/v1/cookbook.md) |
| Choose providers and fallbacks | [Routing](https://phaseo.app/docs/v1/guides/routing-and-fallbacks.md) |
| Process video or batch jobs | [Async jobs and webhooks](https://phaseo.app/docs/v1/guides/async-video-and-batch.md) |
| Diagnose a failed request | [Errors and debugging](https://phaseo.app/docs/v1/api-reference/errors.md) |

## Choose a model

[Browse models](https://phaseo.app/models) or [compare them](https://phaseo.app/compare). Catalog entries can include models that are not routable; check Gateway availability before integrating. See [How Phaseo Works](https://phaseo.app/docs/v1/developers/introduction.md) for models, providers, and billing.

## Build with an AI agent

Hand your coding agent (Cursor, Claude Code, Codex and others) everything it needs to add Phaseo to your project.

Add Phaseo Gateway to this project.

&#x20; 1\. Install the Phaseo skills: npx skills add [https://phaseo.app/docs](https://phaseo.app/docs)
&#x20; 2\. If your tools support MCP, connect the Phaseo docs server at [https://phaseo.app/docs/mcp](https://phaseo.app/docs/mcp) and look up endpoints and SDK usage there instead of guessing.
&#x20; 3\. Inspect the current AI provider setup and propose the smallest change that sends requests to [https://api.phaseo.app/v1](https://api.phaseo.app/v1) with a server-side PHASEO\_API\_KEY.
&#x20; 4\. Use the official SDK for this language if there is one (@phaseo/sdk for TypeScript, phaseo for Python). Otherwise call the REST API.
&#x20; 5\. Check model IDs with GET /v1/models instead of inventing them. Use phaseo/free for a first test if no paid model has been chosen.
&#x20; 6\. Explain which files you will change and how you will verify the change before you edit. Never print or commit API keys.

Agents can also search these docs through [Docs MCP](https://phaseo.app/docs/v1/guides/integrations/docs-mcp.md), read the [capability summary](https://phaseo.app/docs/skill.md), or start from [llms.txt](https://phaseo.app/docs/llms.txt).


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