Skip to content

Claude Code ​

Claude Code speaks Anthropic Messages. Point two environment variables at LeekBox — nothing else changes.

Set it up from a GUI instead

Prefer not to edit config files: use CC-Switch (Claude Code / Codex) or Magpie (one place for every agent).

Install ​

bash
npm install -g @anthropic-ai/claude-code

Point it at LeekBox ​

bash
export ANTHROPIC_BASE_URL="https://leekbox.ai"
export ANTHROPIC_AUTH_TOKEN="sk-your-leekbox-key"
claude

The base URL is the bare domain (no /v1), and the variable is ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY.

Persist it ​

bash
# ~/.zshrc or ~/.bashrc
export ANTHROPIC_BASE_URL="https://leekbox.ai"
export ANTHROPIC_AUTH_TOKEN="sk-..."

On Windows PowerShell: setx ANTHROPIC_BASE_URL "https://leekbox.ai", then reopen the terminal.

Choose a model ​

bash
claude --model claude-sonnet-5

Troubleshooting ​

SymptomFix
Asked to log in / OAuth screenANTHROPIC_AUTH_TOKEN not set, or spelled as ANTHROPIC_API_KEY
401Key revoked, or the variable contains a newline or quotes
404 modelNot in your group — check Models & pricing
429Rate limited; retry after a few seconds or request a limit raise

LeekBox — unified AI gateway