claude-relay-service  by Wei-Shaw

Self-host Claude API relay service

Created 2 months ago
3,180 stars

Top 15.1% 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

15 hours ago

Responsiveness

1 day

Pull Requests (30d)
77
Issues (30d)
137
Star History
1,029 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.