CC Switch is a cross-platform desktop app that manages configurations for Claude Code, Codex, Gemini CLI, OpenCode, and OpenClaw. One GUI to switch all of them between providers — no need to hand-editDocumentation Index
Fetch the complete documentation index at: https://docs.ruapi.ai/llms.txt
Use this file to discover all available pages before exploring further.
~/.claude/settings.json, ~/.codex/config.toml, or ~/.openclaw/openclaw.json.
If you only use one CLI (say, Claude Code), you can skip CC Switch and follow Claude Code direct setup. CC Switch shines when you juggle multiple tools and multiple providers.
Prerequisites
Sign up and top up
Create an account at www.ruapi.ai and top up with USDT. See the top-up guide.
Create an API key
Console → Tokens → Create token. Copy the
sk-... string. Details in API keys & security.Install at least one CLI
CC Switch doesn’t install Claude Code / Codex / etc. — it only manages their configs. Install your CLI first via Claude Code or Codex.
Install CC Switch
Grab a build from the Releases page:- macOS
- Windows
- Linux
Download
cc-switch-x.y.z-arm64.dmg (Apple Silicon) or cc-switch-x.y.z-x64.dmg (Intel) → double-click to mount → drag CC Switch.app into Applications.If you see “cannot verify developer” on first launch, go to System Settings → Privacy & Security, scroll down, and click Open Anyway.
Add RuAPI to CC Switch (Claude Code)
Open CC Switch, select the Claude Code tab on the left:Choose 'Custom Provider'
Scroll to the bottom of the preset list and pick Custom Provider. If “RuAPI” already shows up as a preset, pick it directly — only the API key needs filling in.
Environment variables
Switch to the Environment Variables (or Endpoint config) tab:
| Variable | Value |
|---|---|
ANTHROPIC_BASE_URL | https://www.ruapi.ai |
ANTHROPIC_API_KEY | sk-your-RuAPI-token |
ANTHROPIC_MODEL (optional) | claude-sonnet-4-6 |
ANTHROPIC_SMALL_FAST_MODEL (optional) | claude-haiku-4-5 |
Add RuAPI to CC Switch (Codex)
Switch to the Codex tab on the left and repeat the add flow, but use these env vars:| Variable | Value |
|---|---|
OPENAI_BASE_URL | https://www.ruapi.ai/v1 |
OPENAI_API_KEY | sk-your-key (same token works) |
OPENAI_MODEL (optional) | gpt-5 or whichever default you want |
Codex uses the OpenAI-compatible protocol, so
OPENAI_BASE_URL must end in /v1.Verify the switch
After switching in CC Switch, behavior differs per tool:Claude Code
No restart needed — CC Switch hot-swaps. Just keep typing in your open
claude session.Codex / OpenClaw / Gemini CLI
Close and reopen the terminal (or restart the CLI) so the new env vars are picked up.
Switch back to the official provider
In CC Switch’s main UI, pick another provider → click Enable. CC Switch rewrites the relevant config files.Troubleshooting
After switching, Claude Code still hits the old endpoint
After switching, Claude Code still hits the old endpoint
- Close the current
claudesession and open a fresh terminal. - Check whether you manually
exportedANTHROPIC_BASE_URLanywhere — shell-level env vars override the settings file CC Switch writes. - Run
cat ~/.claude/settings.jsonand confirm theenvblock contains RuAPI’s config.
401 Unauthorized
401 Unauthorized
404 / model not found
404 / model not found
- Typo in the model ID. Common Claude IDs on RuAPI:
claude-sonnet-4-6,claude-opus-4-7,claude-haiku-4-5. - Don’t append
/v1toANTHROPIC_BASE_URL.
CC Switch can't find Claude Code's config
CC Switch can't find Claude Code's config
Make sure Claude Code has been run at least once (so
~/.claude/settings.json exists). With Claude Code not installed, CC Switch has nothing to switch.Next steps
- Configure Claude Code directly (no CC Switch)? See Claude Code direct setup.
- Configure Codex directly? See Codex setup.
- Configure OpenClaw? See OpenClaw setup.