• Home
  • Search
  • AI Services
  • Models
  • Writing
  • Multimedia Creation
  • Translation & Others
Home›Developer Center›cc-switch Windows

cc-switch Windows

API DocumentationAPI Quick StartOpenAI ChatGPT APIAnthropic (Claude) APIGoogle Gemini APIGoogle Search APIGoogle News APIOpenRouter APIAPI Pricing
CLI & Agent Guidescc-switch macOScc-switch Windowscc-switch LinuxOpenCode macOSOpenCode WindowsOpenCode LinuxOpenClaw macOSOpenClaw WindowsOpenClaw LinuxHermes Agent macOSHermes Agent WindowsHermes Agent LinuxClaude Code CLI macOSClaude Code CLI WindowsClaude Code CLI LinuxCodex CLI macOSCodex CLI WindowsCodex CLI Linux
MYAI168 API & MCPMYAI168 Chat API GuideMYAI168 MCP CLIMYAI168 MCP Web & App
User GuidesGT Agent GuideAI Services Guide
No matching questions on this page.Search the whole site
Installation Overview (Windows)

cc-switch (CC Switch) Installation and MYAI168 Setup Guide — Windows

cc-switch is a free, open-source desktop GUI that manages the API settings of several AI coding tools in one place: enter the MYAI168 endpoint and key once, and switch Claude Code, Codex and other tools to MYAI168 with one click — no manual editing of each tool's config files.

This guide walks through: 1. Install → 2. First launch → 3 & 4. Add a MYAI168 provider (Claude Code / Codex) → 5. Enable and verify → 7. Troubleshooting. It is written against v3.20.4 (September 2026); button and field names may differ slightly in your version.

Tools it can manage

Ten tools: Claude Code, Claude Desktop, Codex, Gemini CLI, Grok Build, OpenCode, OpenClaw, Hermes Agent, Pi and MiniMax Code. cc-switch only manages settings — it does not include the tools themselves, so install the tools you want to use first.

Before you start

  • Windows 10 / 11 (x64 or ARM64).
  • An API key created on the Developer API Key page: https://www.myai168.com/en/ai/user/developer
  • Download only from the official channels: ccswitch.io and GitHub Releases https://github.com/farion1231/cc-switch/releases. cc-switch is completely free — any "CC Switch" site that asks for payment, top-ups or your login credentials is not official.
1. Install
  1. Download one installer from the Releases page:
    • Most PCs (x64): CC-Switch-v{version}-Windows.msi
    • ARM PCs (for example Snapdragon laptops): CC-Switch-v{version}-Windows-arm64.msi
    • Portable (no install): CC-Switch-v{version}-Windows-Portable.zip — unzip it anywhere and run CC-Switch.exe
  2. Double-click the .msi and click Next through the installer.
  3. Open "CC Switch" from the Start menu.

★ Common: SmartScreen warning ★

Windows may show a blue "Windows protected your PC" window, a general notice for less frequently downloaded software. Click "More info" → "Run anyway".

★ Common: double-clicking the installer does nothing ★

Right-click the downloaded .msi → Properties → on the General tab tick "Unblock" at the bottom → OK, then double-click it again.

2. First Launch

After opening "CC Switch":

  • The app switcher at the top left selects which tool you are configuring (Claude Code by default); tools you do not use can be hidden in Settings.
  • A CC Switch icon appears in the system tray (bottom right); right-click it to switch providers later.
  • If you have configured these tools before, cc-switch imports the existing settings as a default provider card that you can switch back to at any time.

Suggested settings (Settings → General)

  • Language: choose the interface language (English, Traditional Chinese, Simplified Chinese or Japanese).
  • Launch on Startup and Minimize to tray on close: enable as you prefer.
  • If Claude Code keeps showing the login or onboarding screens on first launch, turn on "Skip Claude Code first-run confirmation".
3. Add a MYAI168 Provider: Claude Code

