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

# Coding Agents

> Connect coding agents to Phaseo with the CLI or manual provider settings.

Use this guide to connect coding agents to Phaseo. Choose the Phaseo CLI when you want managed credentials and configuration, or use the manual provider values when you want to keep setup inside the agent.

## Choose a setup

| You want to… | Use |
| - | - |
| Launch Cline, Kilo Code, oh-my-pi, Muse Code, or MiniMax Code with isolated temporary settings | `phaseo cline`, `phaseo kilo`, `phaseo omp`, `phaseo muse`, or `phaseo minimax` |
| Configure an installed agent and keep its settings | `phaseo <integration>` |
| Configure an agent without the Phaseo CLI | Follow the manual provider steps in the dedicated guide |

## Set up with the Phaseo CLI

Sign in once, then configure your coding harness:

```bash theme={null}
phaseo login
phaseo codex
```

This command checks whether the harness is installed. When it is missing in an interactive terminal, Phaseo shows the supported install command and asks before running it. Phaseo then creates the harness's dedicated key and writes its configuration. Non-interactive runs print actionable installation guidance without making an unattended system change. OpenCode, fx, DeepSeek Harness, Pi, Prime Agent, and OpenClaw also receive every active text model compatible with Chat Completions. Use `--skip-install`, `--catalog default`, or `--dry-run` when you need narrower behavior.

Use the product-named command for any persistent integration:

```bash theme={null}
phaseo codex
```

Supported integration names are `codex`, `claude-code`, `opencode`, `fx`, `deepseek-harness`, `pi`, `openclaw`, `hermes`, `aider`, `cline`, `roo-code`, `kilo-code`, `continue`, `cursor`, and `zed`. The isolated CLI runners are `cline`, `kilo`, `omp`, `muse`, and `minimax`.

The CLI creates a separate API key named for that assistant, which expires after 90 days and has a \$100 monthly spend limit. It configures Aider and Continue automatically on clean installations, and writes Zed's provider/model settings automatically. For assistants that keep secrets exclusively in an editor UI, it prints the exact remaining fields, links the dedicated guide, and lets you copy only that assistant's key:

```bash theme={null}
phaseo integrations credential codex
```

Preview any file changes before setup, and disconnect cleanly later:

```bash theme={null}
phaseo codex --dry-run
phaseo integrations remove codex
```

Removal deletes Phaseo-owned configuration and revokes that assistant's key. It does not remove unrelated settings.

## Manual provider settings

Use these values unless the tool asks for a different field name:

| Setting | Value |
| - | - |
| Provider type | OpenAI Compatible |
| Base URL | `https://api.phaseo.app/v1` |
| API key | Your Phaseo API key |
| Model | A Phaseo model id, such as `openai/gpt-5-nano` |

For Anthropic-compatible tools, use:

| Setting | Value |
| - | - |
| Base URL | `https://api.phaseo.app` |
| Auth token | Your Phaseo API key |
| Model | A Phaseo model id, such as `anthropic/claude-sonnet-4.5` |

## Cursor

Cursor supports custom OpenAI-compatible endpoints through its OpenAI API key settings.

1. Open `Cursor Settings`.
2. Go to `Models`.
3. Enable or add the `OpenAI API Key` entry.
4. Paste your Phaseo API key.
5. Enable `Override OpenAI Base URL`.
6. Set the base URL to `https://api.phaseo.app/v1`.
7. Add a custom model using a Phaseo model id, for example `openai/gpt-5-nano`.
8. Enable the model and verify it from the Cursor model picker.

If Cursor rejects a model id with `/`, create the closest local alias the UI allows and route that alias to the Phaseo model in your own config when the client supports aliases.

## VS Code

VS Code supports adding models through the Language Models editor when the OpenAI-compatible provider is available in your VS Code or Insiders build.

1. Open the Command Palette.
2. Run `Chat: Manage Language Models`.
3. Choose `OpenAI Compatible` or `OAI Compatible`.
4. Enter your Phaseo API key.
5. Set the endpoint or base URL to `https://api.phaseo.app/v1`.
6. Add a Phaseo model id, for example `openai/gpt-5-nano`.
7. Select the new model from the chat model picker.

If your VS Code build does not show an OpenAI-compatible provider, use an extension that supports custom providers, such as Continue, Cline, Roo Code, or Kilo Code.

## Continue

Continue can use Phaseo through its OpenAI provider with a custom API base.

```yaml theme={null}
name: Phaseo
version: 0.0.1
schema: v1

models:
  - name: Phaseo GPT-5 Nano
    provider: openai
    model: openai/gpt-5-nano
    apiKey: ${{ secrets.PHASEO_API_KEY }}
    apiBase: https://api.phaseo.app/v1
    roles:
      - chat
      - edit
      - apply
```

For models where Continue defaults to Responses but your workflow needs Chat Completions compatibility, set `useResponsesApi: false`.

## Cline, Roo Code, and Kilo Code

These tools expose similar provider settings.

1. Open the extension settings.
2. Choose `OpenAI Compatible` as the provider.
3. Set the base URL to `https://api.phaseo.app/v1`.
4. Paste your Phaseo API key.
5. Enter a Phaseo model id.
6. Save and run a small chat request before using file-editing tools.

## Aider

Set OpenAI-compatible environment variables and pass the model on launch:

