← All tools

Builders' Pack · self-hosted

LLM Ops Pack

Cost monitoring & customer billing scripts for One API / New API / LiteLLM. The exact stack a one-person LLM API business runs in production — templated, de-branded, drop-in ready.

Self-hosted · one-time US$79 · excl. tax/VAT · Python standard library only · no pip install · no telemetry

Checkout reopening shortly — US$79 Read the open-source core on GitHub ↗

Checkout is briefly paused while payment setup moves. The US$79 one-time price will be honored when checkout reopens — email [email protected] to reserve it or ask questions, and we will let you know the moment checkout reopens. — nothing is added for buyers outside taxed jurisdictions.

🔒 Secure checkout powered by Creem · Visa / Mastercard / Apple Pay / Google Pay · Charges appear as CREEM* on your statement.

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. You get battle-tested logic from a real 45-hour incident — not a dashboard you have to trust.

What this actually prevents

The 2026-09-18 incident cost roughly 45 hours of undetected failure. Here is what the same setup would have done instead:

Pool exhausted minutes 45 hours
Customer key silently returning 402/403 under 1 min 45 hours
Cost anomaly spotted daily at month-end
Per-customer cost query one SQL copy manual export

Setup is about 30 minutes. Copy the files, fill the one config block, add the cron line. The monitoring core is already open source — you can read every line before you buy anything: oneapi-key-monitor on GitHub →

The honest caveats

  • These are scripts, not a product. There is no dashboard to log into, no SaaS to subscribe to. You run them.
  • They assume a self-hosted One API or OpenAI-compatible gateway. If you use someone else's managed API, this is not for you.
  • Python standard library only — no pip install, no dependency drift.
  • One-time purchase. No recurring fee, no key that expires.
  • 14-day conditional refund. If it does not work in your stack, email [email protected] within 14 days with your gateway type, Python version, and error output — we will first try to fix it, and if it still does not run, you get a full refund. No refund for change of mind after download, because files cannot be returned. Duplicate charge or a file that was never delivered is always fully refunded.

What's inside

Six files. Copy, fill the config block, schedule with cron. That's the setup.

oneapi_pool_monitor.py open source ↗

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.

Example output

Below are sample outputs — the real scripts produce the same format against your own pool and keys.

oneapi_pool_monitor.py

[09:00] POOL  $12.40 left (1.24M cr)     OK
[09:00] PROBE key cus_8f2k·chat OK 1.18s  OK
[09:05] PROBE key cus_91xq·403 SILENT    → ALERT
[09:05] ALERT sent → webhook #ops      OK

customer_quota_alert.py

To: [email protected]
Subj: ⚠️ balance below 10%

~$0.90 left (9% of plan).
Top up before it hits 0
or your keys return 403.
[Manage] · 7-day dedupe

llm_billing_calculator.py

cost $0.014 / 1K cr
plan 5M cr
──────────────
your cost   $70.00
retail     $99.00
margin    ≈ 41%

usage_sql_examples.sql

SELECT user_id,
  SUM(credits)/1e6 m_cr,
  SUM(cost_usd) cost
FROM usage_log
WHERE ts > now()-30d
GROUP BY user_id;

grafana_cost_dashboard.json

Panels:
· Daily usage
· Pool $ remaining
· Low-balance table
· Model pie
Refresh 5m · import json

README — setup

1. cp config.example.py config.py
2. fill POOL_TOKEN, KEYS, HOOK
3. crontab:
  */5 * * * * python3 \
    oneapi_pool_monitor.py
4. done · zero pip install

Who it's for

· Indie hackers reselling LLM access via One API / New API / LiteLLM · Solo founders running a usage-metered AI wrapper · Anyone who's thought "wait, is my pool still funded?"

Open-source core. The key monitor is MIT-licensed on GitHub — read it before you pay.

No dependencies. Python 3 standard library only. Nothing to install.

No telemetry. No phone-home. Config is a block at the top of each file.

LiteLLM too. Same SQLite/MySQL schema — point ONEAPI_DB at it.

Own the scripts. Run them forever.

One payment, lifetime updates. Your download link lives in your Creem receipt.

Checkout reopening shortly — US$79 Running a key pool? Check your keys free → Lost the email? Recover download →

Questions? [email protected] · 14-day conditional refund — see terms above · excl. tax/VAT

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.

Need more than free tools?

Unlock 500 checks a day, larger text capacity, and priority support.

View pricing → Upgrade Lint — Pro $12/mo or $39/yr founding
💬