Spaces:
Runtime error
Runtime error
Update README for API service
Browse files
README.md
CHANGED
|
@@ -9,51 +9,70 @@ app_file: app.py
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
-
# Enhanced Gemini Multi-API
|
| 13 |
|
| 14 |
-
|
| 15 |
|
| 16 |
-
A
|
| 17 |
|
| 18 |
## Features
|
| 19 |
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
-
|
| 23 |
-
-
|
| 24 |
-
-
|
| 25 |
-
-
|
| 26 |
|
| 27 |
-
|
| 28 |
-
- `
|
| 29 |
-
- `
|
| 30 |
-
- `
|
| 31 |
-
- `
|
| 32 |
-
-
|
| 33 |
|
| 34 |
-
|
| 35 |
-
-
|
| 36 |
-
-
|
| 37 |
-
-
|
| 38 |
-
-
|
|
|
|
| 39 |
|
| 40 |
-
|
| 41 |
-
- Environment-based API key management
|
| 42 |
-
- Temperature and token controls
|
| 43 |
-
- Dynamic model switching
|
| 44 |
-
- Comprehensive error handling
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
## Status
|
| 54 |
|
| 55 |
-
β
**
|
| 56 |
-
β
**
|
| 57 |
-
β
**
|
| 58 |
|
| 59 |
-
**Updated:** 2025-11-14 04:
|
|
|
|
| 9 |
pinned: false
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Enhanced Gemini Multi-API - Anthropic Compatible Service
|
| 13 |
|
| 14 |
+
π€ **Anthropic API Compatible Interface for Google Gemini Models**
|
| 15 |
|
| 16 |
+
A production-ready API service that provides Google Gemini models through an Anthropic-compatible interface, similar to MiniMax's Anthropic API compatibility.
|
| 17 |
|
| 18 |
## Features
|
| 19 |
|
| 20 |
+
β
**Anthropic Compatible Endpoints**
|
| 21 |
+
- `POST /v1/messages` - Chat completions
|
| 22 |
+
- `GET /v1/models` - List available models
|
| 23 |
+
- `POST /v1/completions` - OpenAI compatible fallback
|
| 24 |
+
- `GET /health` - Health check
|
| 25 |
+
- `GET /info` - API information
|
| 26 |
|
| 27 |
+
β
**Model Support**
|
| 28 |
+
- `claude-3-sonnet-20240229` β Gemini 1.5 Pro
|
| 29 |
+
- `claude-3-haiku-20240307` β Gemini 1.5 Flash
|
| 30 |
+
- `claude-3-5-sonnet-20241022` β Gemini 1.5 Pro
|
| 31 |
+
- `claude-3-5-haiku-20241022` β Gemini 1.5 Flash
|
| 32 |
+
- Direct Gemini models: gemini-1.5-pro, gemini-1.5-flash, etc.
|
| 33 |
|
| 34 |
+
β
**API Features**
|
| 35 |
+
- Full Anthropic API compatibility
|
| 36 |
+
- Proper response formatting
|
| 37 |
+
- Token usage tracking
|
| 38 |
+
- Error handling
|
| 39 |
+
- Rate limiting ready
|
| 40 |
|
| 41 |
+
## Usage
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
### Basic Usage
|
| 44 |
+
```bash
|
| 45 |
+
curl -X POST https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/messages \
|
| 46 |
+
-H "Content-Type: application/json" \
|
| 47 |
+
-H "Authorization: Bearer $HF_TOKEN" \
|
| 48 |
+
-d '{
|
| 49 |
+
"model": "claude-3-haiku-20240307",
|
| 50 |
+
"messages": [{"role": "user", "content": "Hello!"}],
|
| 51 |
+
"max_tokens": 1024,
|
| 52 |
+
"temperature": 0.7
|
| 53 |
+
}'
|
| 54 |
+
```
|
| 55 |
|
| 56 |
+
### List Models
|
| 57 |
+
```bash
|
| 58 |
+
curl https://likhonsheikh-enhanced-gemini-multi-api.hf.space/v1/models
|
| 59 |
+
```
|
| 60 |
|
| 61 |
+
### Health Check
|
| 62 |
+
```bash
|
| 63 |
+
curl https://likhonsheikh-enhanced-gemini-multi-api.hf.space/health
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Configuration
|
| 67 |
+
|
| 68 |
+
**Required:** Set `GEMINI_API_KEY` in Space secrets for full functionality.
|
| 69 |
+
|
| 70 |
+
**Optional:** Set `HF_TOKEN` for additional authentication.
|
| 71 |
|
| 72 |
## Status
|
| 73 |
|
| 74 |
+
β
**PRODUCTION READY API SERVICE**
|
| 75 |
+
β
**ANTHROPIC COMPATIBLE INTERFACE**
|
| 76 |
+
β
**FULL GEMINI MODEL SUPPORT**
|
| 77 |
|
| 78 |
+
**Updated:** 2025-11-14 04:17:24
|