```bash theme={null}
export OPENAI_API_BASE="https://api.phaseo.app/v1"
export OPENAI_API_KEY="your_phaseo_api_key"
aider --model openai/openai/gpt-5-nano
```

Aider often expects OpenAI-compatible custom models to be prefixed with `openai/`. Because Phaseo model ids already include provider prefixes, the full Aider model string may look like `openai/openai/gpt-5-nano`.

## Pi, Prime Agent, OpenClaw, and Hermes Agent

`phaseo pi` adds a dedicated provider extension that resolves its key from the Phaseo CLI at runtime. `phaseo prime-agent` writes a command-backed provider to `~/.prime/agent/models.json`. Both receive the compatible Phaseo model catalog. `phaseo openclaw` registers the compatible model catalog plus an exec-backed SecretRef, without placing the API key in `openclaw.json`.

`phaseo hermes` offers to run the official Nous Research installer when Hermes is missing, then configures the installed agent. It saves the previous Hermes model settings, configures Phaseo as the custom endpoint, and writes the dedicated key to Hermes' `.env` file as `OPENAI_API_KEY`, inside a block marked `# >>> phaseo managed (do not edit)`, so the key is never passed on a command line and your other lines are left alone. Phaseo asks Hermes where that file is: usually `~/.hermes/.env`, `%LOCALAPPDATA%\hermes\.env` on native Windows, or the `.env` in `HERMES_HOME`. It also sets Hermes' `model.key_env` to `OPENAI_API_KEY` so Hermes sends the key to Phaseo; run `hermes update` first if your Hermes version does not support `model.key_env`. Hermes deliberately uses this plaintext file for provider credentials; protect it like any other API-key file. Removal restores the previous model settings, removes `OPENAI_API_KEY`, deletes Phaseo's recovery state, and revokes the key.

## MiniMax Code

Use the dedicated [MiniMax Code guide](https://phaseo.app/docs/v1/guides/integrations/minimax-code.md) for the `mcode` CLI. `phaseo minimax` creates a temporary MiniMax provider with the Phaseo OpenAI-compatible endpoint, launches the CLI, and removes the temporary data directory when the session ends. MiniMax Code also supports ACP through `mcode acp` when an editor or host speaks ACP directly.

## Zed

Run `phaseo zed`, then follow the printed steps to add an OpenAI-compatible provider in Zed's settings. Use the generated key only in Zed's credential prompt.

## Codex

Use the dedicated [Codex guide](https://phaseo.app/docs/v1/guides/integrations/codex.md) for Codex CLI, Codex App, and the Codex IDE extension. The short version is:

```toml theme={null}
model = "openai/gpt-5.5"
model_provider = "phaseo"

[model_providers.phaseo]
name = "Phaseo"
base_url = "https://api.phaseo.app/v1"
env_key = "PHASEO_API_KEY"
wire_api = "responses"
```

Codex custom providers use the Responses wire protocol.

## OpenCode

Use the dedicated [OpenCode guide](https://phaseo.app/docs/v1/guides/integrations/opencode.md) when you want OpenCode to call Phaseo through an OpenAI-compatible custom provider.

## fx

Use the dedicated [fx guide](https://phaseo.app/docs/v1/guides/integrations/fx.md) to add Phaseo as a custom model connection in Vercel Labs' fx coding agent.

## Claude Code

Use the dedicated [Claude Code guide](https://phaseo.app/docs/v1/guides/integrations/claude-code.md). Claude Code uses Anthropic-compatible gateway environment variables:

```bash theme={null}
export ANTHROPIC_BASE_URL="https://api.phaseo.app"
export ANTHROPIC_AUTH_TOKEN="your_phaseo_api_key"
export ANTHROPIC_API_KEY=""
```

Then start Claude Code from the same shell:

```bash theme={null}
claude
```

## Claude Desktop

Claude Desktop supports MCP servers, but it does not expose the same custom model-provider setup as coding agents such as Cursor, Codex, or Claude Code. Use [Docs MCP](https://phaseo.app/docs/v1/guides/integrations/docs-mcp.md) to add Phaseo documentation context to Claude Desktop. Use Claude Code when you need Phaseo to be the model gateway.

## Deep Agents CLI and LangChain tools

Use the same base URL and API key settings as [LangChain](https://phaseo.app/docs/v1/guides/integrations/langchain.md). If the tool reads OpenAI environment variables, set:

```bash theme={null}
export OPENAI_API_KEY="your_phaseo_api_key"
export OPENAI_BASE_URL="https://api.phaseo.app/v1"
```

Then pass a Phaseo model id in the tool's model field.

## Notes

* Coding agents vary in how they handle slashes in model ids. If the UI rejects `openai/gpt-5-nano`, create a local alias if the tool supports aliases.
* Test file-editing workflows carefully. `phaseo:apply_patch` is Responses-only.
* Add [Docs MCP](https://phaseo.app/docs/v1/guides/integrations/docs-mcp.md) when you want the assistant to read Phaseo docs during a session.
* Prefer Chat Completions for older coding tools unless the tool explicitly supports Responses events and server tools.

## Related

* [Server Tools](https://phaseo.app/docs/v1/guides/server-tools.md)
* [Responses](https://phaseo.app/docs/v1/api-reference/endpoint/responses.md)
* [Chat Completions](https://phaseo.app/docs/v1/api-reference/endpoint/chat-completions.md)


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