Course resource

Cost Optimisation Guide

Keeping AI running cheaply, without making it worse.

How the cost is actually made

Most AI pricing is per token — roughly, per fragment of a word, counted on both what you send and what comes back.

Three things drive your bill:

  1. How often it runs — the filter problem
  2. How much you send each time — the input problem
  3. Which model you use — the tier problem

They are in that order deliberately. People optimise the third and ignore the first, which is backwards.

1. How often it runs

The filter is the single biggest lever. An automation running on every email instead of the relevant 5% costs twenty times more than it should, and no amount of prompt tuning fixes that.

Bad:   Trigger -> AI classifies -> if support, continue
Good:  Trigger -> filter to support address -> AI classifies

The first sends everything to the model. The second sends 5%.

2. How much you send

3. Which model

Match the model to the job, not to the brand.

Step Tier Why
Classification cheapest that passes your test set It is picking from four options
Extraction cheap Constrained, verifiable
Filtering, deduplication cheap Or do it without AI at all
Drafting for a human capable Quality matters, volume is low
Final customer-facing output capable Worth the money
Bulk processing cheapest that works Volume multiplies everything

Test before assuming you need the expensive one. Run your test set against the cheap model. Often it passes, and the saving is an order of magnitude.

The audit

Workflow Runs/month AI calls per run Model Cost/run Monthly
Total

Sort by monthly cost. Optimise the top two and ignore the rest — the bottom half of that list is rarely worth your time.

The caps that prevent disasters

Calculate the worst case before launch: max cost per run × max possible runs per day × 30. If that figure would be a problem, the caps are too loose.

The things that actually cause bill shocks

No filter. Covered above, and it is almost always this.

A loop without a cap. Retrying forever against a failing API.

A trigger firing more than expected. A webhook that fires on every field change rather than on creation.

Backfill on first run. Connecting to a sheet with 5,000 existing rows and processing all of them.

Someone else's testing. A colleague running the workflow repeatedly to see how it works.

Expensive model on a high-volume step. The classification step running a frontier model 10,000 times a month.

Where not to economise

The monthly review

Month Total cost Biggest workflow Change vs last What I changed

Watch for cost rising without volume rising. That usually means a filter stopped working, or a workflow started running on something it should not.

The honest framing

For most individuals, AI costs are small and the optimisation is not worth much of your time. Do the filter properly, pick the right model tier per step, set a cap, and move on.

It becomes worth real attention at volume — thousands of runs a month — or when a single workflow is processing large documents repeatedly. Until then, your time is the expensive resource, not the tokens.

Back to dashboard