Claude Code Integration

Use Claude Code with MaxRouter

Access Claude Opus 4.8, Claude Sonnet 4.6, and GPT-5 directly in Claude Code. Set up in under 2 minutes.

Supported Models for Claude Code

claude-opus-4-8
Most capable
claude-sonnet-4-6
Best for coding
claude-opus-4-7
Advanced reasoning
claude-haiku-4-5
Fast & affordable

Setup Guide

1

Get Your API Key

Sign up and generate an API key in your dashboard.

Contact Create account & get API key →
2

Install CC Switch (Recommended)

CC Switch is a configuration tool that manages Claude Code, Codex, and Gemini CLI connections.

git clone https://github.com/farion1231/cc-switch.git
cd cc-switch
python3 cc_switch.py
3

Configure Connection

In CC Switch, select the Claude panel and enter:

Base URL: https://api.silom.cn/llm-api
API Key: YOUR_API_KEY

Important: The base URL for Claude Code does NOT include /v1. Use https://api.silom.cn/llm-api (not /v1).

4

Start Coding

Launch Claude Code and start building with AI. Your requests will be routed through MaxRouter.

Manual Setup (without CC Switch)

Set environment variables directly:

export ANTHROPIC_BASE_URL="https://api.silom.cn/llm-api"
export ANTHROPIC_API_KEY="YOUR_API_KEY"

# Then launch Claude Code
claude

Claude Code FAQ

Why doesn't the base URL include /v1?

Claude Code uses the Anthropic Messages API protocol, which has a different URL structure than OpenAI. Our Anthropic-compatible endpoint is at /llm-api without the /v1 suffix.

Does Claude Code Agent mode work?

Yes. All Claude Code features work including Agent mode, tool use, file editing, and terminal commands.

Can I use GPT-5 with Claude Code?

Claude Code is designed for Anthropic models. For GPT-5, use Cursor or Cline which support OpenAI-compatible endpoints.

Ready to Code with Claude?

Get your API key and start building in under 2 minutes.

Contact Get API Key