Overview
Running a dozen AI providers means a dozen billing dashboards, and no answer to the only question that matters: am I about to run out mid-job? AI Usage puts that in the system tray — one panel showing what's left, what's been spent, and how fast it's going, across every provider that will tell you.
The awkward truth the project ran into: most of them won't. Of thirteen providers surveyed, exactly one returns a balance to an ordinary API key. Two more need a separate admin credential and will only report spend, never a remaining balance. The rest — including subscription plans and several major inference hosts — expose nothing programmatic at all.
How it works
- Billing models are kept distinct. Prepaid credit counts down, pay-as-you-go spend counts up, and a subscription quota resets on its own anniversary. Collapsing those into one "usage" number is how a dashboard ends up lying to you, so each is read and labelled separately.
- Burn rate is measured, not inferred. Rather than dividing a monthly total, it samples balances over time and derives the real rate from the deltas — deliberately ignoring top-ups and billing-period rollovers, which would otherwise read as negative spend. Runway ("~10 days left") comes from that.
- Anomaly alerts. A threshold only warns you once you're nearly empty. Comparing the last hour against your own established baseline catches the failure that actually costs money: an automated script stuck in a loop overnight.
- Credentials never touch disk. Keys live in the Windows Credential Manager, and the app is allow-listed to reach only the specific provider hosts it needs.
The manifest
The per-provider adapters are a workaround, not a solution — every one is a bespoke guess at a different vendor's API. So the project also proposes ai-usage: a small, authenticated JSON document a provider could serve at a well-known path, describing balance, spend and quota in one shared shape. Any client could then read any provider with no custom code. It's published as a public-domain spec alongside a report card grading vendors on whether you can read your own money at all.
Availability
Open source at github.com/charleslukowski/ai-usage — MIT for the app, public domain (CC0) for the spec. Publishing an app that handles live API credentials was a deliberate call, so the promises are mechanical rather than behavioral: keys live only in the OS credential store, never in a file or the repo, and CI runs a secret scan plus the engine's 58 self-check assertions on every push. Source-only for now — no signed binaries, so builds are your own.
Stack
Tauri v2 (Rust) wrapping a webview panel, over a dependency-free JavaScript engine that handles provider adapters, normalization, verdicts and burn-rate history — kept separate from the UI so it runs headless and is covered by its own test suite.
