CLI setup guide

Claude Code CLI custom API setup

Set ANTHROPIC_BASE_URL to CallAI and use Claude Code CLI without a foreign card. Claude 3.7 Sonnet with pay-as-you-go.

📋 Claude Code CLI config cheatsheetProduction-ready
ANTHROPIC_BASE_URL
https://api.callaiapi.com/v1
ANTHROPIC_API_KEY
sk-live-your-callai-key

Recommended models for Claude Code CLI

Step-by-step setup

1

Set shell environment variables

Append CallAI redirect vars to ~/.zshrc or ~/.bashrc.

export ANTHROPIC_BASE_URL="https://api.callaiapi.com/v1"
export ANTHROPIC_API_KEY="sk-live-your-callai-key"
2

Start the interactive terminal

Run source ~/.zshrc, then type claude.

claude

Troubleshooting

❌ Symptom:Repo-wide scans burn too many tokens
💡 Fix: Create .claudeignore and exclude node_modules, dist, .git.
Deep-dive guide
Want advanced tips, rules files, and common pitfalls for Claude Code CLI?
Read full guide →
API still unreachable after setup?
Use the HTTP status checker to test connectivity and diagnose 403 / 401 errors.
Open status checker →