Claude Code supports third-party LLM gateways via environment variables. Phaseo exposes an Anthropic-compatible surface at /v1/messages, so you can point Claude Code at Phaseo without changing your prompts.
If you want Claude Code to read the live Phaseo documentation during a session, add the Docs MCP server too.
Prerequisites
- A Phaseo API key.
- Claude Code installed locally.
1) Set gateway environment variables
export ANTHROPIC_BASE_URL="https://api.phaseo.ai"
export ANTHROPIC_AUTH_TOKEN="your_phaseo_api_key"
export ANTHROPIC_API_KEY=""
$env:ANTHROPIC_BASE_URL = "https://api.phaseo.ai"
$env:ANTHROPIC_AUTH_TOKEN = "your_phaseo_api_key"
$env:ANTHROPIC_API_KEY = ""
2) Pick a model (optional)
Set ANTHROPIC_MODEL if you want a fixed default. Use model ids listed in Models.
3) Start Claude Code
Endpoint mapping
- Claude Code calls Anthropic-style endpoints (
/v1/messages).
- Phaseo handles those requests through Anthropic Messages.
Compatibility notes
ANTHROPIC_AUTH_TOKEN is sent as an Authorization header, which Phaseo accepts.
- You can also set
ANTHROPIC_MODEL to A Phaseo model id when you want Claude Code to use one default model.
- Current limitation: streaming + tools on Anthropic Messages can return
400 invalid_request. If your workflow depends on streamed tool loops, test this path before broad rollout.
Last modified on July 9, 2026