How to cut your AI API costs by 87% with one prompt

Corbin Brown
3 min read
The fastest way to cut an AI bill is to stop calling the AI for work that doesn't need it. Most of what an app does is deterministic: the same input always produces the same output, and that's a job for ordinary code, which costs nothing per run. When an agent builds your app, it tends to reach for the model everywhere, because the model is the tool it knows best. The video runs a single audit prompt over an inbox-digest app, decides line by line what genuinely needs AI, and cuts the monthly cost from $437 to around $56 with identical output. That's 87%.
What needs AI and what doesn't
- Doesn't need AI: sorting by date, filtering by sender, matching a keyword, formatting a number, deduplicating a list, checking whether a field is empty. If you can describe the rule completely in one sentence, it's code.
- Needs AI: judging tone, summarizing free text, deciding whether a message needs a human reply, writing a draft. If the rule is “you know it when you see it,” that's the model's job.
- The expensive middle: things the model can do that code can also do, just less conveniently. Extracting a date from a subject line, classifying by an obvious keyword. These are the calls the audit finds, and they're usually the bulk of the bill.
The audit prompt
The prompt in the video is longer than this, but the shape is the point. Ask your agent to read the whole app and produce a table with one row per AI call: where it is, what it decides, whether plain code could make the same decision, and the estimated share of monthly spend. Then have it rewrite only the rows marked replaceable, keep the output format identical, and run the before-and-after on the same sample data so you can see nothing changed but the bill.
Audit every place this app calls an AI model.
For each call, tell me: file and line, what decision it makes,
whether deterministic code could make the same decision,
and a rough share of monthly cost.
Replace only the calls that don't need a model.
Output must stay byte-identical on the sample data.
Show me the before/after cost per run.Make it stick
The cost creeps back if the habit doesn't change. Two things keep it down. First, log the cost of every AI call at the moment it happens, the way the email agent build shows a per-email price; you fix what you can see. Second, apply the same test at design time that the audit applies after the fact: when the agent proposes an AI call, ask whether the rule can be written down. Repeated workflows have a bigger version of this same trade, covered in MCP vs SDK.
FAQ
Won't plain code be less accurate than the model?
For the calls the audit replaces, it's more accurate: a rule you wrote down does the same thing every time, and a model occasionally doesn't. Accuracy only favors the model where the rule can't be written down, and those calls stay.
Does switching to a cheaper model do the same thing?
It helps and stacks with this, but it's a smaller lever. A cheaper model might halve a call's price. Deleting the call removes it. Do the audit first, then pick the cheapest model that still handles what's left.