AI, explained

How do I control AI costs?

Almost every surprise AI bill comes from the same place, which is a workflow nobody put a ceiling on.

How do I control AI costs? Set a spend ceiling per workflow rather than per account, route easy tasks to cheaper models and hard ones to expensive models, cache repeated context and repeated answers, and alert on cost per completed task rather than total spend so a problem surfaces in hours instead of at invoice time.

Measure per task, not per month

Total monthly spend is the least useful number you have. It moves with volume, so it tells you nothing about whether the system got worse. The number that matters is cost per completed unit of work: per resolved ticket, per document processed, per qualified lead. Track it from day one and a regression becomes visible immediately. A prompt change that quietly doubled the context, or a retry loop that now fires on 8 percent of requests, shows up as a step change in that ratio while the monthly total still looks normal.

The four levers, in order of payoff

Two alerts worth having

Alert on cost per task crossing a threshold, and on any single workflow exceeding its daily budget by a set margin. Total-spend alerts fire too late to help. Add a per-user or per-tenant rate limit on anything customer-facing, because bots and enthusiastic power users are a real line item, not a theoretical one.

The trap

Teams optimise the model price and ignore the architecture. Moving to a model 40 percent cheaper saves 40 percent. Removing a redundant call from a three-step chain, or caching the retrieval that runs on every message, often saves more. Look at the call graph before you look at the price list. A short AI audit against your actual traffic tends to find both.

Frequently asked questions

How do I control AI costs?

Put a hard spend ceiling on each workflow with a defined fallback when it is hit, route easy tasks to a cheaper model and escalate only what needs the larger one, cache stable prompt context and repeated answers, and monitor cost per completed task so regressions surface within hours rather than at invoice time.

What drives most AI spend in production?

Input tokens usually dominate, because long system prompts, retrieved documents and conversation history are resent on every single call while outputs stay short. Retry loops and over-broad retrieval are the two most common hidden multipliers, and both are architectural problems rather than pricing problems.

Does a cheaper model always save money?

Not reliably. A weaker model that needs two attempts, produces work a human has to correct, or triggers more escalations can cost more end to end than one good call. Compare cost per successfully completed task, including rework, rather than comparing the price per million tokens.

Related

AI SEO in LisbonAI agency in LisbonBook an AI audit

Ready to put AI to work?

Book a discovery audit and we will map the highest-ROI AI agents and automations for your business.

Book a discovery audit →