Powered by Aihubmix, Claude Code ensures a stable connection and eliminates worries about purchasing quotas.

Quick Setup Guide:

1️⃣ Install the npm Package Globally

Run the following command in your terminal:
npm install -g @anthropic-ai/claude-code
Example image: install

2️⃣ Configure Environment Variables

Go to Aihubmix Keys page to generate your API key, then add this key and the forwarding URL to your system environment variables. For example, add the following lines to your ~/.zshrc file:
export ANTHROPIC_API_KEY="sk-***"
export ANTHROPIC_BASE_URL="https://aihubmix.com"
For Mac users, you can reveal the hidden .zshrc file in your home directory by pressing ⌘ + ⇧ + .. Open it with the system’s “TextEdit” app and add the above lines.

3️⃣ Apply the Configuration

After adding the configuration, run source ~/.zshrc in your terminal and press Enter to apply the changes.

4️⃣ Launch in Terminal

Navigate to your project directory, for example cd ~/Desktop/my-project
Then type claude to start and begin using Claude Code.

Initialization Configuration

Authorization

If you see an authorization page, click to jump to the Claude website for confirmation. After successful authorization, return to the terminal to continue. auth If you’d like to skip the verification step and route requests through Aihubmix directly, just open the .claude.json file in your user directory and add this line:
  "hasCompletedOnboarding": true,

Launch

After launching, Claude Code will display the current configuration details, including your API Key and API Base URL.
Confirm the prompts by selecting Yes and pressing Enter to complete the setup.
initialization For example: Claude detects a custom KEY in the system environment variables — select Yes.
Detected a custom API key in your environment

ANTHROPIC_API_KEY: sk-***
Do you want to use this API key?

> 1. Yes
2. No(recommended)

Enter to confirm .Esc to cancel

Switch Model

Use the Claude Code command:
/model [model id]
The default model is Sonnet 4, but you can switch to a more powerful one like Opus 4:
opus
/model opus
Or, switch to another Claude model:
/model  claude-3-7-sonnet-20250219

Kimi K2 Support

After launching Claude Code, simply run the following command:
/model moonshotai/kimi-k2-instruct
Enjoy coding with Claude!