Skip to main content

1. Install Node.js (Skip if installed)

Ensure Node.js version ≥ 18.0

Uninstall Other Proxy Clients (Optional)

Check installation:
npm ls @anthropic-ai/claude-code
npm ls -g @anthropic-ai/claude-code
Uninstall:
npm uninstall @anthropic-ai/claude-code
npm uninstall -g @anthropic-ai/claude-code

2. Install Claude Code

npm install -g @anthropic-ai/claude-code
Verify installation:
claude --version

3. Get API Key

base_url = "https://llm.ai-nebula.com"
api_key = "sk-zbTYx*******************************fceTvn5"

4. Configure Environment Variables

Basic Configuration Example

export ANTHROPIC_BASE_URL="https://llm.ai-nebula.com"
export ANTHROPIC_AUTH_TOKEN="sk-zbTYx*******************************fceTvn5"
export ANTHROPIC_MODEL="kimi-k2-250905"
cd your-project-folder
claude

Dual Model Configuration

Claude Code uses a dual-threaded model architecture by default:
  • Main Thread Model: Configured via ANTHROPIC_MODEL environment variable
    • Used for primary code generation, conversations, and complex task processing
  • Secondary Thread Model: Configured via ANTHROPIC_DEFAULT_HAIKU_MODEL environment variable
    • Purpose: Lightweight / fast-task model
    • Use cases:
      • Background tasks (file monitoring, linter checks, etc.)
      • Quick responses (simple questions, completion suggestions)
      • Low-priority auxiliary tasks
export ANTHROPIC_BASE_URL="https://llm.ai-nebula.com"
export ANTHROPIC_AUTH_TOKEN="sk-zbTYx*******************************fceTvn5"
export ANTHROPIC_MODEL="kimi-k2-250905"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5-20251001"
cd your-project-folder
claude

Single Model Configuration (Optional)

If you only need to use a single model, there are two configuration methods: Method 1: Configure both environment variables to the same model Set both ANTHROPIC_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL to the same model (for example, both use kimi-k2-250905):
export ANTHROPIC_BASE_URL="https://llm.ai-nebula.com"
export ANTHROPIC_AUTH_TOKEN="sk-zbTYx*******************************fceTvn5"
export ANTHROPIC_MODEL="kimi-k2-250905"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="kimi-k2-250905"
cd your-project-folder
claude
Method 2: Switch main thread model after startup Keep environment variables configured as in “Basic Configuration (Dual Model)”. After starting Claude Code, in the interactive interface, enter:
/model haiku
The main thread will switch to use the model configured by ANTHROPIC_DEFAULT_HAIKU_MODEL (i.e., claude-haiku-4-5-20251001).