A sleek, self-hosted dashboard to monitor your API usage and billing across multiple AI providers (OpenRouter, DeepSeek, OpenAI, Anthropic, Kimi, MiniMax, Grok, Together AI).
- Multi-Provider Support: Track 8+ major AI providers in one unified dashboard.
- Local & Secure: All API keys are stored locally in your
billing-data.json. No data is ever sent to a third-party server. - Auto & Manual Modes:
- Automatically fetches remaining credits, usage, and total top-ups.
- Allows manual tracking for providers that lack historical top-up APIs.
- MiniMax Visual Scraper: MiniMax PAYG doesn't offer a billing API. This tool includes a Puppeteer-based visual scraper that logs into your dashboard, takes a screenshot, and uses Vision AI (e.g., GPT-4o-mini via OpenRouter) to extract your exact remaining balance!
- Currency Auto-Conversion: Aggregates totals intelligently, converting CNY to USD (or vice-versa) based on real-time equivalent rates.
- Node.js (v18+)
git clone https://github.com/Maxaccurate/API-Billing-Tracker.git
cd API-Billing-Trackernpm installOn Windows:
Simply double-click start-billing.bat.
On Mac/Linux:
node billing-server.jsOpen your browser and navigate to http://127.0.0.1:8099.
Since MiniMax does not expose a billing API, we use a Headless Browser + Vision Model to read your balance.
- Edit
start-billing.bat(or your terminal environment) and setVISION_API_KEYto an OpenRouter or OpenAI API key. - The default script uses
openai/gpt-4o-minivia OpenRouter. You can change this inminimax-vision-scraper.js. - When you first refresh MiniMax, a browser window will open. Log in manually. The session will be saved locally (
.minimax_browser_data), so future refreshes will be completely silent and automatic!
Your API keys are stored entirely in billing-data.json inside your local directory. Please make sure never to commit this file to a public repository. It is included in .gitignore by default.
Feel free to open issues or submit PRs to add new API providers or improve the dashboard UI.
MIT License