Claude Code
Run Anthropic's terminal coding agent on your key and our models.
Claude Code speaks Anthropic's Messages format, which we serve at https://pinerouter.ai/v1/messages. Any text model on the Models page can answer it.
1. Install
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iexOr with Node.js 18 or newer: npm install -g @anthropic-ai/claude-code.
2. Point it at us
Add this to ~/.claude/settings.json (create the file if it does not exist):
{
"env": {
"ANTHROPIC_BASE_URL": "https://pinerouter.ai",
"ANTHROPIC_AUTH_TOKEN": "sk-...",
"ANTHROPIC_MODEL": "gpt-5-2",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gemini-3-8-flash"
}
}| Variable | Meaning |
|---|---|
ANTHROPIC_BASE_URL | Our address, without /v1 |
ANTHROPIC_AUTH_TOKEN | Your API key |
ANTHROPIC_MODEL | The main model; any text model id from Models |
ANTHROPIC_DEFAULT_HAIKU_MODEL | A fast, cheap model for background tasks |
Or set the same variables in your shell for one session:
export ANTHROPIC_BASE_URL="https://pinerouter.ai"
export ANTHROPIC_AUTH_TOKEN="sk-..."
export ANTHROPIC_MODEL="gpt-5-2"3. Run
cd your-project
claudeType /status to check the address and model in use. Usage shows up under Usage logs.
Add our media models as tools
Claude Code can also generate images, video and audio through our MCP server:
claude mcp add --transport http ai https://pinerouter.ai/mcp --header "Authorization: Bearer sk-..."See MCP.
