Prerequisite: install Node.js#
1. Install Claude Code#
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#
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.
An API key is an account credential. Never commit it to a repository or share it publicly.
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.In the current screenshots, “导入到 CCS” means Import to CCS, and “启用” means Enable.
Option B: environment variables#
Copy the API key from the AnyRoute console:Set the following values for the current terminal session.$env:ANTHROPIC_BASE_URL = "https://cc.anyroute.io"
$env:ANTHROPIC_AUTH_TOKEN = "YOUR_API_KEY"
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#
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 codeModified at 2026-07-24 19:03:06