Spaces:
Build error
Build error
File size: 1,107 Bytes
137bdb5 a426e85 137bdb5 a426e85 137bdb5 a426e85 137bdb5 a426e85 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
---
title: anthropic-gemini-proxy
emoji: 🤖
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: mit
---
# 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 key
- `PROXY_API_KEY` - Secret key for proxy authentication (e.g., `sk-proxy-yoursecret`)
### Make Requests
```bash
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 completion
- `GET /anthropic/v1/models` - List models
- `GET /health` - Health check
|