A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting...
10K+
Your Swiss Army Knife for API Proxy Management
| Feature | Description | Config Reference |
|---|---|---|
| 🔄 Token Rotation | Automatic key cycling across multiple providers | variables.keys |
| ⚖️ Load Balancing | 5 strategies: Round Robin, Random, Least Connections, Fastest Response, Weighted | load_balancing_strategy |
| 🚦 Rate Limiting | Granular controls per endpoint/key with smart queuing | rate_limit |
| 🕵️ Request Masking | Dynamic header substitution across multiple identity providers | headers + variables |
| 📊 Real-time Metrics | Interactive dashboard with request analytics and system health | dashboard.enabled |
docker run -d \
-p 8080:8080 \
-v ${PWD}/config.yaml:/app/config.yaml \
-v nya-proxy-logs:/app/logs \
k3scat/nya-proxy:latest
pip install nya-proxy
nyaproxy --config config.yaml --log-level debug
| Service | Endpoint | Description |
|---|---|---|
| API Proxy | http://localhost:8080/api/<endpoint_name> | Main proxy endpoint for API requests |
| Dashboard | http://localhost:8080/dashboard | Real-time metrics and monitoring |
| Config UI | http://localhost:8080/config | Visual configuration interface |
Note: Replace 8080 with your configured port if different
gemini:
name: Google Gemini API
endpoint: https://generativelanguage.googleapis.com/v1beta/openai
aliases:
- /gemini
key_variable: keys
headers:
Authorization: 'Bearer ${{keys}}'
variables:
keys:
- your_gemini_key_1
- your_gemini_key_2
load_balancing_strategy: least_requests
rate_limit:
endpoint_rate_limit: 75/d # Total endpoint limit
key_rate_limit: 5/m # Per-key limit
rate_limit_paths:
- "/v1/chat/*" # Apply limits to specific paths
- "/v1/images/*"
novelai:
name: NovelAI API
endpoint: https://image.novelai.net
aliases:
- /novelai
key_variable: tokens
headers:
Authorization: 'Bearer ${{tokens}}'
variables:
tokens:
- your_novelai_token_1
- your_novelai_token_2
load_balancing_strategy: round_robin
rate_limit:
endpoint_rate_limit: 10/s
key_rate_limit: 2/s
Monitor at http://localhost:8080/dashboard:
Manage at http://localhost:8080/config:
graph TD
A[Client] --> B[Nginx]
B --> C[NyaProxy]
C --> D[Auth Service]
D --> E[API Providers]
F[Monitoring] --> D
graph LR
A[Q3 2025] --> B[🔄 Smart Request Routing]
A --> C[📡 gRPC/WebSocket Support]
B --> D[📈 Auto-scaling Rules]
C --> E[📊 Protocol Analytics]
F[Q4 2025] --> G[🧩 Plugin System]
F --> H[🔍 Custom Metrics API]
Need enterprise support? Contact [email protected]
Content type
Image
Digest
sha256:8586bca69…
Size
29.9 MB
Last updated
2 months ago
docker pull k3scat/nya-proxy