AI spend control
What your AI costs, attributed to the model, the feature and the ledger that spent it — reported as events, on the same pipeline that already carries your orders and leads. Nothing here reads a prompt.
In short
- Enterprise AI spend rose 108% year over year to roughly $1.2M on average, and 78% of IT and finance leaders were hit by charges they had not budgeted for. Consumption pricing means one team can produce a six-figure bill in weeks.
- Connect OpenAI, Anthropic, or an AI gateway and spend arrives as events:
llm.usage_reportedfor tokens,llm.cost_reportedfor money,llm.credits_reportedfor a prepaid balance. - Money lives on one event so summing it is the bill, never a per-model multiple of it.
- The
AI spendtemplate is nine widgets: spend, credits left, cost per 1M tokens, cache hit rate, spend over time, and spend by feature, model and ledger. - Two rates decide your bill more than any discount: output costs several times input, and a cache read is roughly an eighth of an input token.
- Aggregates only. No prompts, no completions.
Why a total is not an answer
The teams surprised by an AI invoice were not surprised by the size of it. They were surprised because no line in it pointed at somebody who could act. A model name is a start; a feature and a person is a decision. That is the whole design brief for these pages.
| Question | What answers it | Status |
|---|---|---|
| What did we spend? | Sum cost_usd over llm.cost_reported | live |
| Did the rate change, or just the volume? | Cost per 1M tokens — a formula widget, so a discount shows as a step | live |
| Are we wasting the cheap path? | Cache hit rate — cache reads are about an eighth of input price | live |
| Which feature spent it? | Group by attributes.tag, set at your call site | live |
| Which ledger — direct, or through a gateway? | Group by attributes.provider | live |
| Will the prepaid balance strand production? | llm.credits_reported carries the balance | live |
| Which person spent it? | Mapping a gateway user to a team member | not built yet |
Where this is, on 28 August 2026. The gateway connector, the dashboard template, the mapping layer and the per-person and per-department summaries are live: a gateway user is mapped to a named team member and a department, and the API reports spend by person and by department, gated to admins. What is not built yet is the billing — the add-on catalogue is defined in code and nothing charges for it — along with budgets, forecasts and a finance-system export.
The arithmetic worth knowing before you optimise
Promotional pricing on a model is easy to read as a saving and easy to be wrong about, because three things move at once: the unit price, the volume, and the mix of models. Total spend cannot separate them. Two ratios do most of the work:
| Ratio | Typical shape | What it means for you |
|---|---|---|
| Output vs input | output costs several times input per token | How much you generate matters more than how much you send. A cheaper model used more verbosely is not cheaper |
| Cache read vs input | a cache read is roughly an eighth of an input token | Cache hit rate is the biggest lever a team controls without changing model |
| Rate vs volume | cost per 1M tokens isolates one from the other | A 50% discount that doubles output tokens is a wash, and only this widget shows it |
Three pages, three questions
| If you are asking | Read |
|---|---|
| Which employee or team is spending this? | Spend per employee and team |
| Which feature costs what — and is it worth it? | Cost per feature and per outcome |
| The model I use is behind a gateway | Measuring spend through an AI gateway |
Connect it
curl -X POST https://api.hookget.com/v1/sources \
-H "authorization: Bearer $HOOKGET_KEY" \
-d '{"provider":"openai","secret":"<openai admin key>","sync_interval_sec":900}'
curl -X POST https://api.hookget.com/v1/sources \
-H "authorization: Bearer $HOOKGET_KEY" \
-d '{"provider":"ai-gateway","secret":"<gateway reporting key>","sync_interval_sec":900}'
Then create the AI spend dashboard from the template list. Keys are stored
encrypted, used only by the sync worker, and returned by no API route. Ask your gateway for a
read-only reporting key: nothing here needs a key that can spend, and one
should never be issued for it.
Questions
What is AI spend control?
Knowing what your AI actually costs, broken down far enough to do something about it: by model, by feature, by ledger, and — once the mapping layer ships — by person. A single total tells a finance team that spend doubled. It does not tell them which team can halve it, which is the only version of the number that changes anything.
How is this different from an LLM observability tool?
Those tools trace calls: latency, errors, prompts, evaluations. This is cost accounting over the same traffic, and it lands in the pipeline that already carries your orders, leads and signups. That adjacency is the whole point — "AI cost rose 40%" is a chart, and "AI cost rose 40% while leads were flat" is a decision. We are not a tracing tool and do not pretend to be one: we read aggregate reports, never prompts.
Does HookGet see our prompts?
No. Every connector here reads aggregate reporting endpoints — token counts, request
counts, model names, dollars. A gateway's request logs do contain prompts and are
deliberately not read, which is why these events carry
containsPii: false honestly rather than as a policy.
What does it cost?
Reading your own spend is part of the plan you already have: connect a provider
source and the LLM cost and AI spend templates work. The
attribution layer — per person, per team, budgets, finance export — is priced as an add-on
catalogue at $49 a month plus $4 per mapped person, and that catalogue is defined in code
but not yet billable. When it is, /pricing/ will say so.
How fresh are the numbers?
A bucket is read once it is about 90 minutes settled. Every provider and gateway keeps writing into the current bucket, so reading it early returns a number that grows afterwards. This is cost accounting: lagging by an hour and a half is correct, and double-counting an hour is not.