feat: add public stats dashboard and request/token tracking
This commit is contained in:
parent
9850334202
commit
f984a7e8e2
5 changed files with 1273 additions and 1 deletions
|
|
@ -6,6 +6,7 @@ An OpenAI v1 compatible API endpoint that rotates Gemini API keys to avoid rate
|
|||
|
||||
- 🔐 **Password-based API key authentication** - Clients must provide a configured password as their API key
|
||||
- 🔄 **Automatic API key rotation** - Rotates across multiple Gemini API keys to avoid rate limiting
|
||||
- 📊 **Public statistics dashboard** - Live metrics page at the root (`/`) showing request count (went through, failed, cancelled) and token usage (input + output) with zero-knowledge privacy
|
||||
- 📝 **Request/response logging** - Logs all API requests and responses to JSON files
|
||||
- 🎯 **OpenAI v1 compatible** - Drop-in replacement for OpenAI API endpoints
|
||||
- ⚡ **Rate limit handling** - Automatically handles rate limiting and rotates to available keys
|
||||
|
|
@ -181,6 +182,12 @@ Create chat completions (OpenAI v1 compatible)
|
|||
}
|
||||
```
|
||||
|
||||
#### `GET /`
|
||||
Public stats dashboard (HTML in web browsers, JSON if `Accept: application/json` is provided). Does not require authentication and reveals only aggregate statistics (no prompt contents, completions, headers, or sender data).
|
||||
|
||||
#### `GET /api/stats`
|
||||
Public JSON statistics endpoint returning request counts (went through, failed, cancelled) and token metrics (input, output, total).
|
||||
|
||||
#### `GET /v1/models`
|
||||
List available models
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue