API Unlimit
/Docs/Claude Code (CLI)
Setup Guide

Claude Code CLI Setup

Route Claude Code through API Unlimit using ~/.claude/settings.json.

computermacOS / Linux / Windows (WSL)schedule~1 minute
1

Install Claude Code

If you haven't installed Claude Code yet:

bash
npm install -g @anthropic-ai/claude-code
info
Requires Node.js 18+. Run node -v to check your version.
2

Create settings.json

Create or edit ~/.claude/settings.json with the following content:

~/.claude/settings.json
{
  "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.

3

Key environment variables

ANTHROPIC_BASE_URLREQUIRED

Gateway endpoint — must include /v1

ANTHROPIC_AUTH_TOKENREQUIRED

Your API key from API Unlimit dashboard

4

Alternative: environment variables

Instead of settings.json, you can export variables in your shell profile:

~/.bashrc or ~/.zshrc
export ANTHROPIC_BASE_URL="https://apiunlimit.com/v1"
export ANTHROPIC_AUTH_TOKEN="sk-YOUR_KEY_HERE"

Then run source ~/.bashrc to apply.

5

Test it

Open a terminal in any project and run:

bash
claude "hello"

If configured correctly:

  • check_circleClaude responds normally
  • check_circleNo API error or unauthorized message
  • check_circleUsage is tracked against your daily limit
check_circle
You're all set! Daily limit resets at 9:00 AM UTC+7.

buildTroubleshooting

warning401 Unauthorized

Double-check that ANTHROPIC_AUTH_TOKEN matches the key in your dashboard exactly. No extra spaces or quotes.

warningModel not found

Make sure the model IDs in settings.json match what's available on your plan. Try claude-sonnet-4-6 as a safe default.

warningsettings.json not picked up

Ensure the file is at ~/.claude/settings.json (not ~/.claude/settings.json.txt). Restart your terminal after editing.

warningTimeout errors

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