¶ Use Azyun.com in Claude Code
Claude Code can connect to a compatible gateway through environment variables.
Copy
curl -fsSL https://claude.ai/install.sh | bash
claude doctor
Copy
export ANTHROPIC_BASE_URL="https://www.azyun.com"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
cd /path/to/your/project
claude
Do I need to sign out of Claude or Anthropic?
Usually not. These environment variables make this terminal use the AzYun.com gateway. To restore the official service, run unset ANTHROPIC_BASE_URL ANTHROPIC_AUTH_TOKEN and reopen Claude Code.
You can also add the variables to ~/.claude/settings.json:
Copy
{
"env": {
"ANTHROPIC_BASE_URL": "https://www.azyun.com",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY"
}
}
Keep the key private
Do not commit or share a settings file containing your API key.
env | grep ANTHROPIC.