Apigator by MixerBox

Claude Code CLI

Use Claude Code with Apigator

Point the Claude Code CLI at our gateway and it runs on your Apigator credits — streaming, same workflow, billed as API Usage Billing (not your personal subscription).

1 · Prerequisites

2 · Fastest — one command

A script writes ~/.claude/settings.json for you (backs up + merges your existing settings). Paste your key when prompted:

curl -fsSL https://apigator.ai/setup-claude-cli.sh | bash

Then claude /logout (once, if you have a personal login) → claude. Done. Prefer to read it first? View the script.

Want to switch back to your personal Claude subscription later? curl -fsSL https://apigator.ai/setup-claude-cli.sh | bash -s revert then claude /login.

3 · Manual setup — via settings.json

export only lasts one terminal session. For a permanent default, put it in Claude Code's settings — applied on every launch.

If you have a personal Claude login, log out once so it never falls back to your subscription:

claude /logout

Create ~/.claude/settings.json:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://claude.apigator.ai",
    "ANTHROPIC_API_KEY": "sk-your-apigator-key",
    "ANTHROPIC_MODEL": "claude-opus-4-8",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-4-5"
  }
}

Then just run claude. No export, no --bare, nothing to re-set. (Don't commit a settings file with your key.)

Do I need --bare?

No — it's optional. It only forces strict ANTHROPIC_API_KEY auth and skips the confirm prompt.

SituationWhat to do--bare
Apigator as default, no promptsclaude /logout once + settings.jsonnot needed
Keep personal login, use Apigator nowset env, run claude, answer Yesnot needed
Force Apigator every run, skip promptadd --barerequired

Models

claude-opus-4-8Claude Opus 4.8 (pinned)
claude-sonnet-4-6Claude Sonnet 4.6 (pinned)
claude-haiku-4-5Claude Haiku 4.5 (pinned)
opus / sonnet / haikulatest in that family

Verify

claude -p "Reply with exactly: apigator ok"

Using an AI agent? Hand it the raw setup file to self-configure: /claude-cli.md — plain markdown, meant for an agent to read (not a styled page).