gitmyhub

claude-relay-service

JavaScript ★ 12k updated 1d ago

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

A self-hosted relay server that lets a small team share one or more Claude AI accounts, giving each person their own API key with individual usage tracking and rate limits.

JavaScriptNode.jsRedisDockersetup: moderatecomplexity 4/5

This project is a self-hosted relay server that sits between users and Anthropic's Claude API. Instead of each person on a team paying separately, one person runs this service on a private server, connects multiple Claude accounts to it, and shares access with others through individual API keys. The server rotates requests across the connected accounts, tracks how many tokens each user has consumed, and gives each user their own rate limits and model restrictions.

The practical audience the README describes is small groups, such as three to five friends who want to split the cost of a Claude Code Max subscription. Each person gets a personal API key from the relay service, then points their local Claude Code tool at the relay server instead of Anthropic directly. The relay forwards requests to whichever connected Claude account is currently available.

The service is written in JavaScript and runs on Node.js with Redis for caching and session state. It includes a web management panel where the administrator can add Claude accounts, create API keys, view usage statistics, set per-key rate limits and concurrency caps, and restrict which AI models each key can access. Docker and a one-command install script are both available for deployment.

The README opens with a prominent security warning: versions 1.1.248 and below had a serious vulnerability that let attackers access the admin panel without valid credentials. Users are told to update to version 1.1.249 or later, or to migrate to a successor project called CRS 2.0.

The README also carries a clear disclaimer that using this tool may violate Anthropic's terms of service, and that any consequences such as account suspension are the user's responsibility alone. The project is described as intended for technical learning and research. The service also supports Gemini and other OpenAI-compatible providers, so it can act as a unified relay for multiple AI providers under a single endpoint.

Where it fits