Coding Tools Setup
Choose the setup path that matches how your team actually codes.
TheRouter activation is not βread every doc.β It is βget one key, point your coding tool at the right base URL, send the first successful request, then iterate.β Use this page as the hub for common coding clients and switchers.
Recommended setup paths
Open the dedicated guide when your tool needs more than a simple base URL + key swap.
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 guidecc-switch Setup
New guideAdd TheRouter presets to cc-switch so Claude Code, Codex, Gemini CLI, OpenCode, and OpenClaw can share one key and one routing layer.
Open guideOpenClaw Integration
Agent frameworkConfigure OpenClaw against TheRouter's OpenAI-compatible endpoint and deploy with curated model defaults.
Open guideOpenAI-compatible coding tools
Windsurf, Cline, Continue, and OpenCode all fit the same activation pattern: keep the OpenAI-compatible surface, set the TheRouter base URL, paste your routing key, and use exact model aliases from /v1/models.
Open Windsurf Settings β AI β Custom API
Base URL: https://api.therouter.ai/v1
API Key: <THEROUTER_API_KEY>
Model: anthropic/claude-sonnet-4.6When to use cc-switch
Use cc-switch when your team switches between Claude Code, Codex, Gemini CLI, OpenCode, and OpenClaw and you want one desktop control plane for provider presets. TheRouter presets let cc-switch point those clients at the live routing path without editing each config by hand.
1. Create a TheRouter tenant API key in the dashboard.
2. Open cc-switch and choose the target app (Claude Code, Gemini CLI, OpenCode, OpenClaw, etc.).
3. Add Provider β choose the TheRouter preset.
4. Paste your key, enable the preset, then restart the target CLI if required.Validate before you debug
Before blaming the client, verify that the key can list models and that you are using the exact alias your tool will request.
curl https://api.therouter.ai/v1/models \
-H "Authorization: Bearer $THEROUTER_API_KEY" | head -c 400https://api.therouter.ai/v1. Anthropic-native clients such as Claude Code should use the root domain https://api.therouter.ai. Gemini-native clients follow the Gemini base URL rules documented in the dedicated guide.