Claude-Code-Router

Universal Claude API Proxy for Multiple Providers

1

Install Claude Code

Get the official Claude Code CLI tool from Anthropic.

npm install -g @anthropic-ai/claude-code
Or download from claude.ai/code
2

🎯 Choose Your Provider

Select your preferred AI provider and get the API key. Click any provider below for detailed setup instructions:

AN

Anthropic (官方)

✓ 即用

官方Claude API,无需代理,但需要解决中国大陆账号充值问题。

DS

DeepSeek

✓ 即用

High-performance reasoning models with excellent cost efficiency. Perfect for complex coding tasks.

AR

AnyRouter

✓ 即用🎁 $100

Model proxy service - Provides access to Claude and other models. Click to register and get $100 free credits!

KM

Kimi (Moonshot AI)

✓ 即用

Advanced Chinese AI models with strong multilingual capabilities and long context support.

SF

SiliconFlow

✓ 即用

Chinese AI infrastructure platform providing access to various domestic and international models.

Q3C

Qwen3-Coder

✓ 即用

Advanced coding model from Alibaba Cloud with strong programming capabilities and Chinese language support.

ACW

AICodeWith

✓ 即用🎁 2000 Free Credits

AI coding assistant platform providing direct Claude Code API access. Get 2000 free credits upon registration!

CC

Claude-Code

✓ 即用🎁 4000 积分

Professional Claude Code API service with stable access and excellent performance. Get 4000 free credits (~20 conversations) upon registration!

OR

OpenRouter

⚠ 部署

Access to multiple AI models through a single API, including Claude, GPT, and open-source models.

AI

OpenAI

⚠ 部署

Industry-leading GPT models including GPT-4o and GPT-4o-mini for diverse AI applications.

3

Configure Environment

Add these to your shell config (~/.bashrc or ~/.zshrc):

For OpenRouter:
export ANTHROPIC_BASE_URL="https://cc.xiaohui.cool"
export ANTHROPIC_API_KEY="your-openrouter-api-key"
For AnyRouter:
export ANTHROPIC_BASE_URL="https://anyrouter.top"
export ANTHROPIC_API_KEY="your-anyrouter-api-key"

Then reload your shell:

source ~/.bashrc  # or source ~/.zshrc

🚀 Ready to Code!

Run claude in your terminal and enjoy Claude with your preferred AI provider

🚀 Deploy Your Own

🔐 Private ⚡ Secure 🌐 Full Control 📊 Zero Logs

Quick Deploy

~3 min
📥
Clone & Setup
git clone https://github.com/istarwyh/claude-code-router && cd claude-code-router && npm install
🔑
Configure Secrets
DS DeepSeek
wrangler secret put OPENAI_COMPATIBLE_BASE_URL
Enter: https://api.deepseek.com
AI OpenAI
wrangler secret put OPENAI_COMPATIBLE_BASE_URL
Enter: https://api.openai.com/v1
OR OpenRouter
wrangler secret put OPENROUTER_BASE_URL
Enter: https://openrouter.ai/api/v1
🚀
Deploy
npm run deploy
🛡️

Why Deploy?

🌐
All Providers
Access OpenAI, DeepSeek, Kimi, and more
🔐
Private & Secure
Your keys never touch third-party servers
⚙️
Full Control
Custom configs, model mappings
📊
Zero Logs
No data retention or tracking

💬 Need Help?

Get in touch if you have any questions or issues

📧
💬
WeChat
istarwyh