Back to Blog
EnglishTutorial

CC-Switch + Crazyrouter: Claude Code Base URL Setup Guide

Set up Crazyrouter in CC-Switch for Claude Code-style workflows, with base URL notes, model routing tips, and compatibility caveats for current tool versions.

C
Crazyrouter Team
February 15, 2026 / 3892 views
Share:
CC-Switch + Crazyrouter: Claude Code Base URL Setup Guide

If you use AI coding agents like Claude Code, OpenAI Codex, Gemini CLI, or OpenCode, you know the pain of managing API keys, base URLs, and config files across multiple tools. CC-Switch is a third-party desktop app that can help manage those local settings. Crazyrouter can be added as a unified API endpoint, but compatibility depends on the installed tool version and the config fields that tool currently supports.

What is CC-Switch?#

CC-Switch is an open-source desktop application (18,000+ stars on GitHub) built with Tauri 2 that lets you manage all your AI CLI coding agents from one place:

  • Claude Code - Anthropic's terminal AI assistant
  • OpenAI Codex - OpenAI's coding agent
  • Gemini CLI - Google's command-line AI tool
  • OpenCode - Open-source AI coding assistant

Instead of manually editing files such as ~/.claude/settings.json, ~/.codex/auth.json, or ~/.gemini/.env, CC-Switch gives you a GUI for switching supported provider settings. Always confirm the generated config against the current documentation for Claude Code, Codex, Gemini CLI, or OpenCode before relying on it in production.

Why Use Crazyrouter with CC-Switch?#

Crazyrouter provides unified API access to 300+ AI models through a single endpoint. When paired with CC-Switch, you get:

FeatureBenefit
One API key for everythingAccess Claude, GPT, Gemini, and more without separate accounts
Faster switchingSwitch supported provider profiles from the app or system tray
Automatic config syncCC-Switch writes the correct config files for each tool
Cost savingsCompetitive pricing with pay-as-you-go billing
30% first top-up bonusExclusive for CC-Switch users (details below)

Setup Guide#

Step 1: Install CC-Switch#

Download CC-Switch for your platform:

  • Windows: MSI installer or portable ZIP from GitHub Releases
  • macOS: brew install --cask farion1231/tap/cc-switch
  • Linux: DEB, RPM, AppImage, or Flatpak available

Step 2: Add Crazyrouter as a Provider#

  1. Open CC-Switch
  2. Click "Add Provider"
  3. Fill in the configuration:
FieldValue
NameCrazyrouter
API Base URLhttps://ai.crazyrouter.us
API KeyYour Crazyrouter API token (starts with sk-)

Don't have a Crazyrouter account yet? Sign up here to get the exclusive CC-Switch bonus.

  1. Click Save

Step 3: Configure Models (Optional)#

CC-Switch supports granular model configuration with 4 tiers:

  • Haiku tier - Fast, lightweight models (e.g., claude-sonnet-4-20250514)
  • Sonnet tier - Balanced performance (e.g., claude-sonnet-4-20250514)
  • Opus tier - Maximum capability (e.g., claude-opus-4-20250514)
  • Custom - Any model available on Crazyrouter

Since Crazyrouter supports 300+ models, you can configure any combination across tiers.

Step 4: Switch with One Click#

Once configured, switching to Crazyrouter should only take a few clicks:

  • From the app: Click the Crazyrouter entry in your provider list
  • From system tray: Right-click the CC-Switch icon → select Crazyrouter
  • Via deep link: Use ccswitch:// protocol links for one-click import

CC-Switch automatically updates the config files for whichever AI tools you have installed.

MCP Server Management#

CC-Switch also provides a unified panel for managing MCP (Model Context Protocol) servers across all your AI tools. This means you can:

  • Add MCP servers once and sync them to Claude Code, Codex, and Gemini CLI
  • Toggle servers on/off per tool
  • Import/export MCP configurations
  • Use built-in templates for common servers (filesystem, fetch, etc.)

This is usually independent of your API provider, but check each coding tool's current MCP support before assuming every server syncs across every client.

