The fastest way to reduce AI API costs in production is model routing — directing each task to the cheapest model tier that meets its quality threshold. In systems we've re-architected, this single change reduces monthly API spend by 80–95%. A system spending $13,500/month on all-Opus calls drops to $1,400/month with the same outputs.
Most production AI systems are expensive not because AI is expensive, but because the development team skipped the cost-engineering phase entirely. They wired every API call to the most capable model, wrote generic prompts, and shipped. The system works. It also costs 10–20x more than it needs to.
Why do production AI systems cost so much to run?
Three architectural mistakes account for nearly all excessive AI API costs:
Single-model architecture. Every task — extraction, classification, summarisation, generation — routes to the same model. Claude Opus costs $15 per million input tokens. Claude Haiku costs $0.25. For structured tasks like data extraction, Haiku produces functionally identical results. Using Opus for extraction is paying 60x more for no quality improvement.
Monolithic prompts. Multiple tasks bundled into one API call — "extract fields, classify the industry, normalise the title, and write a summary" in a single prompt. This makes model routing impossible because you can't send extraction to Haiku and generation to Sonnet when they're in the same call.
Generic prompts on expensive models. A one-line instruction like "parse this document and return JSON" works on Opus because Opus infers intent from vague instructions. The same prompt fails on Haiku, so the team concludes the cheap model isn't good enough. The real problem: the prompt isn't good enough for the cheap model. A well-engineered prompt on Haiku matches a basic prompt on Opus for structured tasks.
What is model routing and how does it reduce costs?
Model routing directs each AI task to the cheapest model tier that meets its quality threshold. A routing layer sits between the application and the AI provider's API, evaluating each task and sending it to the appropriate model.
In most production systems, 70–85% of API calls are tasks that the cheapest model handles as well as the most expensive one. Another 10–20% run on a mid-tier model. The tasks that genuinely require the most capable model — if any exist — are typically under 5% of total volume.
The cost math at 20,000 daily API calls: all-Opus runs $13,500/month. A routed architecture (75% Haiku, 20% Sonnet, 5% Opus) runs $1,384/month. Same inputs, same outputs, same user experience.
What are the three types of model routing?
Static routing assigns a fixed model tier to each task type at build time. Extraction always goes to Haiku. Summarisation always goes to Sonnet. This handles 90% of use cases and is the simplest to implement.
Complexity-based routing analyses the input before selecting a model. Simple inputs go to the cheap tier; complex inputs go to a more capable tier. This works for tasks where input complexity varies — most inputs are straightforward, but occasional ones are genuinely hard.
Fallback routing starts with the cheapest model and escalates. Send the task to Haiku. If the output fails validation, retry on Sonnet. If that fails, escalate to Opus. Most calls resolve on the first attempt. The system only pays for expensive models when cheap ones demonstrably can't handle the input.
Should you fine-tune or prompt-engineer to reduce costs?
Start with prompt engineering. A well-engineered prompt on a cheap model consistently matches a basic prompt on an expensive model for structured tasks. The bottleneck in most systems isn't the model's capability — it's the instruction quality.
Fine-tuning pays off when three conditions are true: you have a high-volume narrow task (thousands of calls per day), you have hundreds of input-output training examples (your production logs), and the output format is stable (not changing quarterly). Below 5,000–10,000 daily calls, prompt engineering on a cheap model is more cost-effective than fine-tuning.
How do you know if your AI system has a cost architecture problem?
Three signals: your API bill scales linearly with volume (doubling inputs doubles cost), your API dashboard shows 100% of calls going to one model, or your vendor recommends "prompt optimisation" as the cost fix. Shortening prompts saves tokens but doesn't address the 60x pricing gap between model tiers.
If any of these apply, the problem isn't your AI provider's pricing. It's how the system was architected. The team that built it either didn't know to include cost engineering or wasn't scoped to do it.
What does the re-architecture process look like?
The process has four steps. First, map every distinct task the system performs — not what the documentation says, but what the API calls actually do. A single call often performs multiple implicit tasks. Second, evaluate each task across model tiers by running identical inputs through cheap, mid-tier, and expensive models, measuring against the business's actual quality requirements. Third, rebuild the AI layer with task-specific agents, each wired to the appropriate model with prompts engineered for that tier's strengths. Fourth, instrument per-task cost and quality monitoring.
If the original system has clean task separation, retrofitting routing takes 2–4 weeks. If it uses monolithic prompts, the AI layer needs decomposition — typically 6–10 weeks. In both cases, the rebuild pays for itself within 2–3 months through reduced API costs.
What does this look like in a real system?
We built an operations AI platform that scaled from 50 to 80+ agents in three months. The system analyses call recordings, scores performance, identifies coaching opportunities, and generates reports. Each task routes to a different model tier — transcription preprocessing to the cheapest, rubric scoring to a low tier, coaching analysis to a mid tier, report generation to a capable model. Without routing, the per-agent cost would have made scaling from 50 to 80+ economically impossible.
If your AI system is running on a single model and the API bill is growing linearly with usage, the architecture needs to change. We re-architect production AI systems with cost engineering built into the architecture from day one.
Written by
Abhijit Das
CEO
Building AI tools for businesses from legacy to new age SaaS startups
LinkedIn ↗Need a team to build this for your business?