Getting StartedClaude CodeInstallationCC Switch

Configure Claude Code in CC Switch

CC Switch is a cross-platform desktop application that lets you manage multiple API configurations for Claude Code, Codex, OpenCode, and Gemini CLI from a single graphical interface. This page covers exactly one thing: what to fill in for each field in CC Switch’s “Add Provider” form to connect Claude Code to CC Club in 90 seconds — no more manually editing ~/.claude/settings.json.

Before You Start

Open CC Switch → switch to the Claude group on the left → click + Add Provider, then fill in each of the 7 fields below.

Quick Reference Table

If you just want a quick reference and don’t need to read the full guide, this table is all you need:

#FieldWhat to Enter
1Provider Name / NoteWhatever you like, e.g. CC Club / Claude, CC Club Sonnet (1M)
2Official WebsiteLeave blank
3APIYour CC Club API Key — see Get API Key
4Request URLhttps://claude-code.club/api
5API FormatAnthropic Messages (Native)
6Model RegionLeave blank (model is specified via the model field in the Config JSON)
7Config JSONSee Full JSON snippet

Field Details

Provider Name / Note

Name it whatever you like — something you can recognize at a glance in the CC Switch list. It is recommended to include “CC Club” and the model identifier, e.g. CC Club / Sonnet 4.6 (1M).

This field only affects the display in the list — it is not included in actual requests. Chinese characters are perfectly fine.

Official Website

Leave blank. CC Club does not require this field, and leaving it blank will not trigger any validation errors.

API (i.e. API Key)

Paste the Key you obtained from the Get API Key page.

⚠️

The Key looks like cr_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Do not include leading or trailing spaces. CC Switch will not display it in plain text after saving — it will be masked on subsequent visits. This is expected behavior.

Request URL (Base URL)

https://claude-code.club/api

This is CC Club’s default address, which is fastest when direct connection latency is under 100ms. If your network is noticeably slow to the default address, you can switch to one of the region-optimized nodes below:

AddressWhen to Use
https://claude-code.club/apiDefault (fastest for direct connection)
https://jp.claude-code.club/apiJapan node (Alibaba Cloud, optimized for return to China)
https://hk.claude-code.club/apiHong Kong node (Alibaba Cloud, optimized for return to China)
https://sz.ai-code.club/apiShenzhen node (domestic relay with outbound routing)

API Format

Select Anthropic Messages (Native) from the dropdown.

The CC Club interface is fully compatible with Anthropic’s official protocol. You must select the native Messages protocol. If you accidentally select OpenAI Chat Completions, the request body structure will differ and you will get a 4xx error immediately.

Model Region

Leave blank.

The reason for leaving it blank: the model is specified uniformly via the model field in the Config JSON below. Leaving this field blank allows CC Switch to defer to the JSON value, avoiding conflicts between the two.

Config JSON (Full Version)

This is the core of the entire form. Copy the entire snippet into the JSON input box, then replace the empty string value for ANTHROPIC_AUTH_TOKEN with your own API Key:

{
  "effortLevel": "medium",
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "",
    "ANTHROPIC_BASE_URL": "https://claude-code.club/api"
  },
  "model": "sonnet[1m]"
}

Field meanings:

FieldMeaningModification Advice
effortLevelClaude’s thinking intensity level (low / medium / high)Keep medium generally; increase to high for complex tasks
env.ANTHROPIC_AUTH_TOKENAPI Key environment variable injected into the Claude Code processRequired: enter your own Key
env.ANTHROPIC_BASE_URLBase URL environment variable injected into the Claude Code processShould match the Request URL field above
modelThe default model used when Claude Code startssonnet[1m] = Sonnet 4.6 + 1M context, best value choice
⚠️

JSON does not allow trailing commas — there must be no extra , before the closing } in the snippet above, or validation will fail on save.

Save and Verify

Click “Save” in the bottom-right corner

CC Switch will validate the JSON syntax. If it passes, this provider entry will appear in the left-hand list.

Click on this provider card to activate it

CC Switch uses a “whoever is selected becomes active” model — once the card shows a checkmark, CC Switch will write the corresponding configuration to Claude Code’s ~/.claude/settings.json.

Run Claude Code once in a terminal

claude --version
claude "explain vibe coding in one sentence"

If you get a quick response, it means the Key, Base URL, and model are all wired up correctly.

Once this step succeeds, the entire CC Switch + Claude Code + CC Club chain is connected. Switching nodes, changing models, or managing multiple accounts in the future can all be done with one click in CC Switch — no more editing config files by hand.

FAQ

Q: JSON validation failed on save?

The two most common pitfalls:

  1. Incomplete structure — missing a } or ". Copy the full JSON snippet on this page from scratch.
  2. Trailing comma — an extra , at the end of a key-value pair. JSON does not allow this.

Q: Running claude still reports “Invalid API key” after saving?

First confirm that this provider has a checkmark (highlighted). CC Switch’s logic is “actively selected = active” — saving only creates the configuration, it does not activate it.

Q: I want to configure another Claude model (e.g. Opus) — how?

No need to modify this provider entry. Duplicate this configuration and change model to opus[1m]. CC Switch allows any number of same-source providers to coexist; just click to switch whichever one you need.

Q: Can multiple Claude providers be active at the same time?

No. Claude Code only reads the currently active configuration at any given time — CC Switch switches which one is active, not running all in parallel. If you need to use different models in parallel, you would need multiple terminals / projects + multiple settings.json files.


MIT 2026 © Nextra.
加入社群CC Club返回官网