Skip to content

Connect Claude Code to 211API

Get Claude Code running on 211API in five minutes: keep your existing habits while 211API relays model requests and unifies key & usage management.

Prerequisites

  • A 211API account with an API Key created in the console (starts with sk-).
  • Node.js 18 or later installed locally.

Step 1 · Install Claude Code

Install the official CLI globally via npm:

bash
npm install -g @anthropic-ai/claude-code

Step 2 · Set environment variables

Point Claude Code at 211API and pick a model. macOS / Linux (bash / zsh):

bash
# Add to ~/.zshrc or ~/.bashrc for persistence
export ANTHROPIC_BASE_URL="https://www.211api.com"
export ANTHROPIC_AUTH_TOKEN="sk-your-211API-key"
export ANTHROPIC_MODEL="fable-5"

Windows (PowerShell):

powershell
$env:ANTHROPIC_BASE_URL = "https://www.211api.com"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-211API-key"
$env:ANTHROPIC_MODEL = "fable-5"

# Persist at user level:
# setx ANTHROPIC_BASE_URL "https://www.211api.com"

Note

Model names follow the console "Models" list. To switch models, change ANTHROPIC_MODEL only — everything else stays the same.

Step 3 · Launch & verify

Start it in your project directory; inside the session, /status shows the current endpoint and model:

bash
cd your-project
claude

# Inside the session:
/status

If normal prompting works, you're connected. Every call's routing, token usage and multiplier details are visible in the 211API console in real time.

FAQ

401 auth failure — Make sure ANTHROPIC_AUTH_TOKEN holds a key created in the 211API console, not an official Anthropic key.

Connection timeout — Check that ANTHROPIC_BASE_URL has no extra path suffix, and keep your terminal proxy settings consistent with your network environment.

Console · Guides · www.211api.com