Spend Guard — see which model and day is driving your AI bill
A window from 1 to 365 days, grouped by model, by day and by status, so you can find the feature that is eating the budget before the invoice arrives.
Who it is for
Engineering leads and finance partners at teams spending more than a few hundred dollars a month on inference.
The problem it removes
- Spend is rising and nobody can name the cause.
- One feature or one model is silently consuming most of the quota.
- A retry loop or a bad deploy runs for days before anyone notices.
What you get
- Totals for requests, tokens and cost over any window up to 365 days
- Breakdown by model, ordered by token volume
- Daily series for trend and anomaly spotting
- Status breakdown so failed or fallback traffic is visible
- JSON, ready for a dashboard or a Slack digest
How to use it
1. Activate the add-on
Dashboard → Billing → Add-ons → Spend Guard.
2. Query the window you care about
days=30 is the default; the maximum is 365.
3. Chart the fields you need
totals, by_model, by_day and by_status are separate arrays so a chart never needs to flatten them.
curl -sS "https://plugsky.com/api/addons/spend/summary?days=30" \
-H "Authorization: Bearer $PLUGSKY_SESSION"
The four arrays the endpoint returns
One request returns four independent arrays rather than one flattened table. Each array answers a different question, and keeping them separate means a chart never has to guess which rows to group.
| Field | Grouped by | Question it answers |
|---|---|---|
| totals | nothing — one row | How much did the window cost in total? |
| by_model | model | Which model is consuming the budget? |
| by_day | calendar day | When did the change happen? |
| by_status | ok / fallback / error | How much traffic is failing or falling back? |
Every array carries requests, tokens and cost, and by_model adds average latency. The window is set with ?days=, from 1 to 365, defaulting to 30.
Finding the model that drives the bill
Start with by_model sorted by token volume, which is how the endpoint returns it. The top row is the model to examine. Three patterns account for most surprises.
- A flagship model on a narrow task. Classification, extraction and routing often work on a smaller model. The top row being a flagship model for a high-volume, low-complexity job is the usual finding.
- A fallback that became primary. If
by_modelshows a model you did not choose at the top, a fallback rule is firing more than expected. The status breakdown will show the corresponding fallback count. - Prompt growth. Token volume rising while request count is flat means each request is getting larger — usually conversation history that is never trimmed.
None of those conclusions require the prompt text. The counts are enough to know where to look in the code.
Reading the daily series
by_day is a time series with one row per day that had traffic. A step change is a deploy; a spike is a retry loop or a batch job; a slow climb is prompt growth or adoption. Each has a different fix, and the shape tells you which one you have before you open a single request log.
Days with no traffic are absent rather than zero, so a chart should fill gaps explicitly. Treating a missing day as zero is fine for a trend line and wrong for a per-day average.
Paid traffic versus failed traffic
The status breakdown separates ok, fallback and error. A high error count that still carries cost is the most expensive kind of bug: the request failed, the customer saw nothing, and the tokens were consumed anyway. That combination is worth an alert, and the summary gives you the number to alert on.
Fallback traffic is not inherently bad — it is the mechanism that keeps a request alive when a primary model is unavailable. What matters is the ratio. A fallback rate that climbs over a week usually means a capacity or latency problem upstream.
What it does not do
- No budget enforcement. It reports; it does not block a request or cap a key. A budget that stops traffic is a different product, and calling this one a guard would be inaccurate.
- No per-customer attribution. The usage record groups by model, day and status. If you need cost per customer, record your own customer identifier alongside each request and join on it outside the platform.
- No Slack or email delivery. The response is JSON. A scheduled job that posts it to Slack is a few lines, but the delivery is yours, not the add-on's.
- No anomaly detection. The daily series makes an anomaly visible; it does not classify one for you.
The price reflects that scope. A reporting endpoint that is honest about being a reporting endpoint is more useful than a dashboard that implies enforcement it does not have.
A worked reading
Suppose totals shows 4.1 million tokens and $38 over 30 days, and by_model puts one flagship model at 3.2 million of them. by_day is flat for three weeks and then steps up on a Tuesday. by_status shows fallback traffic at 4% for the same period. The reading is a deploy on that Tuesday that changed routing, not a gradual drift in usage. The next step is the deploy log, not the billing page — and that is the whole value of returning four arrays instead of one number.
Window, freshness and query cost
Requests are recorded as they complete, so the summary reflects the table at query time. There is no nightly aggregation step and therefore no lag to explain. The maximum window is 365 days in one request; longer histories need multiple calls.
The query is a group-by over indexed rows scoped to one workspace. It is not free, but it is not the kind of query that needs a cache either. Calling it once a minute from a dashboard is reasonable; calling it in a loop per page view is not.
Spend Guard or Usage Export?
They answer different questions and are usually bought together. Spend Guard is the summary you look at to decide where to investigate. Usage Export is the row-level file you load when the investigation needs to reconcile against an invoice or a customer chargeback. Spend Guard tells you the flagship model is 70% of the bill; Usage Export lets you prove which requests.
Questions
Is this a proxy?
No. It reads the usage records Plugsky already stores for your workspace. There is no extra hop in the request path.
Does it change my bill?
No. It only reports. Budget enforcement across providers is a separate roadmap item.
Which models are included?
Every model your workspace calls, including fallback traffic, grouped by the model field recorded at request time.
How fresh is the data?
Requests are recorded as they complete; the summary reflects the current table at query time.
What is the maximum window?
365 days per request.
Sources
- Plugsky pricing — plan limits and fair use — checked 21 November 2026
- Plugsky model catalogue — checked 21 November 2026
- Stripe subscriptions overview — checked 21 November 2026
Related add-ons
Usage Export
Download every request your workspace makes — model, tokens, cost, status and latency — as a CSV with a fixed header. Built for finance reconciliation and warehouse loads.
AI Cost Index Pro
A dated JSON dataset of Plugsky plan prices, intervals and the live model capability matrix, built for procurement comparison and internal budgeting.
Activate from the dashboard; Stripe handles the subscription and access is granted automatically.
Open billingCompare add-ons