- 📊 Real-time Usage Monitoring - Track API usage, costs, and token consumption
- 💳 Comprehensive Metrics - View total and daily usage statistics
- ⚡ Performance Insights - Monitor response times, RPM, and TPM
- 🚦 Rate Limit Visualization - Visual progress bars for rate limits
- 📈 Model Statistics - Detailed breakdown by model with token and cost tracking
- 🔐 Session Persistence - Auto-save API keys across page refreshes
- 🎨 Modern UI - Clean, responsive design with OKLCH color space
- 🌐 Bilingual Interface - English and Chinese support, auto-detects browser language
- 🐳 Docker Ready - Single environment variable, easy deployment
- Docker installed on your system
- A valid Sub2API domain (e.g.,
https://your-sub2api-domain.com)
# Set your Sub2API domain
export API_BASE_URL=https://your-sub2api-domain.com
docker run -d \
-p 11080:11080 \
-e API_BASE_URL=${API_BASE_URL} \
--name sub2api-key-dashboard \
rysinal86/sub2api-key-dashboardThen open your browser and navigate to http://localhost:11080
- Clone the repository
git clone https://github.com/rysinal86/sub2api-key-dashboard.git
cd sub2api-key-dashboard- Build the Docker image
docker build -t sub2api-key-dashboard .- Run the container
# Set your Sub2API domain
export API_BASE_URL=https://your-sub2api-domain.com
docker run -d \
-p 11080:11080 \
-e API_BASE_URL=${API_BASE_URL} \
--name sub2api-key-dashboard \
sub2api-key-dashboardA docker-compose.yml is included in the repository. Just clone and start:
- Clone the repository
git clone https://github.com/rysinal86/sub2api-key-dashboard.git
cd sub2api-key-dashboard- Set your Sub2API domain and start
# Set your Sub2API domain (required)
export API_BASE_URL=https://your-sub2api-domain.com
docker-compose up -dNote:
API_BASE_URLmust be set before runningdocker-compose up. The compose file reads it from your environment automatically.
| Variable | Description | Required |
|---|---|---|
API_BASE_URL |
Full URL of your Sub2API domain (e.g., https://your-sub2api-domain.com) |
✅ Yes |
By default, the dashboard runs on port 11080. You can change this by modifying the port mapping:
docker run -d -p 8080:11080 ... # Run on port 8080 instead- Open the dashboard in your browser
- Enter your API key in the input field
- Click "Fetch Usage" or press Enter
- View your usage statistics and metrics
The API key is automatically saved in session storage and will persist across page refreshes (within the same browser session).
- Frontend: Pure HTML, CSS, JavaScript (no framework dependencies)
- Server: Nginx (Alpine Linux)
- Containerization: Docker
- Design: OKLCH color space, responsive layout
- Chrome/Edge 90+
- Firefox 88+
- Safari 14.1+
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
If you have any questions or issues, please open an issue on GitHub.
If you find this project useful, please consider giving it a star!
