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

# OpenClaw

> Register Phaseo as an OpenClaw model provider, with the key read from the Phaseo CLI.

Run `phaseo openclaw` to register a `phaseo` model provider in OpenClaw with every compatible Phaseo model, or add the provider with `openclaw config set` yourself.

## Set up with the Phaseo CLI

```bash theme={null}
phaseo login
phaseo openclaw --model openai/gpt-6-astra
```

If OpenClaw is missing, the CLI shows the install command (`npm install -g openclaw@latest`, or the same package with pnpm, Yarn or Bun) and asks before running it. Setup then runs `openclaw config set` twice:

* **`secrets.providers.phaseo_cli`**: an exec secret provider that runs `phaseo integrations credential openclaw` to read the key. The key is never written to OpenClaw's config.
* **`models.providers.phaseo`**: a provider with base URL `https://api.phaseo.app/v1`, API type `openai-completions`, and the key taken from `phaseo_cli`. It lists every active Phaseo text model that works with Chat Completions, with the `--model` value first (`anthropic/claude-sonnet-4.6` without it).

The key is a `Phaseo CLI: OpenClaw API Key` that expires after 90 days and has a \$100 monthly spend limit. When OpenClaw asks the CLI for the key after it has expired, the CLI creates a new one.

Setup doesn't change OpenClaw's default model. Select the Phaseo model with `openclaw models set` when you're ready. Use `--catalog default` to register only the selected model.

## Configure OpenClaw manually

Register a secret provider that prints your key, then the Phaseo model provider:

```bash theme={null}
openclaw config set secrets.providers.phaseo_cli \
  '{"source":"exec","command":"phaseo","args":["integrations","credential","openclaw"],"jsonOnly":false}' \
  --strict-json

openclaw config set models.providers.phaseo '{
  "baseUrl": "https://api.phaseo.app/v1",
  "apiKey": { "source": "exec", "provider": "phaseo_cli", "id": "value" },
  "api": "openai-completions",
  "models": [
    { "id": "openai/gpt-6-astra", "name": "openai/gpt-6-astra via Phaseo", "reasoning": false, "input": ["text"] }
  ]
}' --strict-json
```

Each entry in `models` takes an `id` (the Phaseo model ID), a `name`, `reasoning`, `input` (`text`, `image`) and an optional `contextWindow`. Add an entry for every Phaseo model you want OpenClaw to list.

## Check it works

Run `openclaw config get models.providers.phaseo --json` to confirm the provider is registered. Select a Phaseo model with `openclaw models set`, and send a short prompt. Confirm the request appears in **Settings → Usage → Logs**.

## Remove Phaseo

```bash theme={null}
phaseo integrations remove openclaw
```

This unsets `models.providers.phaseo` and `secrets.providers.phaseo_cli`, then revokes the key. Your other OpenClaw settings stay. Restart the OpenClaw gateway if it's running.

## Fix common problems

| Problem | Fix |
| - | - |
| `OpenClaw already defines models.providers.phaseo` | Setup won't overwrite an existing `phaseo` provider. Remove or rename it, or run `phaseo integrations remove openclaw`, then set up again. |
| Requests fail after you move or reinstall the Phaseo CLI or Node.js | Setup saves the exact Node.js and CLI paths in `secrets.providers.phaseo_cli`. Run `phaseo integrations remove openclaw`, then `phaseo openclaw` again. |
| `OpenClaw is not installed or is not on PATH` | Install OpenClaw or add it to `PATH`, then rerun setup. |
| A model is rejected | Check the exact ID with the [Models endpoint](https://phaseo.app/docs/v1/api-reference/endpoint/models.md). |

For other agents and the provider values every agent needs, see [Coding Agents](https://phaseo.app/docs/v1/guides/integrations/coding-assistants.md).


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