First complete the installation and "2. Create the apiKeyHelper" on the Claude Code CLI Windows page, then return to cc-switch. In this guide the Claude Code key always comes from the apiKeyHelper script — the cc-switch card neither takes nor stores the key:

  1. Select "Claude Code" in the app switcher and click "+" (Add Provider) at the top right.
  2. Set Provider Preset to "Custom Configuration".
  3. Fill in the basic fields from the table below.
  4. Expand "Advanced Options": set Upstream Format to "Anthropic Messages (Native)"; leave Auth Field unchanged.
  5. Under Model Mapping, fill in each "Requested model" and the "Default fallback model" from the table.
  6. In the Config JSON below, add the apiKeyHelper line (pointing to your .cmd key script) by hand and make sure there is no ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN (full example in "3. Configure MYAI168 (Method A)" on the Claude Code page).
  7. Click "Add"; because the API Key is empty, a "Save anyway?" prompt appears — click "Save anyway". Then click "Enable" on the MYAI168 card.
FieldValue
Provider NameMYAI168 (any name you like)
API KeyLeave empty (the key is supplied only by the apiKeyHelper script)
API Endpointhttps://www.myai168.com/en/api/anthropic (no /v1 at the end)
Model Mapping: Opusclaude-opus-5-5
Model Mapping: Sonnetclaude-sonnet-5-5
Model Mapping: Haikuclaude-haiku-4-5
Model Mapping: Fableclaude-fable-5-1
Default fallback modelclaude-opus-5-5

To always use Opus, you can map all four roles to claude-opus-5-5. Model IDs must exactly match this site's accepted list (for example claude-opus-5-5, not claude-opus-5.5); "Fetch Models" does not work while the API Key is empty, so type the IDs by hand.

4. Add a MYAI168 Provider: Codex

First install Codex as described on the Codex CLI Windows page, then return to cc-switch:

  1. Select "Codex" in the app switcher and click "+" at the top right.
  2. Set Provider Preset to "Custom Configuration".
  3. Fill in the fields from the table below.
  4. Leave the Upstream Format under Advanced Options as "OpenAI Responses API (Native)"; local routing is not needed because this site's endpoint supports the Responses API directly.
  5. Click "Add", then click "Enable" on the MYAI168 card.
FieldValue
Provider NameMYAI168
API KeyYour MYAI168 developer key
API Request URLhttps://www.myai168.com/en/api/openai/v1
Model Namegpt-6.1-sol (the custom template may default to another model — change it to this)

cc-switch (v3.20.1 and later) writes the endpoint, the model and the key to %USERPROFILE%\.codex\config.toml — the key goes in the experimental_bearer_token field of the provider table, so no environment variable is needed. %USERPROFILE%\.codex\auth.json is reserved for the official ChatGPT account login and never holds the MYAI168 key.

Note: by default, switching to a third-party provider such as MYAI168 makes cc-switch delete %USERPROFILE%\.codex\auth.json (the official ChatGPT login). If you also sign in to Codex with a ChatGPT account, first turn on "Keep official login for direct switches" in the cc-switch settings. If Codex starts with a warning that disable_response_storage is ignored, it comes from an old line in the cc-switch custom template and does not affect usage.

Check that base_url and model are correct in PowerShell with the command below (the output contains your key, so do not screenshot or share it):

Get-Content "$env:USERPROFILE\.codex\config.toml"
5. Enable, Apply and Verify

After you click "Enable" on a card it is marked as in use. You can also right-click the CC Switch tray icon and click a provider name to switch.

ToolWhen the change applies
Claude CodeImmediately (a running Claude Code reloads its settings automatically).
Codex, OpenCode, OpenClaw and other toolsAfter you close and reopen PowerShell (or restart the tool).

Verify the connection to MYAI168

  1. Open a new PowerShell window and change into a project folder (do not run it in your user home folder).
  2. Run claude or codex and ask: What is 123456 times 789? Reply with the number only.
  3. If it answers 97406784 and the API usage on the Developer API Key page increases, the call went through MYAI168.

