Self-hosted · one-time $49 · stdlib only

Stop bleeding money on silent LLM outages.

The exact scripts a one-person AI API business runs in production — templated, de-branded, drop-in ready for One API / New API / LiteLLM.

Buy on Creem — $49 buy once, own it, lifetime updates

Why this exists

On 2026-09-18 a solo operator's billing pool hit zero. 19 customer keys returned 403 for ~45 hours — silently. The health check watched the web app, not the dependency. The fix was written the next morning and has run every 5–30 minutes since. This pack is that exact stack, with every secret turned into a one-line config.

What's inside

oneapi_pool_monitor.py
Watches pool quota and live-probes a real customer key (actual chat call). Alerts to any webhook.
customer_quota_alert.py
Emails paying customers at ≤10% balance. 7-day dedupe, excludes test accounts.
llm_billing_calculator.py
Your real cost, markup, and suggested retail — the pricing math behind a profitable reseller.
usage_sql_examples.sql
Copy-paste queries: per-customer cost, churn, 30-day trend, model mix.
grafana_cost_dashboard.json
Import-ready: daily usage, pool $ remaining, low-balance table, model pie.
README
30-minute setup, cron lines, the full incident post-mortem.

Who it's for

FAQ

Is this a SaaS? No. You run the scripts on your own server. That's the point — the value is battle-tested logic from a real 45-hour incident, not a dashboard you have to trust.

Any dependencies? Python 3 standard library only. No pip install.

Will it leak my data? No telemetry, no phone-home. Config is a block at the top of each file.

What if I use LiteLLM, not One API? Same SQLite/MySQL schema. Point ONEAPI_DB at it; queries are portable.

Buy on Creem — $49 or email wyl801216@gmail.com to get it directly