cc-switch Integration
Use TheRouter as the routing layer behind multiple local coding clients without editing each config by hand.
cc-switch is useful when your team switches between Claude Code, Codex, Gemini CLI, OpenCode, and OpenClaw and wants one desktop control plane for provider presets. TheRouter works well here because one tenant key can drive all of those clients while keeping routing, failover, and billing in one place.
1. Create a routing key in TheRouter
Create a tenant API key in the dashboard first. This is the key you will paste into cc-switch. Do not use a management key.
Dashboard → API Keys
Create Key
Copy the raw tenant key immediately
Expected format: sk-...2. Pick the target client inside cc-switch
In cc-switch, choose the app you actually want to drive with TheRouter. TheRouter presets are most useful for these targets:
Claude Code → Anthropic-compatible TheRouter path
Codex → OpenAI-compatible TheRouter path
Gemini CLI → Gemini-native TheRouter path
OpenCode → OpenAI-compatible TheRouter path
OpenClaw → OpenAI-compatible TheRouter path3. Add the TheRouter preset
Open Add Provider, search for TheRouter, paste the key, then enable the preset. If you do not see the preset, update cc-switch to a build that includes the latest provider presets.
cc-switch → target app → Add Provider
Search: TheRouter
Paste: sk-...
Enable the preset
Restart the target CLI if required4. Know which base URL style you are using
cc-switch hides the file editing, but the protocol rules still matter. TheRouter uses different base URL styles depending on the client protocol.
Claude Code preset:
base URL = https://api.therouter.ai
Codex / OpenCode / OpenClaw preset:
base URL = https://api.therouter.ai/v1
Gemini CLI preset:
base URL = https://api.therouter.ai5. Validate the path before deeper debugging
Confirm the key and model aliases are live before debugging the desktop app itself.
curl https://api.therouter.ai/v1/models \
-H "Authorization: Bearer $THEROUTER_API_KEY" | head -c 400Then restart the target CLI and run its smallest possible request or status check.
Common mistakes
1. Using a management key instead of a tenant routing key
2. Mixing OpenAI-compatible and Anthropic-native base URLs
3. Expecting old cached model IDs to work after switching providers
4. Forgetting to restart the target CLI after enabling a new preset
5. Assuming cc-switch fixes the wrong model alias automaticallyRelated setup paths
Open the adjacent guide when you want the exact client-level steps instead of the switcher workflow.
Cursor Integration
Step-by-stepPoint Cursor at TheRouter with the correct OpenAI-compatible base URL, model aliases, and first-request validation.
Open guideClaude Code Integration
Step-by-stepUse TheRouter's Anthropic-compatible path for Claude Code with the exact env overrides and verification steps.
Open guideOpenClaw Integration
Agent frameworkConfigure OpenClaw against TheRouter's OpenAI-compatible endpoint and deploy with curated model defaults.
Open guideCoding Tools Setup
Tool hubBrowse the quick configs for Windsurf, Cline, Continue, OpenCode, OpenClaw, and cc-switch in one place.
Open guide