CC-Relay

Redefining the Claude Code multi-model story

Current Features
🔑
Multiple API Keys

Pool multiple keys per provider for higher throughput

🔐
Multi-Auth Support

API key and Bearer token authentication for flexible access

📡
SSE Streaming

Perfect compatibility with Claude Code's real-time streaming

🎛️
Debug Logging

Detailed request/response logging for troubleshooting

⚙️
Environment Variables

Secure configuration with ${VAR} expansion in YAML

🚀
Easy Setup

One-command Claude Code integration with cc-relay config cc init

Quick Start

Terminal — bash
$ # Install
$ go install github.com/omarluq/cc-relay@latest
✓ installed cc-relay@latest
$ # Initialize configuration
$ cc-relay config init
✓ Config created at ~/.config/cc-relay/config.yaml
$ # Configure Claude Code integration
$ cc-relay config cc init
✓ Claude Code configured to use cc-relay
$ # Run the server
$ cc-relay serve
→ Server started on http://localhost:8787
$ # Start using Claude Code
$ claude
✓ Connected via cc-relay

Architecture

CC-Relay sits between your LLM client and backend providers, proxying requests with full Anthropic API compatibility

Client Layer
🤖
Claude Code Client
POST /v1/messages
Proxy Engine
🔐 Authentication
📝 Request Logging
📡 SSE Streaming
🔑 API Key Management
Provider Layer (Implemented)
Anthropic
Claude Models
Z.AI
GLM Models
Coming Soon
Ollama
Local Models
AWS Bedrock
SigV4 Auth
Azure Foundry
Deployments
Vertex AI
OAuth

Use Cases

Power your development workflow with CC-Relay

🔄

Provider Flexibility

Switch between Anthropic and Z.AI without changing your client code

👥

Development Teams

Share API quota across multiple developers with pooled keys

🔑

API Key Management

Centralize and rotate API keys without client updates

💰

Cost Comparison

Test Z.AI's GLM models as a lower-cost alternative

🔐

Subscription Passthrough

Route Claude Code subscription users through your proxy

🐛

Request Debugging

Log and inspect API requests for troubleshooting

Contributing

CC-Relay is open source! Contributions are welcome

AGPL 3 License - see LICENSE for details