Connect CC Switch to Moyi API

CC Switch is an open-source desktop app that manages provider configuration for Claude Code, Claude Desktop, Codex, Gemini CLI, OpenCode, OpenClaw, and Hermes Agent in one panel.

1. Install CC Switch

Use version 3.16.5 or later.

macOS users can install it with Homebrew:

plaintext
brew install --cask cc-switch

Or download the installer from CC Switch Releases:

  • macOS: .dmg or .zip
  • Windows: .msi installer or portable .zip
  • Linux: .deb, .rpm, or .AppImage

If macOS Gatekeeper blocks the first launch, open System Settings, go to Privacy & Security, and allow the app.

2. Connect Claude Code CLI

For installing Claude Code from scratch, see Connect Claude Code CLI to Moyi API.

If CC Switch and Claude Code are already installed, add Moyi API as a Claude Code provider:

Add the Moyi API provider

  1. Open CC Switch and switch to the Claude Code tab.

CC Switch Claude Code tab

  1. Click the orange plus button in the top-right corner.
  2. Find Moyi API in Preset providers, or search for Moyi API.

Select the Moyi API preset provider

  1. Enter your Moyi API API key.

Enter the Moyi API API Key

  1. Click Add to save.

Enable the Moyi API provider

Return to the Claude Code tab, click Enable on the Moyi API provider card, and open Claude Code.

Enable Moyi API

3. Connect Claude Desktop

Install Claude Desktop from the Claude download page:

  • macOS: download the .dmg, or run brew install --cask claude
  • Windows: download and run the .exe installer

If CC Switch and Claude Desktop are already installed:

Add the Moyi API provider

  1. Open CC Switch and switch to the Claude Desktop tab.
  2. Click the orange plus button in the top-right corner.
  3. Find Moyi API in Preset providers, or search for Moyi API.

Select Moyi API for Claude Desktop

  1. Enter your API key.

Enter the API Key for Claude Desktop

  1. Click Add to save.

Enable the Moyi API provider

Return to the Claude Desktop tab and click Enable on the Moyi API provider card. CC Switch will confirm that the switch succeeded and that Claude Desktop must be restarted.

Enable Moyi API for Claude Desktop

Fully restart Claude Desktop before using it.

4. Connect Codex

For installing Codex from scratch, see Connect Codex CLI to Moyi API.

If CC Switch and Codex are already installed:

Add the Moyi API provider

  1. Open CC Switch and switch to the Codex tab.
  2. Click Add provider.
  3. Find Moyi API in Preset providers, or search for Moyi API.

Select Moyi API for Codex

  1. Paste the API key you created in the Moyi API dashboard.
  2. Click Add to save.

Enable the Moyi API provider

Return to the Codex tab and click Enable on the Moyi API provider card. Codex does not hot-switch providers, so restart the running Codex terminal process.

5. Connect Gemini CLI

Gemini CLI support in CC Switch is still under development.

6. Connect OpenCode

See Connect OpenCode to Moyi API. CC Switch does not support OpenCode connection yet.

7. Connect OpenClaw

See Connect OpenClaw to Moyi API.

8. Connect Hermes Agent

If CC Switch and Hermes Agent are already installed, add Moyi API as a Hermes provider:

Add the Moyi API provider

  1. Open CC Switch and switch to the Hermes tab.
  2. Click Add provider.
  3. Fill in:
    1. Provider ID: moyiapi
    2. Provider name: Moyi API
    3. Website, optional: https://moyiapi.com
    4. API mode: keep OpenAI Chat Completions
    5. API endpoint: https://api.moyiapi.com/v1
    6. API key: paste the key you created in the Moyi API dashboard
  4. Fetch the Moyi API model list or add models manually. Each model needs a model ID and display name. The first model becomes the top-level model.default; put claude-opus-4-7 first if you want it as the default.
  5. Click Add to save.

Enable the Moyi API provider

Return to the Hermes tab and click Enable on the Moyi API provider card. CC Switch writes the configuration to ~/.hermes/config.yaml by default. You can override this path in CC Switch settings. Restart the Hermes process completely.

Switch to Moyi API in Hermes

Run:

plaintext
hermes setup

In the provider wizard, use the arrow keys to reach the custom provider at the bottom of the list:

plaintext
moyiapi (api.moyiapi.com/v1) - model-name

Press Enter or Space to select it. The selected row displays an active marker. Then run hermes to start a session.

Ready? Three steps to startLog in to the console · top up · create an API key
DiscordGet community help instantly
Connect CC Switch to Moyi API · Docs