Claude Code
Claude Code can use an Anthropic-compatible gateway. Configure the gateway URL as UURoute and authenticate with your UURoute API key.
Environment Variables
Section titled “Environment Variables”export UUROUTE_API_KEY="<UUROUTE_API_KEY>"export ANTHROPIC_BASE_URL="https://portal-api.stag.uuroute.net/"export ANTHROPIC_AUTH_TOKEN="$UUROUTE_API_KEY"If your local Claude Code setup expects an API key variable instead of a bearer token variable, use:
export ANTHROPIC_API_KEY="$UUROUTE_API_KEY"Run Claude Code
Section titled “Run Claude Code”claude --model claude-sonnet-4.5You can also use any Anthropic-compatible model available in your UURoute account, such as:
claude --model claude-opus-4.5Persistent Shell Setup
Section titled “Persistent Shell Setup”Add the same variables to your shell profile if you want Claude Code to use UURoute by default:
export UUROUTE_API_KEY="<UUROUTE_API_KEY>"export ANTHROPIC_BASE_URL="https://portal-api.stag.uuroute.net/"export ANTHROPIC_AUTH_TOKEN="$UUROUTE_API_KEY"Restart your shell after updating the profile.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Check |
|---|---|
| Authentication error | Confirm that ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY contains your UURoute API key. |
| Model not found | Confirm the model name in the UURoute console or call /v1/models. |
| Requests still go to Anthropic directly | Confirm ANTHROPIC_BASE_URL is exported in the same shell session that starts Claude Code. |