Claude Code model router
Claude Relay Service
Self-hosted relay that pools Claude and other subscriptions behind one endpoint for Claude Code.
Install
git clone https://github.com/Wei-Shaw/claude-relay-service.gitFrom the README
Claude Relay Service 安全更新通知:v1.1.248 及以下版本存在严重的管理员认证绕过漏洞,攻击者可未授权访问管理面板。 请立即更新到 v1.1.249+ 版本,或迁移到新一代项目 CRS 2.0 (sub2api) 🔐 自行搭建Claude API中转服务,支持多账户管理 English • 快速开始 • 演示站点 • 公告频道 ⚠️ 重要提醒 使用本项目前请仔细阅读: 🚨 服务条款风险: 使用本项目可能违反Anthropic的服务条款。请在使用前仔细阅读Anthropic的用户协议,使用本项目的一切风险由用户自行承担。 📖 免责声明: 本项目仅供技术学习和研究使用,作者不对因使用本项目导致的账户封禁、服务中断或其他损失承担任何责任。 🤔 这个项目适合你吗? - 🌍 地区限制: 所在地区无法直接访问Claude Code服务? - 🔒 隐私担忧: 担心第三方镜像服务会记录或泄露你的对话内容? - 👥 成本分摊: 想和朋友一起分摊Claude Code Max订阅费用? - ⚡ 稳定性: 第三方镜像站经常故障不稳定,影响效率 ? 如果有以上困惑,那这个项目可能适合你。 适合的场景 ✅ 找朋友拼车: 三五好友一起分摊Claude Code Max订阅 ✅ 隐私敏感: 不想让第三方镜像看到你的对话内容 ✅ 技术折腾: 有基本的技术基础,愿意自己搭建和维护 ✅ 稳定需求: 需要长期稳定的Claude访问,不想受制于镜像站 ✅ 地区受限: 无法直接访问Claude官方服务 💭 为什么要自己搭? 现有镜像站可能的问题 - 🕵️ 隐私风险: 你的对话内容都被人家看得一清二楚,商业机密什么的就别想了 - 🐌 性能不稳: 用的人多了就慢,高峰期经常卡死 - 💰 价格不透明: 不知道实际成本 自建的好处 - 🔐 数据安全: 所有接口请求都只经过你自己的服务器,直连Anthropic API - ⚡ 性能可控: 就你们几个人用,Max 200刀套餐基本上可以爽用Opus - 💰 成本透明: 用了多少token一目了然,按官方价格换算了具体费用 - 📊 监控完整: 使用情况、成本分析、性能监控全都有 🚀 核心功能 基础功能 - ✅ 多账户管理: 可以添加多个Claude账户自动轮换 - ✅ 自定义API Key: 给每个人分配独立的Key - ✅ 使用统计: 详细记录每个人用了多少token 高级功能 - 🔄 智能切换: 账户出问题自动换下一个 - 🚀 性能优化: 连接池、缓存,减少延迟 - 📊 监控面板: Web界面查看所有数据 - 🛡️ 安全控制: 访问限制、速率控制、客户端限制 - 🌐 代理支持: 支持HTTP/SOCKS5代理 📋 部署要求 硬件要求(最低配置) - CPU: 1核心就够了 - 内存: 512MB(建议1GB) - 硬盘: 30GB可用空间 - 网络: 能访问到Anthropic API(建议使用US地区的机器) - 建议: 2核4G的基本够了,网络尽量选回国线路快一点的(为了提高速度,建议不要开代理或者设置服务器的IP直连) - 经验: 阿里云、腾讯云的海外主机经测试会被Cloudflare拦截,无法直接访问claude api 软件要求 - Node.js 18或更高版本 - Redis 6或更高版本 - 操作系统: 建议Linux 费用估算 - 服务器: 轻量云服务器,一个月30-60块 - Claude订阅: 看你怎么分摊了 - 其他: 域名(可选) 🚀 脚本部署(推荐) 推荐使用管理脚本进行一键部署,简单快捷,自动处理所有依赖和配置。 快速安装 脚本功能 - ✅ 一键安装: 自动检测系统环境,安装 Node.js 18+、Redis 等依赖 - ✅ 交互式配置: 友好的配置向导,设置端口、Redis 连接等 - ✅ 自动启动: 安装完成后自动启动服务并显示访问地址 - ✅ 便捷管理: 通过 crs 命令随时管理服务状态 管理命令 安装示例 系统要求 - 支持系统: Ubuntu/Debian、CentOS/RedHat、Arch Linux、macOS - 自动安装 Node.js…
Details
- Repository
- Wei-Shaw/claude-relay-service
- Website
- pincc.ai
- Language
- JavaScript
- License
- MIT
- Last updated
- 3 November 2026
- Topics
- claudeclaude-apiclaude-codeclaude-proxycodex-clicrsdroiddroid-clidroid2apigemini-cli
- Listed in
- subinium/awesome-claude-code
FAQ
What is Claude Relay Service?
Self-hosted relay that pools Claude and other subscriptions behind one endpoint for Claude Code. It is a model router for Claude Code, from Wei-Shaw/claude-relay-service on GitHub.
How do I install Claude Relay Service?
Clone Wei-Shaw/claude-relay-service from GitHub and follow the setup steps in its README.
Is Claude Relay Service popular?
Wei-Shaw/claude-relay-service has 12,768 GitHub stars and 1,882 forks, and is included in 1 curated Claude Code list. It was last updated on 3 November 2026.
More model routers & proxies
Reverse Skill
44kzhaoxuya520/reverse-skill
Reverse Engineering / Authorized Penetration Testing / Security Research Skill Router Pack AI-powered routing + On-demand toolchain bootstrapping + Self-evolving knowledge base Supports Claude Code, Kiro, Cursor, Cline, and other AI coding clients 逆向/渗透/安全技能路由包 - AI 自动路由 + 按需自举工具链 + 自动进化经验库 | 支持 Claude Code / Kiro / Cursor / Cline 等代码 AI 客户端
Opencodex
18klidge-jun/opencodex
Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code
LibreChat
47kLibreChat-AI/LibreChat
Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active
claude-code-proxy
3.8k1rgs/claude-code-proxy
Proxy that lets Claude Code run on OpenAI or Gemini models.
Magpie
29kyetone/magpie
Menu bar app that points Claude Code and Codex at alternative models like Kimi or DeepSeek.
copilot-api
4.2kericc-ch/copilot-api
Turns a GitHub Copilot subscription into an Anthropic-compatible API that Claude Code can use.
Browse the most popular Claude Code mods, all model routers & proxies, or the skills and MCP server directories.