Zero-cost, self-hosted API cost tracking for bootstrapped founders.
Stop burning money on expensive monitoring tools. Track your Claude API, Perplexity, Firecrawl, and other API costs with a beautiful local dashboard - no monthly fees, no data leaving your machine.
You're building with AI APIs. Costs can spike without warning. Expensive monitoring tools like Datadog ($500+/mo) are overkill. This dashboard gives you enterprise-grade cost tracking for $0/month using tools you already have.
- π Real-time cost tracking across multiple API providers
- π¨ Smart alerts via Telegram when budgets are exceeded
- π Cache anomaly detection (catches expensive cache writes before they burn your budget)
- π Historical trends with 30-day charts
- π Dark mode (because we code at night)
- π± Mobile responsive
- β‘ Auto-refresh every 60 seconds
- π Completely free - uses SQLite + local Next.js
- Node.js 18+
- SQLite3
- A Unix-like system (macOS or Linux)
- Clone the repo
git clone https://github.com/7alexhale5-rgb/api-cost-dashboard.git
cd api-cost-dashboard
npm install- Set up the data collector
# Create the data directory
mkdir -p ~/.api-usage/logs
# Copy the collection script
cp scripts/setup/collect.sh ~/.api-usage/
chmod +x ~/.api-usage/collect.sh
# Copy the schema
cp scripts/setup/schema.sql ~/.api-usage/
sqlite3 ~/.api-usage/usage.db < ~/.api-usage/schema.sql
# Copy the config template
cp scripts/setup/config.json ~/.api-usage/
# Set up your API keys
echo 'export ANTHROPIC_ADMIN_KEY="sk-ant-admin-..."' >> ~/.config/api-keys.env
echo 'export PERPLEXITY_API_KEY="pplx-..."' >> ~/.config/api-keys.env- Set up the cron job (collects data every 15 minutes)
# macOS (launchd)
cp scripts/setup/com.api-usage-collect.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.api-usage-collect.plist
# Linux (systemd)
sudo cp scripts/setup/api-usage-collect.service /etc/systemd/system/
sudo systemctl enable api-usage-collect.timer
sudo systemctl start api-usage-collect.timer- Start the dashboard
npm run dev- β Anthropic (Claude API via Admin API)
- β Perplexity (sonar-pro, sonar-deep-research)
- β Firecrawl (credit tracking)
- π OpenAI (coming soon)
- π Google AI (Gemini)
- π Voyage AI
Want to add a provider? See CONTRIBUTING.md
Cost summary, trends, budget alerts, and token usage at a glance
Cache anomaly detection caught a $36 Haiku spike before it got worse
Detect runaway cron jobs and kill them before they drain your budget
βββββββββββββββββββββββ
β API Providers β
β (Claude, etc) β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β collect.sh β
β (runs every 15min) β
β - Polls Admin APIs β
β - Calculates costs β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β SQLite Database β
β ~/.api-usage/ β
β usage.db β
ββββββββββββ¬βββββββββββ
β
βΌ
βββββββββββββββββββββββ
β Next.js Dashboard β
β localhost:3400 β
β - Charts & Alerts β
βββββββββββββββββββββββ
Edit ~/.api-usage/config.json:
{
"providers": {
"anthropic": {
"daily_limit_usd": 5.00,
"monthly_limit_usd": 50.00,
"alert_threshold_pct": 80
},
"perplexity": {
"daily_limit_usd": 3.00,
"monthly_limit_usd": 20.00
}
},
"retention_days": 90,
"telegram": {
"enabled": true,
"bot_token": "YOUR_BOT_TOKEN",
"chat_id": "YOUR_CHAT_ID"
}
}Default limits (customize in config):
| Provider | Daily Warning | Daily Critical | Monthly Cap |
|---|---|---|---|
| Anthropic | $2.00 | $5.00 | $50.00 |
| Perplexity | $1.00 | $3.00 | $20.00 |
| Combined | $3.00 | $8.00 | $70.00 |
Dashboard:
- Next.js 14 (App Router)
- TypeScript
- Tailwind CSS
- Recharts
- better-sqlite3
- React Query
Data Collection:
- Bash scripts
- SQLite
- cron/launchd
Datadog? - $500+/mo, overkill for indie devs CloudZero? - $500-2000/mo, great but expensive Langfuse? - Focused on traces, not cost dashboards DIY spreadsheet? - No alerts, no trends, manual work
This tool gives you 90% of the features for 0% of the cost.
- OpenAI integration
- Google AI (Gemini) support
- Cost forecasting (ML-based)
- Slack/Discord alerts
- Docker image
- Multi-workspace support
- Export to CSV
- Budget recommendations (AI-powered)
We love contributions! See CONTRIBUTING.md
Ways to contribute:
- π Report bugs
- π‘ Suggest features
- π Add new API providers
- π Improve docs
- π¨ Design improvements
MIT License - see LICENSE
Built by @7alexhale5-rgb for the bootstrapped founder community.
Inspired by the need to track runaway Haiku cache writes that were burning $36/day. π₯
If this saved you money, give it a star! It helps other founders find it.
Made with β by a vibe coder who got tired of surprise API bills