Skip to content
Open CastalyConsole

Coding agents

CC-Switch setup

Save and switch Codex, OpenAI-compatible, and Claude Code profiles without editing each file manually.

This guide connects CC-Switch to Modelflare. Use Option A to import a provider directly from the Modelflare API Keys page. Use Option B to add a universal provider manually in CC-Switch.

Sign in to Modelflare, open API Keys, and create a key whose non-default group can access the model you want to use.

Download and install CC-Switch v3.17.0 or later from the official setup guide, then open the app once.

  1. Return to API Keys and find the key you want to use.
  2. Open that key’s action menu and click Import to CC Switch.
  3. Choose Claude Code or Codex, then confirm the primary model.
  4. Click Open CC Switch and confirm the import in CC-Switch.

Modelflare fills in the correct Base URL and API key automatically. The import also enables CC-Switch’s usage query with a 30-minute refresh interval, so the provider card can show the current Modelflare account’s wallet balance together with account-level total and used credit. It does not show the API key’s own quota limit. To configure both Claude Code and Codex, repeat the import once for each application. Re-import an older provider to add the credit query configuration.

Option B: add a universal provider manually

Section titled “Option B: add a universal provider manually”
  1. Click the + button in the top-right corner of the CC-Switch window.
  2. Select Add Universal Provider.
  3. Under preset type, select 自定义网关 (Custom Gateway).

Enter the following values:

  • API URL: https://modelflare.dev
  • API Key: Paste the API key created in Modelflare
  • Website URL: https://modelflare.dev

Under Enabled Apps, select the apps that should use Modelflare, then click Add.