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-codePoint it at LeekBox
bash
export ANTHROPIC_BASE_URL="https://leekbox.ai"
export ANTHROPIC_AUTH_TOKEN="sk-your-leekbox-key"
claudeThe 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-5Troubleshooting
| Symptom | Fix |
|---|---|
| Asked to log in / OAuth screen | ANTHROPIC_AUTH_TOKEN not set, or spelled as ANTHROPIC_API_KEY |
| 401 | Key revoked, or the variable contains a newline or quotes |
| 404 model | Not in your group — check Models & pricing |
| 429 | Rate limited; retry after a few seconds or request a limit raise |