Quick Start
This guide will help you get started with Claude Code provided by AIHubMix in just a few minutes.1. Install Claude Code
Local Installation
Install via npm
You need Node.js version 18 or higher.2. Configure AIHubMix API
To access AIHubMix’s model services via the compatible Anthropic API, you need to configure the following environment variables.- Set
ANTHROPIC_BASE_URLtohttps://aihubmix.com - Set
ANTHROPIC_AUTH_TOKENto the API Key obtained from the AIHubMix platform - Set
ANTHROPIC_MODELto a supported model from the model list.
- macOS
- Windows
- Run the following command in the terminal to check your default Shell type.
- Set the environment variables according to your Shell type using the following commands:
- Run the following command in the terminal to make the environment variables effective.
- Open a new terminal and run the following commands to check if the environment variables are effective.
3. Get Started
Once the configuration is complete, navigate to your working directory and run theclaude command in the terminal to start using Claude Code.

- Locate the
.claude.jsonfile in your user home directory, with the following paths:- macOS / Linux:
~/.claude.json - Windows:
C:\Users\%USERNAME%\.claude.json
- macOS / Linux:
- Set the
hasCompletedOnboardingfield’s value totrue.
- Save the file, then rerun
claudein the terminal.
(Optional) Additional Model Configuration Methods
Claude Code supports the following model configuration methods, ranked in order of priority from highest to lowest, where higher-priority configurations will override lower-priority ones.- During a conversation: Execute the
/model <model_name>command to switch models. This is suitable for temporary model changes.
- When starting Claude Code: Execute
claude --model <model_name>to specify the model. This is suitable for single-session use.
- Set environment variables: You can configure different levels of models based on the complexity of the task. Claude Code will automatically select the appropriate model based on the task type. This is suitable for global effects.
ANTHROPIC_DEFAULT_OPUS_MODEL: For complex reasoning, architectural design, and other high-difficulty tasks.ANTHROPIC_DEFAULT_SONNET_MODEL: For coding, feature implementation, and other routine tasks.ANTHROPIC_DEFAULT_HAIKU_MODEL: For grammar checks, file searches, and other simple tasks.
- Permanently set in the settings.json configuration file: Create a
settings.jsonfile in the project root directory or user home directory, and write the model configuration information for project-level or user-level permanent configuration.
Configure via cc-switch
- Run CC-Switch and click “Add Vendor.”

- Select “AiHubMix” from the preset list.

- Fill in your key in the “API Key” field.

- After configuration is complete, click “Add” to save the settings.

- Return to the homepage, select “AiHubMix” from the vendor list, and click “Start” to use it.

Frequently Asked Questions
Q: When using Claude Code, I receive the message “401, No token provided…”
Open the Claude terminal and enter/config, find the Use custom API key option, and check whether the Token is configured correctly.

Q: After successfully installing on macOS, I still get an error: zsh: command not found: claude
This is because the Claude CLI is installed, but its executable directory is not added to the system PATH.
- Confirm the Claude installation path. The official Claude Code script typically installs in one of the following directories:
~/.claude/bin~/.local/bin
- Add the installation directory to the PATH. Execute the corresponding command based on the actual installation location:
Case A: Installed in ~/.claude/bin
Case B: Installed in ~/.local/bin
- Verify if it takes effect. Execute:
claude path and version number, the installation was successful.
Q: Claude Code Unable to Connect to Anthropic Services
After upgrading to the latest version of Claude Code, if you encounter issues connecting to Anthropic services or authentication failures, it is typically due to changes in the authentication request header name. The new version requires updating the request header fromANTHROPIC_API_KEY to ANTHROPIC_AUTH_TOKEN. The value of the API Key does not need to be changed; you only need to update the request header name and reload the configuration. For specific instructions, please refer to this document for reconfiguration.