sheikhcoders/anthropic-gemini-proxy-1763109493
0
Anthropic-Compatible API Powered by Gemini 2.5
A production-grade API proxy providing Claude-compatible endpoints with Gemini 2.5 intelligence.
Features
- Claude API Compatible endpoints
- Streaming support (SSE)
- Token accounting & usage tracking
- Rate limiting per API key
- Production-ready with health checks
Usage
Set Your API Keys
Go to Space Settings → Variables and add:
GEMINI_API_KEY- Your Google Gemini API keyPROXY_API_KEY- Secret key for proxy authentication (e.g.,sk-proxy-yoursecret)
Make Requests
curl -X POST https://YOUR-SPACE-URL/anthropic/v1/messages \
-H "x-api-key: sk-proxy-yoursecret" \
-H "Content-Type: application/json" \
-d '{'model': 'claude-3-5-sonnet-20241022', 'max_tokens': 1024, 'messages': [{'role': 'user', 'content': 'Hello!'}]}'Endpoints
POST /anthropic/v1/messages- Create completionGET /anthropic/v1/models- List modelsGET /health- Health check
