claude-relay-service  by Wei-Shaw

Self-host Claude API relay service

created 2 weeks ago

New!

981 stars

Top 38.4% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a self-hosted relay service for Claude, enabling users to manage multiple Claude accounts, custom API keys, and enhance privacy and security. It's designed for individuals or groups who face regional restrictions, have privacy concerns, or wish to share Claude subscription costs, offering a stable and controllable alternative to public mirror sites.

How It Works

The service acts as a proxy between users and the official Anthropic API. It leverages OAuth for secure account addition and management, allowing for automatic account rotation and distribution of unique API keys to different users. This architecture ensures that all requests are routed through the user's own server, maintaining data privacy and offering control over performance and costs.

Quick Start & Requirements

  • Installation: Via Docker (recommended) or manual Node.js setup.
  • Prerequisites: Node.js 18+, Redis 6+.
  • Hardware: Minimum 1 CPU core, 512MB RAM, 30GB disk space. Recommended 2 cores, 4GB RAM.
  • Links: Interface Preview, Announcement Channel

Highlighted Details

  • Supports multi-account management with automatic switching.
  • Enables custom API key generation for individual users.
  • Provides usage statistics and monitoring via a web interface.
  • Offers advanced features like connection pooling, caching, and access control.

Maintenance & Community

The project is actively maintained by Wei-Shaw. Users can join the Telegram announcement channel for updates.

Licensing & Compatibility

Licensed under the MIT License, allowing for commercial use and integration with closed-source applications.

Limitations & Caveats

Using this service may violate Anthropic's terms of service, and users bear all associated risks. The project is intended for technical learning and research; the author is not liable for account bans or service disruptions. Users must be able to register for Claude accounts and handle payment subscriptions independently.

Health Check
Last commit

17 hours ago

Responsiveness

Inactive

Pull Requests (30d)
40
Issues (30d)
123
Star History
1,297 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.