1. Quick Start Guides
AnyRoute English
  • AnyRoute User Guide
  • Frequently Asked Questions
  • AnyRoute Support Group
  • Supported Models
  • Environment Setup
    • Node.js Installation Guide
    • CC Switch Introduction
  • Quick Start Guides
    • Codex CLI Quick Start
    • Claude Code Quick Start
    • OpenClaw Quick Start
    • Hermes Quick Start
    • Cherry Studio Quick Start
    • Claude Desktop Quick Start
    • Codex Desktop Quick Start
    • GPT Image 2 Guide
    • Claude Code in VS Code
  • Advanced Guides
    • Personal AGENTS.md Global Rules
    • Claude Code and Codex Collaboration Guide
  1. Quick Start Guides

Claude Code Quick Start

Prerequisite: install Node.js#

Complete the Node.js Installation Guide, then verify:

1. Install Claude Code#

Verify the installation:
If npm reports a permissions error, use a Node.js version manager or configure a user-owned npm global prefix. Avoid running npm as root.

2. Create an AnyRoute API key#

1.
Sign in to the AnyRoute API Keys page.
2.
Select Create Key.
3.
Enter a name and select the Claude-compatible group and billing multiplier you need.
4.
Optionally configure IP restrictions, a spending limit, a rate limit, and an expiration date.
Open the API Keys page
Create a Claude-compatible key
An API key is an account credential. Never commit it to a repository or share it publicly.

3. Configure Claude Code#

Option A: CC Switch (recommended)#

Download CC Switch from the GitHub Releases page, then select Import to CCS in AnyRoute and enable the imported Claude configuration.
Import the Claude configuration into CC Switch
Enable the imported configuration
In the current screenshots, “导入到 CCS” means Import to CCS, and “启用” means Enable.

Option B: environment variables#

Copy the API key from the AnyRoute console:
Copy the API key
Set the following values for the current terminal session.
Windows PowerShell:
$env:ANTHROPIC_BASE_URL = "https://cc.anyroute.io"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_API_KEY"
macOS or Linux:
For regular use, prefer CC Switch or your operating system's secure credential-management method. If you persist these values in a shell profile or user environment, remember that the API key may be stored as plaintext.

4. Start Claude Code#

Open a terminal in your project directory and run:
Claude Code starts with the current directory as its workspace.

Troubleshooting#

claude is not recognized#

Run npm prefix --global, make sure the corresponding executable directory is on PATH, then open a new terminal.

The connection fails or returns HTTP 401#

Check that:
ANTHROPIC_BASE_URL is exactly https://cc.anyroute.io.
ANTHROPIC_AUTH_TOKEN is set in the same terminal session.
The key is active, unexpired, and assigned to a Claude-compatible group.

How do I switch models or billing groups?#

Create a key for the required group in the AnyRoute console, then switch profiles in CC Switch or update the environment variable in your current terminal.

Join AnyRoute WeChat Group

To get support for AnyRoute

scan QR code
Modified at 2026-07-24 19:03:06
Previous
Codex CLI Quick Start
Next
OpenClaw Quick Start
Built with