# Cost controls — turn AI spend into a managed line item

Every team is being told to use more AI, and the bill is climbing: tokens, seats,
models. The goal isn't to spend less — it's to spend *deliberately*, so the spend
maps to value you can point at. This is the team-level version of "right-size the
model."

## The five controls

### 1. Estimate before you call
Tokens are the unit of cost. Roughly: cost ≈ (input tokens × input price) +
(output tokens × output price). Before standing up a workflow, estimate the
per-call token count and multiply by expected volume. A workflow that's fine at
100 calls/day can be a budget event at 100,000. **If you can't estimate it, you
can't control it.**

> **Worked example — a document-summarisation workflow.**
> Each call sends a ~4,000-token document plus a ~500-token instruction (4,500 in)
> and gets back a ~500-token summary (500 out). Take a mid-tier model at roughly
> A$3 per million input tokens and A$15 per million output tokens:
>
> - input: 4,500 × A$3 / 1,000,000 = **A$0.0135**
> - output: 500 × A$15 / 1,000,000 = **A$0.0075**
> - **≈ A$0.021 per call**
>
> Now scale it — same call, different volume:
>
> | Volume | Cost |
> |--------|------|
> | 100 calls (a pilot) | ~A$2 — noise |
> | 10,000 calls/month | ~A$210 — a line item |
> | 100,000 calls/month | ~A$2,100 — a decision |
>
> Two levers jump out from the arithmetic. **Caching** the fixed 500-token
> instruction stops you re-paying for it on every call. And **right-sizing** —
> if an economy model at ~A$0.30/A$1.20 per million does this job (summarising is
> forgiving), the per-call cost drops to ~**A$0.0018**, turning the 100k-row from
> A$2,100 into ~A$180. Same output, a 90% cut — *before* you've touched quality.

### 2. Budget per team, not per company
A single org-wide cap hides who's spending and why. Give each team a budget and
make their spend visible to them. Visibility changes behaviour faster than any
policy memo.

### 3. Alert on the trend, not just the cap
A monthly cap tells you you've overrun *after* it's happened. Alert on the
*rate*: spend-per-day, spend-per-1,000-calls, cost-per-successful-outcome. A
sudden 5× in cost-per-call usually means a workflow changed, a retry loop is
spinning, or someone reached for a frontier model by default.

### 4. Right-size by task (the biggest lever)
The model is the dominant cost dial. In one controlled test the same app cost
A$0.52 on the cheapest model and A$73 on the frontier — a **143× spread** — and
price did **not** predict quality. Default to economy; reserve the frontier for
work where a wrong answer is genuinely expensive. See `model-routing.md` and
`model-tiers.md`.

### 5. Mind the channel and the cache
*How* you call matters as much as *which* model:
- **Prompt caching** — a stable system prompt billed once, not per call — can cut
  the cost of a repetitive workflow dramatically. Structure prompts so the
  invariant part is cacheable.
- **Channel economics** — a focused build inside a coding agent can be *cheaper*
  than a raw API loop (it caches context and edits files instead of regenerating
  them); but forcing a heavy automated pipeline through an interactive session
  burns money. Match the channel to the job, and measure — it cuts both ways.

## The metric that matters

Track **cost per successful outcome**, not cost per call. A model that's twice as
expensive but halves your rework and review can be the cheaper choice. The bill
is only half the equation; the other half is whether the output was worth it.

## A starting dashboard

- Spend per team / per workflow (daily)
- Cost per call and cost per successful outcome (trend)
- Model mix — % of calls on economy vs frontier (are defaults drifting up?)
- Retry / self-heal rate (a silent cost multiplier)
- Cache hit rate on repetitive workflows