Speed Testing#

CC-Switch includes a built-in speed test feature. You can measure the latency of your Crazyrouter endpoint compared to other providers, helping you choose the fastest option for your region.

Exclusive CC-Switch Bonus#

If the CC-Switch referral promotion is still active, users who sign up for Crazyrouter through CC-Switch may get a 30% bonus on their first top-up:

  1. Register at crazyrouter.com/register?ref=cc-switch
  2. Use redemption code CCSWITCH on your first top-up
  3. Confirm the promotion on the checkout or account page before topping up

For example, a 30% active promotion would turn a 10top−upinto10 top-up into 13 in credits, but promotion rules can change.

Quick Reference#

Crazyrouter API Configuration#

code
API Base URL: https://ai.crazyrouter.us
API Key: sk-xxxxxxxxxxxx (create at crazyrouter.com → API Tokens)

Supported Tools#

ToolConfig File Updated by CC-Switch
Claude Code~/.claude/settings.json
OpenAI Codex~/.codex/auth.json + config.toml
Gemini CLI~/.gemini/.env + ~/.gemini/settings.json
OpenCode~/.opencode/config.json

System Requirements#

  • Windows 10+, macOS 10.15+, or Linux (Ubuntu 22.04+, Debian 11+, Fedora 34+)
  • Node.js 18+ (for Claude Code / Gemini CLI)
  • Any of the supported AI coding tools installed

Summary#

CC-Switch can reduce the hassle of managing multiple AI coding agent configurations. Combined with Crazyrouter's unified API access to 300+ models, you get a cleaner workflow when your installed tools support the relevant base URL and API key settings:

  1. One app to manage all your AI coding tools
  2. One API key to access all models
  3. One click to switch between providers

Get started by downloading CC-Switch, adding Crazyrouter as a provider, and checking the current Crazyrouter account page for any active referral or top-up promotion.

<!-- claude-internal-links-20260705 -->

Implementation Guides

Related Articles

Google Veo3 API Guide: Generate AI Videos with Audio in 2026Tutorial

Google Veo3 API Guide: Generate AI Videos with Audio in 2026

"Complete guide to using Google Veo3 API for AI video generation with native audio. Includes setup, code examples, pricing, and comparison with Sora and Kling."

Feb 19
/v1/chat/completions vs /v1/responses vs /v1/messages: Which AI API Endpoint Should You Use?Tutorial

/v1/chat/completions vs /v1/responses vs /v1/messages: Which AI API Endpoint Should You Use?

A practical guide to choosing the correct AI API endpoint. Learn the differences between OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages to avoid model unavailable errors caused by wrong endpoint routing.

Jun 4
AI API Latency Optimization: 10 Proven Strategies to Make Your AI Apps FasterTutorial

AI API Latency Optimization: 10 Proven Strategies to Make Your AI Apps Faster

"Reduce AI API latency by 50-80% with these proven optimization strategies. From streaming responses and edge routing to model selection and connection pooling."

Mar 4
GLM 4.6 API Guide 2026: Tool Calling, RAG, and Bilingual AgentsTutorial

GLM 4.6 API Guide 2026: Tool Calling, RAG, and Bilingual Agents

A developer-focused June 2026 guide to GLM 4.6 API, alternatives, implementation patterns, pricing tradeoffs, and when to use Crazyrouter for unified AI API access.

Jun 4
Function Calling Across AI Providers in 2026: A Safe, Portable ImplementationTutorial

Function Calling Across AI Providers in 2026: A Safe, Portable Implementation

Build portable function calling across GPT, Claude, Gemini, Qwen, and GLM with normalized schemas, validation, approval gates, retries, and Python and Node.js examples.

Jul 22
GLM 4.6 API Guide: Customer Support Tool Calling with Safe EscalationTutorial

GLM 4.6 API Guide: Customer Support Tool Calling with Safe Escalation

A developer-focused GLM 4.6 API guide guide covering architecture, code, alternatives, cost controls, and production rollout.

Aug 11