Skip to content

Claude Code

Anthropic Claude Code is Anthropic's official agentic CLI. PrimeRouter exposes a byte-identical Anthropic endpoint, so Claude Code "just works".

The easier route: the one-click install page

Open primerouter.ai/en/install/claude-code, sign in, and download an installer with your API key already embedded — it does everything on this page.

How it's wired

Claude Code reads ANTHROPIC_BASE_URL + ANTHROPIC_AUTH_TOKEN at startup. The installer appends them to .zshrc / .bashrc (macOS / Linux) or sets them as user-level environment variables on Windows. It also sets CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 to skip non-essential requests (telemetry, error reporting, update checks).

One-line installer

powershell
irm https://primerouter.ai/install/claude-code.ps1 | iex
bash
curl -fsSL https://primerouter.ai/install/claude-code.sh | bash

💡 What it does: ① verify Node v22+ ② install @anthropic-ai/claude-code globally if missing ③ prompt for the API key with hidden input ④ back up your shell rc file then append a single PrimeRouter block.

Open a new terminal and run:

bash
claude

Fallback: manual install

Full manual setup

See Coding Tools → Claude Code for the long-form guide. TL;DR:

  1. Install Node.js v22+
  2. npm install -g @anthropic-ai/claude-code
  3. Set three env vars:
    bash
    export ANTHROPIC_BASE_URL="https://primerouter.ai"
    export ANTHROPIC_AUTH_TOKEN="sk-your-key"
    export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
  4. Open a new terminal and run claude

Built for transparent, auditable, crypto-native AI inference. About · Terms · Privacy