Skip to content

Setting Up CC Switch

Difficulty 🧩 Medium | API format Claude | base_url https://byesu.com

Setup · fill these in
API addresshttps://byesu.com
API keysk-xxxxxxxxCreate in console →
Modelclaude-opus-4-8
API format Claude · model names follow the console

CC Switch is an open-source, cross-platform tool for managing AI CLIs in one place. It lets you switch between different API providers in Claude Code, Codex, and Gemini CLI with a single click, without manually changing environment variables or config files. Pair it with byesu — an AI API gateway with OpenAI-compatible and Anthropic-native endpoints, where one key covers Claude, GPT-5.6, Grok, Gemini and more, billed pay-as-you-go with no subscription — and you can switch to a byesu channel from inside it anytime.

Before you start

First, go to Console → Tokens and create a new token (it looks like sk-xxxx), then pick the right group for the token—the group determines which models you can call and which route they take. If you're not sure how to choose, see Choosing a Group.

CC Switch manages CLIs like Claude Code, so Claude Code uses the Anthropic API format, with the custom base_url set to https://byesu.com (without /v1). Only the OpenAI-compatible format (/v1/chat/completions) uses https://byesu.com/v1.

Step 1: Install CC Switch

Official downloads: GitHub Releases (installers for Windows / macOS / Linux) · website ccswitch.io

Choose the installation method for your system:

bash
brew tap farion1231/ccswitch
brew install --cask cc-switch
text
Download the MSI installer from GitHub Releases, or download the portable ZIP and unzip it to use right away.
bash
# Download the DEB package / AppImage / RPM from GitHub Releases
# On ArchLinux, install from the AUR:
paru -S cc-switch-bin

Once installed, open CC Switch and switch to the Claude (Claude Code) category in the top-left corner.

Step 2: Add Byesu as a Provider

Option 1: One-click import (fastest)

If you're working inside the Byesu console, you can import directly using a ccswitch:// deep link, saving you from typing everything by hand:

  1. Go to Console → Tokens, and in the dropdown menu of the target token, select CC Switch.
  2. In the configuration dialog that pops up:
    • App type: select Claude
    • Config name: anything you like, for example byesu
    • Main model (required): select claude-opus-4-8
    • Opus model: claude-opus-4-8
    • Sonnet model / Haiku model: optional, choose other available models as needed
  3. Click Open CC Switch, and the configuration will be imported automatically.

Verify the base_url and token

One-click import automatically fills in Byesu's API address and the key for this token. After importing, please go to the provider details and confirm that the base_url is https://byesu.com (Anthropic format, without /v1).

Option 2: Add manually

In CC Switch's Claude category, click "Add Provider" and fill in the fields below:

FieldWhat to enter
Namebyesu (your choice)
API address / Base URL (maps to ANTHROPIC_BASE_URL)https://byesu.com
API Key / Auth Token (maps to ANTHROPIC_AUTH_TOKEN)sk-xxxx (your Byesu token)
Main model / Opusclaude-opus-4-8
Sonnetclaude-opus-4-8 (or another available model)
HaikuLeave the default or pick a lightweight model

Use model names that actually exist on Byesu

For example claude-opus-4-8. Claude Code's three tiers—Opus, Sonnet, and Haiku—can all point to the same model or different models on Byesu. Just make sure the group your token belongs to supports that model.

After saving, click the byesu entry in the provider list, and CC Switch will write it into Claude Code's configuration (the environment variables ANTHROPIC_BASE_URL / ANTHROPIC_AUTH_TOKEN).

Step 3: Verify That It Works

  1. In CC Switch, switch the current provider to byesu.
  2. Open a new terminal and run Claude Code:
bash
claude
  1. Ask it anything, for example "Hi, tell me which model you're using." If it replies normally and doesn't throw an authentication error, you're connected to Byesu.

If Claude Code was already open, please restart the terminal after switching providers and then run it again, so the new environment variables take effect.

Stuck?

  • 401 / authentication failure: the token is wrong or has extra spaces; make sure the key looks like sk-xxxx. See Common Errors #auth.
  • No available channel / no channel: the current token's group doesn't include this model. Switch to a group that supports the model, or use a model within the group. See Choosing a Group and Common Errors #no-channel.
  • Insufficient quota / balance: the token quota or account balance is too low. See Common Errors #balance.
  • Switched provider but nothing changed: environment variables won't refresh automatically in an already-open terminal; restart the terminal and try again.

For more troubleshooting, see Common Errors.

Got a problem? Contact support or join our group.