What you need
- Claude Code installed (`claude` on your PATH).
- An UplinkSwitch key from the console, with a balance loaded.
Two variables
ANTHROPIC_API_KEY works in place of ANTHROPIC_AUTH_TOKEN. Set one, not both.
shell
export ANTHROPIC_BASE_URL="https://api.uplinkswitch.com/v1"
export ANTHROPIC_AUTH_TOKEN="sk-uplink-live-..."
claudeMake it stick
Add them to ~/.claude/settings.json under env. The model variables take any id from the Models page.
settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.uplinkswitch.com/v1",
"ANTHROPIC_AUTH_TOKEN": "sk-uplink-live-...",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
}
}Check it
List the models your key can call:
shell
curl https://api.uplinkswitch.com/v1/models -H "x-api-key: $ANTHROPIC_AUTH_TOKEN"Then run claude. The request shows in the console within seconds.
Good to know
- MCP tool search is off on a non-Anthropic host;
ENABLE_TOOL_SEARCH=trueturns it on. - Prompt caching works; cached input bills at the cached rate.
- To switch back:
unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN.