PrimeRouter × Claude Code

Install Claude Code in one clickwired to PrimeRouter

Download an installer with your API key already embedded and double-click it: it installs Claude Code, sets ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN, and backs up your shell profile before appending. Then open a new terminal and run claude. Pay as you go, balance never expires.

One-line install

Sign up or log in first — you will be brought back to the install step automatically. Already have an account? Log in

KEY
Your API key is embedded — nothing to paste
BACKUP
Your shell profile is backed up before one PrimeRouter block is appended
PROTOCOL
A byte-identical Anthropic endpoint — Claude Code just works
QUIET
Telemetry, error reporting and other non-essential traffic switched off
HOW IT WORKS

Three steps

01

Sign up or log in

Click “Get my installer”. If you are not logged in you will be taken to sign-up first, then brought back here; the source tag in your link is kept.

02

Download and run the installer

You get PrimeRouter-ClaudeCode-Installer.zip. Unzip it and double-click PrimeRouter-ClaudeCode-Installer.command. If macOS blocks the first launch, right-click the file → Open.

03

Start Claude Code

Open a new terminal (so the new environment variables load) and run claude.

ONE-LINE INSTALL

Already have an API key? One line

No web login needed: the script asks for your API key interactively and never writes it into the command or your shell history.

curl -fsSL https://primerouter.ai/install/claude-code.sh | bash

What it does: checks Node v22+ → installs @anthropic-ai/claude-code globally with npm if missing (asks first) → asks for your API key → backs up your shell profile, then appends ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1.

Script source: claude-code.sh · claude-code.ps1

No key yet? Create one on the API keys page.

Why PrimeRouter

Why run Claude Code through PrimeRouter

Pay as you go, balance never expires

Top up what you need — no subscription, no monthly reset.

Fiat or crypto top-up

Local payment methods, or USDT / USDC on multiple chains.

Zero risk to your personal accounts

Requests bill against the service's procurement quota, fully isolated from any account you hold with Anthropic.

One key, every coding tool

The same key also works with Codex, Gemini CLI, Cursor and any OpenAI- or Anthropic-protocol client.

FAQ

FAQ

Most likely a leftover ANTHROPIC_API_KEY in your terminal: Claude Code prefers it and bypasses PrimeRouter. Run unset ANTHROPIC_API_KEY (Windows: Remove-Item Env:ANTHROPIC_API_KEY), then open a new terminal. Read the guide →
The script writes the variables into your shell profile (macOS / Linux) or user-level environment variables (Windows); only a new terminal reads them. Read the guide →
It is generated for you only and contains one key from your account — do not forward it. If it leaks, delete or recreate that key on the API keys page; your other keys are unaffected. API keys page →
Use the Codex CLI install page or the Codex Desktop install page; the same key works for both. Codex CLI install page →

Wire up Claude Code now

One API key that also works with Codex, Gemini CLI and every OpenAI- or Anthropic-protocol client.