ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. No model name is needed — BetterToken routes automatically.
Prerequisites
- Claude Code installed (see Claude Code docs)
- BetterToken API Key (register here)
Setup
Edit the Claude Code config file
Config file location:
- macOS / Linux:
~/.claude/settings.json - Windows:
%USERPROFILE%\.claude\settings.json
YOUR_API_KEY with your BetterToken API Key):Unlike other relay services, BetterToken does not require you to set
ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL, or any other model variables. BetterToken routes to the appropriate Claude model automatically.Complete onboarding (first-time only)
If this is your first time using Claude Code, edit
~/.claude.json to skip the onboarding flow:VS Code extension
If you use the Claude Code VS Code extension:Verify
Start Claude Code and send a message. A normal response confirms the connection is working. If you see an auth error, check thatANTHROPIC_AUTH_TOKEN is set to your BetterToken API Key and run echo $ANTHROPIC_AUTH_TOKEN to confirm no stale env var is overriding it.