SuperAPI AI Directory

claude-code-router

A powerful tool to route Claude Code requests to different models and customize any request. Supports multi-provider routing, request/response transformation, dynamic model switching, CLI model management, and GitHub Actions integration.

Open website

About this tool

Purpose

Claude Code Router (CCR) is a local model gateway and control plane for coding agents. It provides a stable local endpoint for Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, WorkBuddy, and compatible API clients, while managing providers, models, accounts, routing rules, and tools in one place.

Key Capabilities

  • Centrally manage all agents and providers without maintaining separate model configurations for each client.
  • Switch providers or models without changing your workflow or repeatedly editing agent configuration files.
  • Keep requests running through retries, credential pools, key rotation, and ordered fallback models.
  • Add capabilities such as Fusion vision, web search, MCP tools, and ToolHub to existing models.
  • See what actually happens through request logs, resolved routes, latency, token usage, cost estimates, and account status.
  • Supports OpenAI Chat / Responses, Anthropic Messages, Gemini Generate Content / Interactions, OpenRouter, DeepSeek, SiliconFlow, Moonshot, Kimi Code, Mistral, Z.AI, Bailian, and custom compatible providers.

Usage

Desktop App (Recommended)

  1. Download Claude Code Router for macOS, Windows, or Linux, then launch the app.
  2. Open Providers → Add Provider. Choose a built-in preset or custom endpoint, enter the API key, select the protocol and model, then save.
  3. Open Server and click Start. The local model gateway listens by default on http://127.0.0.1:3456。
  4. Open Agent Config, select Claude Code, Claude Design, Codex, Grok CLI, Kimi CLI, Kilo Code, OpenCode, Pi, ZCode, or WorkBuddy, choose a model, and apply the configuration.
  5. Start using the agent. Open Logs to confirm the resolved provider, model, status, tokens, latency, and errors.

At this point the agent is connected to CCR. To add conditions, retries, request rewrites, or fallback models, open Routing.

npm CLI

The npm CLI requires Node.js 22 or higher. It starts the same gateway and browser-based management interface without depending on Electron: Open http://127.0.0.1:3458,然后遵循与上文相同的 Providers → Server → Agent Profiles flow. The model gateway is still located at http://127.0.0.1:3456。服务模式、认证与配置文件命令请参阅 CLI reference documentation.

Docker

Docker by default exposes the management interface and gateway routes through http://127.0.0.1:3458 . When ../../next-ai/gateway exists, the npm script prepares a plugin-supporting local ai-gateway runtime before building the image. Before exposing CCR remotely, please read the Docker deployment guide.

Building the Desktop App

Install Node.js 22+, then run npm ci. Windows app packaging must run on Windows x64 because better-sqlite3 ships with native Electron modules. The release workflow, when pushing v* tags, builds macOS on macOS runners and Windows on windows-latest.

Use Cases

  • Need unified management of model providers and routing for multiple coding agents or API clients.
  • Want to switch providers or models without modifying each agent's configuration.
  • Need to improve request reliability through retries, credential pools, key rotation, and fallback models.
  • Need to extend existing models with vision, web search, MCP tools, and other capabilities.
  • Need to view request logs, route resolution, latency, token usage, cost estimates, and account status.

Limitations and Notes

  • The npm CLI requires Node.js 22 or higher.
  • Windows app packaging must run on Windows x64.
  • Read the Docker deployment guide before exposing CCR remotely.
  • Full documentation is available at ccrdesk.top. The project is under the MIT license.