One-click setup (recommended)
One command installs the CLI, writes the gateway config, and verifies your key with a 1-token test request. Existing config files are backed up automatically.
The key is only inserted into the command locally in your browser; it is never uploaded.
curl -fsSL https://router.one/install/claude-code.sh | bash -s -- sk-your-api-keyConfig takes effect immediately — run claude to start.
Review the script before running: /install/claude-code.sh · /install/claude-code.ps1
Manual setup
Prefer to see every step, or need to customize? Configure each tool manually below.
Claude Code CLI Setup Guide
Configure Claude Code CLI to use Router One as a proxy for unified routing, cost controls, and full observability.
sk-xxx).Install Node.js via Homebrew
Claude Code CLI requires Node.js 18 or later.
brew install nodenode --versionInstall Claude Code CLI globally
npm install -g @anthropic-ai/claude-codeConfigure environment variables
Point Claude Code at Router One as its API endpoint.
rm -rf ~/.claudeTemporary (current terminal session only):
export ANTHROPIC_BASE_URL=https://api.router.one
export ANTHROPIC_AUTH_TOKEN=sk-your-api-keyPermanent (write to shell config):
echo 'export ANTHROPIC_BASE_URL=https://api.router.one' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN=sk-your-api-key' >> ~/.zshrc
source ~/.zshrcLaunch Claude Code
Run this to start the CLI:
claude