Do not verify with "Who are you?" — a model's self-description is unreliable. To go back to an official account, add an official preset card (for example Claude Official or OpenAI Official), enable it, and follow that tool's login flow.

6. Other Tools (OpenCode / OpenClaw / Hermes / Claude Desktop)

OpenCode, OpenClaw and Hermes can keep several providers at once in cc-switch, so their card buttons differ from Claude Code and Codex: "Add" writes the provider into the tool's config file (and then turns into "Remove"); OpenClaw also has "Set Default" to pick the default model, and Hermes has "Enable" to switch the provider in use.

  • OpenCode → edit opencode.json directly as described on the OpenCode Windows page (the simplest route).
  • OpenClaw → add a provider on cc-switch's OpenClaw tab as described on the OpenClaw Windows page.
  • Hermes Agent → cc-switch writes for Hermes may not take effect; set it up by hand as described on the Hermes Agent Windows page.
  • Claude Desktop (GUI chat app, no terminal) → configure it on cc-switch's Claude Desktop tab, which can import providers from Claude Code with one click.
7. Troubleshooting and Maintenance
  • "Environment Variable Conflicts Detected" banner → your Windows user or system environment variables include entries such as ANTHROPIC_API_KEY or OPENAI_API_KEY, which override the settings cc-switch writes. Click "View Details", select them and delete them (a backup is made first), or remove them yourself under System Properties → Advanced → Environment Variables, then reopen PowerShell.
  • The switch has no effect → every tool except Claude Code needs PowerShell closed and reopened; also make sure the MYAI168 card is the one in use.
  • 401 responses → the key is wrong, or the key has reached its credit limit (API key credit limit reached!). Check the Developer API Key page; if needed create a new key — for Claude Code change the key in the apiKeyHelper script, for Codex update the API Key on the card.
  • "No Routing Support" label on the card → normal; it only means you are using a custom endpoint (MYAI168) and does not affect usage.
  • Update cc-switch → it checks for updates at startup, and you can click "Check for Updates" in the About section of Settings; or install the new .msi over the old one (portable users switch to the new .zip).
  • Back up your settings → data lives in %USERPROFILE%\.cc-switch\ (mainly cc-switch.db) and automatic backups in %USERPROFILE%\.cc-switch\backups\. Before a major upgrade, copy cc-switch.db somewhere safe.
  • Uninstall → uninstall CC Switch from Settings → Apps (delete %USERPROFILE%\.cc-switch\ too if you want to remove its settings). Each tool keeps the settings that were last enabled and keeps working.

Official

  • https://github.com/farion1231/cc-switch
  • https://github.com/farion1231/cc-switch/releases
‹ Previous page: cc-switch macOSNext page: cc-switch Linux ›
↑
Question link copied.

Other FAQ pages

API Documentation

  • API Quick Start
  • OpenAI ChatGPT API
  • Anthropic (Claude) API
  • Google Gemini API
  • Google Search API
  • Google News API
  • OpenRouter API
  • API Pricing

CLI & Agent Guides

  • cc-switch macOS
  • cc-switch Linux
  • OpenCode macOS
  • OpenCode Windows
  • OpenCode Linux
  • OpenClaw macOS
  • OpenClaw Windows
  • OpenClaw Linux
  • Hermes Agent macOS
  • Hermes Agent Windows
  • Hermes Agent Linux
  • Claude Code CLI macOS
  • Claude Code CLI Windows
  • Claude Code CLI Linux
  • Codex CLI macOS
  • Codex CLI Windows
  • Codex CLI Linux

MYAI168 API & MCP

  • MYAI168 Chat API Guide
  • MYAI168 MCP CLI
  • MYAI168 MCP Web & App

User Guides

  • GT Agent Guide
  • AI Services Guide