Claude Code CLI Setup
Route Claude Code through API Unlimit using ~/.claude/settings.json.
Install Claude Code
If you haven't installed Claude Code yet:
npm install -g @anthropic-ai/claude-code
node -v to check your version.Create settings.json
Create or edit ~/.claude/settings.json with the following content:
{
"hasCompletedOnboarding": true,
"env": {
"ANTHROPIC_BASE_URL": "https://apiunlimit.com/v1",
"ANTHROPIC_AUTH_TOKEN": "sk-YOUR_KEY_HERE"
}
}Replace sk-YOUR_KEY_HERE with the API key you received after purchase.
Key environment variables
ANTHROPIC_BASE_URLREQUIREDGateway endpoint — must include /v1
ANTHROPIC_AUTH_TOKENREQUIREDYour API key from API Unlimit dashboard
Alternative: environment variables
Instead of settings.json, you can export variables in your shell profile:
export ANTHROPIC_BASE_URL="https://apiunlimit.com/v1" export ANTHROPIC_AUTH_TOKEN="sk-YOUR_KEY_HERE"
Then run source ~/.bashrc to apply.
Test it
Open a terminal in any project and run:
claude "hello"
If configured correctly:
- check_circleClaude responds normally
- check_circleNo API error or unauthorized message
- check_circleUsage is tracked against your daily limit
buildTroubleshooting
Double-check that ANTHROPIC_AUTH_TOKEN matches the key in your dashboard exactly. No extra spaces or quotes.
Make sure the model IDs in settings.json match what's available on your plan. Try claude-sonnet-4-6 as a safe default.
Ensure the file is at ~/.claude/settings.json (not ~/.claude/settings.json.txt). Restart your terminal after editing.
Increase API_TIMEOUT_MS to 600000 (10 minutes) for long-running tasks. This is already set in the example above.
Don't have an API key yet?
Contact us on Zalo or Telegram — key activated within minutes after payment.
shopping_cartView Pricing