CC-Switch Setup
Create and switch Modelflare profiles in CC-Switch for Codex, Claude Code, OpenCode, and other supported coding tools.
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.
1. Create an API key
Sign in to Modelflare, open API Keys, and create a key whose non-default group can access the model you want to use.
2. Install CC-Switch
Download and install CC-Switch v3.17.0 or later from the official setup guide, then open the app once.
3. Choose a setup method
Option A: import directly from Modelflare
- Return to API Keys and find the key you want to use.
- Open that key's action menu and click Import to CC Switch.
- Choose Claude Code or Codex, then confirm the primary model.
- 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
- Click the + button in the top-right corner of the CC-Switch window.
- Select Add Universal Provider.
- 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.