● Deploy anywhereGet API key

Home / Add-ons / Spend Guard

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.

$29 per month

Billed monthly through Stripe · cancel any time · access ends at the end of the paid period

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

What you get

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.

Response shape for GET /api/addons/spend/summary.
FieldGrouped byQuestion it answers
totalsnothing — one rowHow much did the window cost in total?
by_modelmodelWhich model is consuming the budget?
by_daycalendar dayWhen did the change happen?
by_statusok / fallback / errorHow 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.

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.

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

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

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.

$19/month · Read more →

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.

$49/month · Read more →

Ready to use it?

Activate from the dashboard; Stripe handles the subscription and access is granted automatically.

Open billingCompare add-ons