Configure Claude Code

Set two environment variables to route all Claude Code requests through Chuizi.AI with native Anthropic protocol passthrough.

VariableValuePurpose
ANTHROPIC_BASE_URLhttps://api.chuizi.ai/anthropicAPI endpoint URL
ANTHROPIC_API_KEYck-your-key-hereYour Chuizi.AI API key

Make sure to use the /anthropic path. This is the native Anthropic protocol endpoint with zero format conversion, giving you the best performance and full compatibility with all Claude Code features including streaming, tool use, and prompt caching.

Add the environment variables to your shell profile so they're set automatically every time you open a terminal.

zsh users (macOS default):

terminal
bash
echo 'export ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic' >> ~/.zshrc
echo 'export ANTHROPIC_API_KEY=ck-your-key-here' >> ~/.zshrc
source ~/.zshrc

bash users (most Linux distributions):

terminal
bash
echo 'export ANTHROPIC_BASE_URL=https://api.chuizi.ai/anthropic' >> ~/.bashrc
echo 'export ANTHROPIC_API_KEY=ck-your-key-here' >> ~/.bashrc
source ~/.bashrc

Once configured, just run:

terminal
bash
claude

Next Steps