The working guide to the cheapest LLM APIs that are actually good enough to run AI agents in 2026.
The price of a GPT-3-quality answer fell from $60 per million tokens in late 2021 to about $0.06 by late 2024, a 1,000x collapse in three years - Andreessen Horowitz. At the same time, the thing you actually build with those tokens changed shape. A chat request is one call in, one answer out. An AI agent is a loop: it re-sends its whole growing transcript on every step, calls tools, spawns sub-agents, and thinks in hidden reasoning tokens you still pay for. Anthropic's own engineering team measured that agents burn roughly 4x the tokens of a chat interaction, and multi-agent systems burn about 15x - Anthropic Engineering.
Here is the problem that trap creates: the cheapest API on a pricing page is almost never the cheapest way to run an agent. A model that looks twice as expensive per token can be far cheaper per completed task if it caches your system prompt, calls tools reliably on the first try, and finishes in fewer steps. Meanwhile a "cheap" nano model that fails a tool call and loops three extra times can quietly cost more than a frontier model that gets it right once. The sticker price and the real bill diverge, and for agents they diverge a lot.
This guide fixes that. It lays out the real 2026 price table across every serious provider, translates raw per-token numbers into what agents actually pay, and shows the specific levers (prompt caching, batch processing, model routing, off-peak scheduling, context compaction) that move an agent's bill by 10x without changing a single model choice. We start high level with how pricing works, then go tier by tier from ultra-cheap nano models up through the cheap-frontier contenders, then into the open-weight hosting layer and the gateways that route between all of them. Managed platforms like o-mega sit at the far end of this spectrum, hiding the token math entirely behind an agent workforce, and we treat that as one option among many.
Every price in this guide was verified against provider pricing pages or authoritative trackers as of September 2026. Because this is the fastest-moving cost line in software, treat exact numbers as time-stamped snapshots, not permanent facts.
Contents
- Why the sticker price is the wrong number
- How LLM API pricing actually works in 2026
- The great price collapse (and why agents ate the savings)
- The 2026 master price table for agents
- The weighted ranking: cheapest models that can still run agents
- The ultra-cheap nano tier
- The cheap tier: real work under a dollar
- The mid tier: near-frontier quality without frontier bills
- The frontier tier and the rise of cheap-frontier
- The open-weight hosting layer
- Gateways, routers, and the arbitrage layer
- The seven levers that actually cut agent cost
- Real per-task cost math
- How AI agents are reshaping the pricing field
- Where cheap wins and where it fails
- The future outlook for agent economics
- Conclusion: a decision framework
The weighted ranking at a glance
Before the detail, here is the whole field scored on what an agent builder actually cares about. This table ranks representative models and hosted options on a cost-weighted rubric, so it deliberately rewards models that are cheap, fast, and cache-friendly over models that are simply the most capable. A frontier model that lands low here is not "bad," it is expensive relative to how often an agent needs its full intelligence. Read this as "cheapest thing that can still do the job," not "best model overall."
| # | Model / Option | Category | Cost (35%) | Agent capability (25%) | Cost control (20%) | Context & speed (20%) | Final |
|---|---|---|---|---|---|---|---|
| 1 | GLM-5.3-Flash | Cheap | 10 - $0.15/$0.50 (~$0.65 blended) | 7 - Z.ai's agent-and-coding line, distilled | 9 - $0.03/1M cache read | 9 - 1M context | 8.9 |
| 2 | GPT-5.6 Luna | Nano | 9 - $0.20/$1.20 (~$1.40 blended), 80% cut Jul 2026 | 8 - full Responses-API tools, most agent-complete nano | 9 - automatic 90%-off cached reads, 50% batch | 9 - 1.05M context | 8.8 |
| 3 | Qwen3.8-Flash | Nano | 10 - $0.15/$0.47 (~$0.62 blended) | 6 - reliable function calling + JSON | 9 - $0.016/1M cache read | 9 - 1M context | 8.6 |
| 4 | Gemini 3.1 Flash-Lite | Nano | 9 - $0.25/$1.50 text (~$1.75 blended) | 7 - solid native function calling + JSON | 9 - $0.025/1M cache read, 50% batch | 9 - 1M context, fast | 8.5 |
| 5 | Groq GPT-OSS 120B | Open-weight host | 10 - ~$0.75 blended ($0.15/$0.60), also $0.10/$0.50 on Baseten | 7 - reliable OpenAI-compatible tool calls, open-weight ceiling | 6 - 50% cache or 50% batch, but they do not stack | 10 - LPU speed, ~500 tok/s | 8.5 |
| 6 | DeepSeek V4-Flash | Cheap | 8 - $0.44/$1.32 peak, $0.22/$0.66 off-peak | 7 - native tool calling, open weights | 10 - auto prefix cache ($0.007-$0.014), 50% off-peak | 9 - 1M context | 8.4 |
| 7 | Gemini 3.8 Flash | Mid | 8 - $0.75/$3.75 (~$4.50 blended) to Dec 31 2026 | 8 - strong tool calling, high throughput | 9 - $0.075/1M cache, 50% batch | 9 - 1M context | 8.4 |
| 8 | Gemini 3.5 Flash-Lite | Cheap | 8 - $0.30/$2.50 (~$2.80 blended) | 7 - dependable classifier/router | 9 - $0.03/1M cache read, 50% batch | 9 - 1M context | 8.2 |
| 9 | Grok Build 0.1 | Cheap | 8 - $1.00/$2.00 (~$3.00 blended) | 8 - coding-agent specialist, strong tool loops | 8 - $0.20/1M cache read | 7 - 256K context | 7.8 |
| 10 | Grok 4.3 | Mid | 8 - $1.25/$2.50 (~$3.75 blended), cheap output | 8 - tool calling + batch discount | 7 - $0.20/1M cache, ~20% batch | 8 - 1M context | 7.8 |
| 11 | Claude Sonnet 5 | Mid | 5 - $2/$10, now the permanent standard rate | 9 - best-in-class tool reliability + reasoning | 8 - 10% cache read, 50% batch | 8 - 1M context | 7.2 |
| 12 | Amazon Nova Micro | Nano | 10 - $0.035/$0.14, cheapest input anywhere | 5 - weak multi-step reasoning, routing/classify only | 6 - Bedrock batch ~50% | 5 - 128K, text-only, fast | 7.0 |
| 13 | Gemini 3.1 Pro | Frontier | 4 - $2/$12 under 200K (~$14 blended), flips to $4/$18 above | 9 - strong structured-output adherence | 8 - $0.20/1M cache, 50% batch | 8 - 1M context | 6.9 |
| 14 | GPT-5.6 Terra | Mid | 4 - $2/$12 (~$14 blended) | 9 - full agent surface, reliable tool calls | 8 - automatic 90% cache, 50% batch | 8 - 1.05M context | 6.9 |
| 15 | Grok 4.6 | Frontier | 6 - $2/$6 under 200K (~$8 blended) | 8 - frontier reasoning at Flash-class input | 6 - $0.50/1M cache, no 4.6 batch, tool surcharges | 7 - 500K context | 6.7 |
| 16 | Claude Haiku 4.5 | Cheap | 6 - $1/$5 (~$6 blended) | 7 - dependable worker under an orchestrator | 8 - $0.10/1M cache, 50% batch | 6 - 200K context | 6.7 |
| 17 | Claude Opus 5 | Frontier | 2 - $5/$25 (~$30 blended) | 10 - most reliable long-horizon autonomy | 8 - 10% cache, 512-token min, 50% batch | 7 - 1M context, ~70 tok/s | 6.2 |
The criteria, and why these four: Cost (35%) is the blended input-plus-output price for a symmetric workload, because that is the number that scales linearly with agent volume. Agent capability (25%) captures tool-calling reliability and multi-step reasoning, because a failed tool call re-runs the whole loop and erases any per-token savings. Cost control (20%) rewards caching economics, batch discounts, and off-peak pricing, because those levers routinely move the real bill more than the model choice does. Context and speed (20%) matters because a small context window forces expensive compaction and slow throughput lengthens every multi-step task. The order this produces is the honest one: for most agent work you do not need Opus-class intelligence on every step, so the cheap, fast, cacheable models win the cost-efficiency contest even though they lose the raw-capability one. We cover the reverse case (when capability has to win) in section 15.
1. Why the sticker price is the wrong number
Start from first principles. An LLM API is stateless. The model remembers nothing between calls, so to continue a conversation you resend the entire history every single time. For a chatbot, that history grows slowly and the last answer is the product. For an agent, the history is the product's scaffolding, and it grows fast: a system prompt, a block of tool definitions, and then a lengthening record of every tool call and every tool result the agent has accumulated on its way to an answer. A twenty-step tool loop re-bills the accumulated context up to twenty times. This is why a single agent task can push 400,000 to 2,000,000 cumulative input tokens through an API even when the final answer is a paragraph - Liatrio Labs.
That structural fact reframes the entire question. When people ask "which LLM API is cheapest," they are usually comparing per-token prices as if the token count were fixed. It is not. The token count is a function of the model and the architecture, not just the price list. The most literal proof of that arrived with Anthropic's newer models: Claude 4.7 and later ship a different tokenizer that produces roughly 30% more tokens for the same text than Sonnet 4.6 and earlier - Anthropic. Nothing about the price list changed, yet an identical prompt bills about 30% higher on the newer model, which means a cross-vendor comparison of per-token rates is not even measuring the same unit. A model that follows instructions precisely and calls tools correctly finishes in fewer steps, which means fewer re-sends of a growing context, which means a smaller bill even at a higher per-token rate. A cheaper model that hallucinates a malformed tool call forces a retry, and each retry re-sends the whole context and generates a fresh completion. The retry, not the token price, is where the money goes. We unpacked this dynamic in depth in our analysis of the true cost of LLM inference in 2026, and it is the single most important idea in this guide.
There is a second reason the sticker price misleads, and it is about output. Output tokens cost three to five times more than input tokens on almost every provider, and reasoning models emit hidden "thinking" tokens billed at the output rate before the visible answer even begins. OpenAI's o-series models are the clearest example: a request can emit three to ten times the visible output in internal reasoning, so the effective cost per turn is far above what the base rate implies - CloudZero. An agent that reasons on every trivial step pays this tax constantly. The lever, which we cover later, is to dial reasoning effort down for easy steps and reserve it for genuinely hard ones, an approach we detailed in our guide to setting the effort dial to cut AI costs.
So the correct question is not "what is the cheapest API?" It is "what is the cheapest path to a completed task?" That path depends on the model, the caching setup, the routing logic, and how much context the agent drags around. The rest of this guide answers the real question, starting with the mechanics of how modern pricing actually works.
2. How LLM API pricing actually works in 2026
Every serious LLM API in 2026 prices along the same handful of axes, and understanding them is the difference between a $50 monthly bill and a $500 one for identical work. The first axis is the input/output split. You pay one rate for the tokens you send (the prompt) and a higher rate for the tokens the model generates (the completion). Because agents send enormous prompts (the whole re-sent transcript) and often produce short structured answers, agent economics are usually input-dominated, which flips a lot of intuition: a model with a cheap input rate and an expensive output rate can be a bargain for tool-calling agents even though it looks costly for chat.
The second axis is cached input. Nearly every major provider now lets you cache a stable prefix (your system prompt plus tool definitions) so that subsequent calls pay a small fraction of the input rate for those repeated tokens. Anthropic charges cache reads at 10% of the input rate, OpenAI applies an automatic 90% discount on cached reads, and Google's context caching drops Gemini reads to as little as $0.025 per million on the Flash-Lite tier - Google. Cache writes cost slightly more than a normal read (typically 1.25x the base input rate), so caching pays for itself after roughly two reads - Finout. For an agent that resends a fat static prefix on every one of a loop's many steps, this is the single largest cost lever in the entire stack, and we return to it in section 12. The scale of it is now measured rather than asserted: analysing OpenRouter's traffic in August 2026, a16z reported that agents consume nearly 5x as many tokens as human users, agent usage has grown roughly 14x since February 2026, and more than 85% of agentic token burn comes from the cached prompt - a16z. If five-sixths of what your agent bills for is the cached prefix, then your cache-read rate, not your input rate, is the number that actually sets your bill.
Beyond those two, four more axes shape the real bill:
- Batch processing gives a flat 50% discount on both input and output for non-interactive jobs returned within a day, offered by Anthropic, OpenAI, and Google - TokenMix.
- Long-context surcharges kick in on several models once a single request crosses a threshold, and they apply to the whole request, not just the overflow.
- Off-peak discounts are newest: DeepSeek now bills roughly half price outside two narrow peak windows each day.
- Reasoning tokens are billed at the output rate and are invisible in your prompt, so they surprise budgets built on visible output alone.
The long-context surcharge deserves special attention because it is a landmine for agents specifically. Gemini 3.1 Pro and every Grok 4.x model roughly double their rates once a single request crosses about 200,000 tokens, and OpenAI's GPT-5.6 family and GPT-6 Astra apply a 2x input, 1.5x output penalty above 272,000 tokens - OpenAI Developer Docs. The trap is that agents accumulate context naturally, so a long-running loop can silently cross the line and double every token in the request, not just the ones past the threshold. Flat-priced models to a million tokens, like Gemini 3.5 Flash and Flash-Lite, are much easier to budget for exactly this reason. The practical takeaway is that agents should compact their context before they hit these cliffs, a point that connects directly to the caching and compaction levers later in this guide.
3. The great price collapse (and why agents ate the savings)
The backdrop to everything in this guide is one of the steepest cost declines in the history of computing. Andreessen Horowitz coined the term "LLMflation" to describe it: the price of an equivalent-quality token falls roughly 10x per year. Their canonical example is stark. Reaching GPT-3-level quality (about 42 on the MMLU benchmark) cost $60 per million tokens in November 2021 and about $0.06 per million by November 2024, a thousand-fold drop in three years - a16z. For GPT-4-class quality (MMLU around 83), the price fell roughly 62x since the March 2023 launch. Frontier input pricing that sat at $30 per million in early 2023 now clusters between $1.25 and $5 for the top tier.
Here is the twist that matters for this guide: the savings did not shrink anyone's bill. They changed what people build. When intelligence gets cheap, you use vastly more of it, and the agent architecture is the perfect vehicle for consuming the surplus. OpenRouter ran what amounts to a controlled experiment on this in the summer of 2026. During a discount window on the GPT-5.6 family from July 27 to August 14, daily token usage on GPT-5.6 Luna jumped 13.8x and on Terra rose 5.6x, while GPT-5.6 Sol, which stayed at list price over the identical window, moved only 1.1x - OpenRouter. The undiscounted model is the control, and it barely moved. OpenAI's share of all OpenRouter tokens went from 7.1% to 12.4% over those three weeks. That is Jevons paradox with a clean baseline: cut the price of a token and builders do not pocket the difference, they spend it on more steps. Google's own numbers make the point at planetary scale: the company processed 9.7 trillion tokens per month in 2024, then 480 trillion by April 2025, and about 3.2 quadrillion tokens per month by May 2026, a roughly sevenfold year-over-year jump - Google I/O 2026, via Gigazine. Enterprise LLM API spend told the same story from the demand side: it more than doubled in six months, from $3.5B in November 2024 to $8.4B by mid-2025, reaching $12.5B for full-year 2025 as workloads moved into production - Menlo Ventures.
The structural lesson is the one we drew out in the big pipe: how LLM inference is eating software. Falling token prices are a tailwind, not a finish line. Each year, a workload that is uneconomic today becomes cheap purely from price compression, which is why teams over-provision on capability now. But the agent architecture's re-sent-context multiplier partially eats that tailwind, so the two forces (prices falling, consumption exploding) run in tension. The teams that win are not the ones waiting for prices to drop. They are the ones who pick a cheap-enough model today and squeeze the architecture, which is exactly what the tier-by-tier sections below equip you to do.
4. The 2026 master price table for agents
Here is the field, priced. This table lists the standard per-million-token rates for the models that matter to agent builders, spanning every tier from ultra-cheap nano up to the frontier. Where a model uses tiered or promotional pricing, the note captures the catch. All figures are verified as of September 2026 and reflect the input rate, output rate, cached-input read rate, and context window. Read it as a map, not a verdict: the sections after it explain which of these numbers actually apply to your agent's workload.
| Model | Provider | Input /1M | Output /1M | Cached read /1M | Context | Note |
|---|---|---|---|---|---|---|
| Amazon Nova Micro | Amazon | $0.035 | $0.14 | n/a | 128K | Cheapest input anywhere; text-only |
| Qwen3.5-Flash | Alibaba | $0.10 | $0.40 | $0.01 | 1M | Previous generation, still served |
| GLM-5.3-Flash | Z.ai | $0.15 | $0.50 | $0.03 | 1M | Open weights; 1M context at nano prices |
| Qwen3.8-Flash | Alibaba | $0.15 | $0.47 | $0.016 | 1M | Flat rate, no context tiers |
| GPT-5.6 Luna | OpenAI | $0.20 | $1.20 | $0.02 | 1.05M | Full agent tool surface at nano price |
| Gemini 3.1 Flash-Lite | $0.25 | $1.50 | $0.025 | 1M | Ultra-cheap, flat to 1M | |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | $0.03 | 1M | Successor to 3.1, but priced above it | |
| DeepSeek V4-Flash | DeepSeek | $0.44 | $1.32 | $0.014 | 1M | Halves off-peak; auto prefix cache |
| Mistral Large 3 | Mistral | $0.50 | $1.50 | ~90% saving | 256K | EU-hosted, big 2026 cut |
| GLM-4.6 | Z.ai | $0.60 | $2.20 | $0.11 | 200K | Open weights, popular in coding CLIs |
| Amazon Nova Lite | Amazon | $0.06 | $0.24 | n/a | 300K | Multimodal, near-Micro price |
| Gemini 3.8 Flash | $0.75 | $3.75 | $0.075 | 1M | Intro rate; doubles Jan 1 2027 | |
| Claude Haiku 4.5 | Anthropic | $1.00 | $5.00 | $0.10 | 200K | Fast Claude worker |
| Grok Build 0.1 | xAI | $1.00 | $2.00 | $0.20 | 256K | Coding-agent specialist |
| o4-mini | OpenAI | $1.10 | $4.40 | $0.275 | 200K | Shuts down Oct 23 2026 |
| Grok 4.3 | xAI | $1.25 | $2.50 | $0.20 | 1M | Cheap output for verbose runs |
| GLM-5.3 | Z.ai | $1.40 | $4.40 | $0.26 | 1M | Z.ai's current flagship |
| Gemini 3.5 Flash | $1.50 | $9.00 | $0.15 | 1M | Now the priciest Flash; use 3.8 | |
| Mistral Medium 3.5 | Mistral | $1.50 | $7.50 | n/a | 128K | EU-hosted |
| Grok 4.6 | xAI | $2.00 | $6.00 | $0.50 | 500K | Cheapest frontier; 2x above 200K |
| Gemini 3.1 Pro | $2.00 | $12.00 | $0.20 | 1M | Flips to $4/$18 above 200K | |
| Qwen3.8-Max | Alibaba | $2.00 | $6.00 | $0.25 | 1M | Beijing endpoint ~20% cheaper |
| Claude Sonnet 5 | Anthropic | $2.00 | $10.00 | $0.20 | 1M | Launch rate made permanent |
| GPT-5.6 Terra | OpenAI | $2.00 | $12.00 | $0.20 | 1.05M | Balanced mid-tier |
| Kimi K3 | Moonshot | $3.00 | $15.00 | $0.30 | 1M | 1M context, open weights |
| Claude Opus 5 | Anthropic | $5.00 | $25.00 | $0.50 | 1M | Frontier default |
| GPT-5.6 Sol | OpenAI | $5.00 ($4 promo) | $30.00 ($20 promo) | $0.40 promo | 1.05M | Promo runs at least to Nov 21 2026 |
| Claude Fable 5.1 | Anthropic | $10.00 | $50.00 | $0.25 | 1M | Deepest long-horizon work; 2.5% cache reads |
| GPT-6 Astra | OpenAI | $10.00 | $50.00 | $1.00 | 1.05M | New frontier; 2x input above 272K |
Two structural traps sit inside this table and both matter more than any single price. The first is the long-context flip on Gemini 3.1 Pro, the Grok 4.x line, and the GPT-5.6 family, where crossing roughly 200,000 to 272,000 tokens in one request multiplies rates across the entire request. The second is promotional pricing with an expiry, and it cuts in both directions. Sometimes the intro rate simply wins: Anthropic confirmed that Claude Sonnet 5's launch price of $2/$10 is now the standard rate and the increase to $3/$15 scheduled for September 1, 2026 will not happen - Anthropic. Sometimes it is a live discount you should not build a permanent model on: OpenAI's GPT-5.6 Sol runs at $4/$20 against a $5/$30 list price, guaranteed only "at least through November 21, 2026," and Gemini's 3.6, 3.7 and 3.8 Flash models are all $0.75/$3.75 only through December 31, 2026, after which they double to $1.50/$7.50 - Google. A budget built on an intro rate can jump overnight, so check the expiry date on any headline number before you make it the denominator of a unit economic model. To check whether a rate has moved since this table was verified, you can sort live per-token prices and context windows for 400+ text models by price in the catalog kept by GenMagic, an AI studio from O-mega's founder.
The pattern the table reveals, once you scan it top to bottom, is a spread of more than 1,000x between the cheapest small-model input token ($0.035 on Nova Micro) and the most expensive frontier output token ($50 on Fable 5.1 and GPT-6 Astra). That spread is not a nuisance, it is the opportunity. It is precisely what makes model routing (cheap model first, escalate only when needed) the highest-leverage cost technique in the whole field, and it is the reason no serious agent should run every step on a single flagship model.
5. The weighted ranking: cheapest models that can still run agents
The scoring table at the top of this guide is worth reading closely, because its ordering is counterintuitive on purpose. It does not crown the smartest model. It crowns the cheapest option that can still complete real agent work, which is a different and more useful thing when you are running thousands of agent steps a day. The top of the ranking is dominated by fast, cache-friendly, high-context models: GLM-5.3-Flash, GPT-5.6 Luna, Qwen3.8-Flash, Gemini 3.1 Flash-Lite, and Groq's GPT-OSS 120B. These are not the models that top capability leaderboards. They are the models that do 80% of an agent's steps for a fraction of the cost, leaving the expensive frontier calls for the 20% that genuinely need them.
The rubric weights cost at 35% deliberately, because for a production agent fleet, token spend is the dominant variable cost and it scales linearly with volume. But cost is not the only thing that matters, which is why agent capability carries 25%. A model that is cheap per token but unreliable at tool calling destroys its own savings through retries, so the middle of the ranking is where a model's real agent-worthiness gets tested. This is also why Amazon Nova Micro, despite having the cheapest input price on the entire market at $0.035 per million, lands only at position 12 rather than the top: it is superb for routing and classification but weak at the multi-step reasoning that defines an actual agent - AWS. Cheapest-per-token and cheapest-per-task are not the same ranking, and this table optimizes for the second.
The bottom of the table holds the frontier models, and their low placement needs a caveat that the section 15 discussion expands on. Claude Opus 5 at position 17 is not a poor model. It is the most reliable long-horizon autonomous agent brain available, and on a rubric weighted for raw capability it would sit at the top. It ranks low here only because this table asks a cost-efficiency question, and on a per-token basis Opus 5 is two and a half times the price of Sonnet 5 and roughly twenty times the price of the nano tier. The honest reading is that you route to Opus 5 for the hard 20% and to the cheap tiers for the easy 80%, which is the central discipline of cost-effective agent building. We compared the two Anthropic workhorses head to head in Claude Opus 5 vs Sonnet 5: which to build on on Founden.ai, which has the same founder as O-mega, and the answer there, as here, is "both, routed by difficulty."
One more thing the ranking surfaces: the cheap-frontier phenomenon. Grok 4.6 sits at position 15 with a frontier-level capability score but a mid-tier price of $2/$6, which is why it scores respectably on a cost-weighted rubric where true frontier models sink. That combination (frontier reasoning at Flash-class input pricing) is the most disruptive pricing move of 2026, and it gets its own treatment in section 9.
6. The ultra-cheap nano tier
The nano tier is where the price war is most brutal and where the biggest misconceptions live. These are the models priced under roughly $0.50 per million input tokens, built for the highest-volume, most repetitive agent steps: intent routing, classification, extraction, guardrail checks, and cheap sub-agent fan-out. The mistake builders make is treating nano models as "the whole agent." They are not. They are the workers in an orchestrator-worker pattern, doing the simple, high-frequency steps while a smarter model handles planning. Used that way, they are transformative for cost. Used as the agent's brain, they loop, fail tool calls, and cost more than they save.
The current nano leaders each win a different sub-battle. Amazon Nova Micro owns the absolute price floor at $0.035 input, $0.14 output, a rate so low it is effectively free for text classification, though it is text-only and the weakest reasoner of the group - AWS. Qwen3.8-Flash at $0.15/$0.47 pairs a rock-bottom price with a full million-token context and reliable function calling, at a flat rate with no context-length tiers on the international endpoint. It is the current generation, but note the direction of travel: the Qwen3.5-Flash it succeeds is still served and is still cheaper at $0.10/$0.40, so "newer" and "cheapest" have quietly stopped being the same model here - BenchLM. GPT-5.6 Luna at $0.20/$1.20 is the most agent-complete of the tier, retaining OpenAI's full Responses-API tool surface (web search, code interpreter, computer use, MCP) plus automatic 90%-off cached reads, which makes caching-heavy loops astonishingly cheap - OpenAI Developer Docs. Google's Gemini 3.1 Flash-Lite rounds out the group at $0.25/$1.50 with a near-free $0.025 cache-read rate, though it now carries a shutdown date of May 7, 2027 and Google's named replacement, Gemini 3.5 Flash-Lite, is the rare successor that costs more than the model it replaces ($0.30/$2.50). Budget for the migration to be a price rise, not a saving.
For agent builders the ranking within this tier should be:
- Nova Micro for pure classification and routing where reasoning does not matter and the input price dominates.
- Qwen3.8-Flash for the best blend of cheap price, large context, and open-weight self-host escape hatch.
- GPT-5.6 Luna when the nano step still needs reliable tool calling or hosted tools.
- Gemini 3.1 Flash-Lite when you want near-free cached context replay across many parallel calls.
The practical implication of these near-free rates is worth sitting with, because it changes agent architecture. When a classification step costs $0.035 per million tokens, you can afford to run it constantly: on every user message, every tool result, every intermediate state, as a cheap guardrail against the expensive model going off the rails. The nano tier is not just "the cheap option," it is what makes defensive, self-checking agent designs economically viable, because you can spray a cheap verifier across a workflow without the verification cost mattering. This is a genuinely new capability that did not exist when the cheapest usable model cost $1 per million, and it is why the nano tier deserves more architectural attention than its low prices suggest.
7. The cheap tier: real work under a dollar
The cheap tier is the sweet spot for the majority of production agents, and it is the most competitive band of the entire market. These are models roughly between $0.20 and $1.50 input that can do genuine multi-step work: they call tools reliably, follow structured-output schemas, and reason well enough to plan a few steps ahead. This is the tier where "cheap" stops meaning "toy" and starts meaning "good enough to ship," and the 2026 crop is deep. The standout is Z.ai's GLM-5.3-Flash at $0.15/$0.50 with a full million-token context window and a $0.03 cache-read rate, a distillation of the same line Z.ai builds for software engineering and agent work, which is a remarkable amount of capability to buy for less than a dollar per million blended tokens - Z.ai.
This tier also carries the year's sharpest lesson about churn. xAI retired its entire Fast line on May 15, 2026, taking Grok 4.1 Fast, Grok 4 Fast and Grok Code Fast 1 out of the catalog - xAI, and with them the 2-million-token context window that made Grok 4.1 Fast distinctive (the largest xAI offers today is 1M, on Grok 4.3). The subtlety that costs money: the retired slugs still resolve. xAI redirects them rather than erroring, so an agent still calling grok-4-1-fast-reasoning keeps working and is quietly billed at Grok 4.3's rate, $1.25 per million input instead of $0.20, a 6.25x increase nobody had to approve. The replacement for coding agents is Grok Build 0.1 at $1.00/$2.00 with a $0.20 cache read and a 256K window, trained specifically for agentic coding workflows - BenchLM. Set an alert on your providers' deprecation pages; a silent redirect does not show up as an error, only as a bill.
Alongside those sit several specialists worth knowing by name. Gemini 3.5 Flash-Lite at $0.30/$2.50 brings Google's reliability and flat-to-1M pricing. On the open-weight side, GLM-4.6 at a live rate of $0.60/$2.20 remains a favorite in Claude-Code-style coding CLIs for its price-to-quality ratio, though its 200K window is now five times smaller than its own successors' - PricePerToken, and Mistral Large 3 at $0.50/$1.50 delivered one of the year's biggest price cuts while keeping the strong native function-calling that is Mistral's signature and EU data residency for teams that need it - Mistral.
DeepSeek V4-Flash deserves its own paragraph because it pioneered the pricing mechanic that may define the tier's future: off-peak billing. Its peak rate is $0.44/$1.32, but DeepSeek charges half price outside two narrow peak windows, dropping the model to $0.22/$0.66. Read the schedule closely, because it inverts the usual assumption: peak is only 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday only, about 35 hours of a 168-hour week. The discounted rate is not an off-hours exception, it is the price roughly 79% of the time, including every hour of the weekend - DeepSeek, DeepSeek pricing. On top of that, DeepSeek runs automatic disk-based prefix caching that bills cache hits at one-tenth the input rate (about $0.014 at peak, $0.007 off-peak) with no code changes, which is decisive for agent loops that resend a static system prompt on every step. An agent scheduler that batches overnight enrichment work into the off-peak window, with caching on, runs at a fraction of what the sticker price suggests. We ran the full comparison in DeepSeek V4 Flash vs Opus 4.8: the cost math, and the gap in raw token cost is roughly an order of magnitude.
The judgment call in this tier is between the Western hosted models (Grok, Gemini) with their consistency and tooling, and the open-weight challengers (GLM, DeepSeek, Qwen, Mistral) with their lower floors and self-host escape hatch. For a latency-sensitive interactive agent, the Western Fast-line models usually win on predictability. For a high-volume batch agent where the absolute per-token floor is what matters, the open-weight models on their first-party APIs (or self-hosted) win, and the open weights mean you are never locked into a single vendor's price. We surveyed that open-weight landscape in top open-source LLMs in 2026, and it is the fastest-moving corner of the market.
8. The mid tier: near-frontier quality without frontier bills
The mid tier is where agents that need to be genuinely reliable, but cannot justify frontier pricing, should live. These models, roughly $1.25 to $3 input, are the workhorses: strong enough for multi-step planning, orchestration, and code generation, but priced at a third to a half of the frontier. The defining models here are Anthropic's Claude Sonnet 5, OpenAI's GPT-5.6 Terra, and xAI's Grok 4.3, and the choice between them is more about ecosystem and reliability than raw price, because they cluster within a few dollars of each other on a blended basis.
Claude Sonnet 5 is the reliability benchmark of the tier. At $2/$10, a launch rate Anthropic has since made permanent rather than raising to $3/$15 as originally scheduled, it delivers near-Opus quality on coding and agentic work with the most dependable tool-calling in the mid tier, adaptive thinking on by default, and the full effort ladder including the xhigh setting that Anthropic recommends for hard agentic tasks - CloudZero. GPT-5.6 Terra at $2/$12 matches it feature for feature (function calling, structured outputs, reasoning tokens, the whole Responses-API tool surface) at a similar price, and the choice between the two often comes down to which provider's tooling your stack already speaks. Grok 4.3 is the value play at $1.25/$2.50: its output rate is unusually cheap for a capable model, which makes it the best mid-tier choice for verbose agent runs where output tokens dominate, and it carries a full 1-million-token context.
The open-weight labs field strong mid-tier contenders too, and they undercut the Western models substantially. Moonshot's Kimi K3 at $3/$15 is a 2.8-trillion-parameter open-weight flagship with a full 1-million-token context, explicitly built for agents with automatic context caching, tool calling, and configurable reasoning effort - Moonshot. Alibaba's Qwen3.8-Max at $2/$6 on the international endpoint (roughly 20% cheaper on the mainland Beijing endpoint, not the 60-70% gap the earlier Qwen generations showed) brings strong function-calling, a full million-token context, and explicit context-cache pricing, though the Max tier is not open-weight. We benchmarked these against the Western flagships in Qwen 3.8 Max vs Claude and GPT for agents and in Kimi K3 benchmarks and cost, and the pattern is consistent: the open-weight mid-tier models trade a small amount of tool-calling polish for a meaningful price advantage.
There is one trap in this tier that catches budgets constantly, and it is OpenAI's o4-mini. On paper it looks like a cheap mid-tier reasoning model at $1.10/$4.40. In practice, because it is a reasoning model, it emits hidden thinking tokens billed at the output rate, and a single request can generate three to ten times the visible output in internal reasoning - CloudZero. For an agent that reasons on every step, the effective per-turn cost can be several times the sticker rate, which pushes o4-mini's real cost above the nominally more expensive Sonnet 5 or Terra for many workloads. It is also on a clock: OpenAI has scheduled o4-mini for shutdown on October 23, 2026, naming GPT-5.6 Terra as the replacement, so the migration is no longer optional - OpenAI Developer Docs. The lesson generalizes: for reasoning models, the base rate is a floor, not an estimate, and you should measure the reasoning-token multiplier on your own prompts before you trust the price list.
9. The frontier tier and the rise of cheap-frontier
The frontier tier is where the "cheapest" framing gets tested hardest, because these models are not cheap and are not trying to be. Claude Opus 5 at $5/$25, GPT-5.6 Sol at $5/$30 (promotionally $4/$20, guaranteed at least through November 2026), and the two $10/$50 ceilings, Claude Fable 5.1 and OpenAI's newest flagship GPT-6 Astra, released September 3, 2026, are the models you reach for when correctness on a long, autonomous, multi-step task matters more than the token bill - Anthropic, OpenAI. Fable 5.1 is the interesting one for agents specifically: Anthropic prices its cache reads at 0.025x the input rate rather than the usual 0.1x, so a cached million-token prefix replays for $0.25 instead of $1.00, which takes a meaningful bite out of the loop cost that normally makes a $10 model unthinkable for a long tool chain. For a coding agent doing an overnight refactor, or a research agent running a fifteen-step investigation where a single wrong turn wastes everything downstream, the frontier models earn their premium by finishing the task correctly in fewer attempts. The false economy is running a cheap model on a task it cannot complete, looping forever, and paying more in retries than a frontier model would have cost outright.
The frontier is also where you can watch the per-token price detach from the per-task price most cleanly, because two models can be priced identically and still bill very differently. Artificial Analysis measured exactly that in its Intelligence Index v4.3 on September 7, 2026: GPT-6 Astra and Claude Fable 5.1 both score 53 on the index, and both list at $10/$50, yet the average cost per index task is $3.26 for Astra against $7.63 for Fable 5.1, a 57% gap - Artificial Analysis. Same sticker, same score, more than double the bill. The difference is entirely in how many tokens each model spends reaching the answer, which is the whole argument of this guide compressed into one measurement.
But 2026 introduced a genuinely new category that scrambles the old "frontier means expensive" assumption: cheap-frontier. The clearest example is xAI's Grok 4.6, which delivers frontier-level reasoning and tool calling at $2 input, $6 output for prompts under 200,000 tokens, roughly half the output price of Gemini 3.1 Pro and a fraction of Opus 5 - eesel AI. Independent benchmarks placed it near the top of the Artificial Analysis leaderboard while pricing it like a mid-tier model. We covered its arrival in Grok 4.6: the cheapest frontier LLM for agents, and it forced every other lab to answer the question of why a builder should pay frontier prices for frontier quality when one vendor is offering the latter without the former.
Google's Gemini 3.1 Pro is the other model straddling this line, at $2/$12 for prompts up to 200,000 tokens (flipping to $4/$18 above that), with strong structured-output adherence and a cheap $0.20 cache-read rate that makes multi-turn agent loops with large fixed prompts economical to replay - Google. Between Grok 4.6 and Gemini 3.1 Pro, the frontier floor has effectively dropped to around $2 input, which is a remarkable place for the top of the market to sit given it was $30 in early 2023.
The critical caveat on every cheap-frontier model is the long-context flip. Grok 4.6 and Gemini 3.1 Pro both roughly double their rates once a single request crosses 200,000 tokens, and the doubling applies to the entire request, not just the overflow. For agents, which accumulate context naturally, this is easy to trip. An agent that starts a task at 50,000 tokens and grows to 210,000 over its loop does not pay the higher rate on the last 10,000 tokens, it pays it on all 210,000. The discipline this demands (compact aggressively before the cliff, or pick a flat-priced model like Gemini 3.5 Flash for long-running loops) is the same discipline that governs the entire cost-optimization discussion in section 12. The frontier is cheaper than ever, but only if you stay under the line.
10. The open-weight hosting layer
Underneath the branded APIs sits a layer that agent builders chasing the absolute floor price cannot ignore: the inference hosts that run open-weight models on their own hardware and charge for the tokens. This is where the true price floor lives. Because the weights are free, a dozen platforms compete purely on infrastructure efficiency, and the result is that a capable 70-billion-parameter model now costs around $0.10 to $1.00 per million input tokens, and small models are effectively free. DeepInfra and Novita consistently anchor the bottom: DeepInfra hosts a Llama-family 70B model at $0.10/$0.32 and small 8B models at around $0.02/$0.04, with its cheapest listed model near $0.019 per million - DeepInfra.
The right way to think about this layer is a spectrum from rock-bottom price to enterprise reliability, and where you land depends on what your agent needs. At the floor, DeepInfra and Novita give you the cheapest tokens with solid but not guaranteed throughput. A notch up, Together AI and Fireworks AI add throughput SLAs, dedicated endpoints, and (on Together) a 50% Batch API discount, hosting models like a 235-billion-parameter Qwen3 at $0.20/$0.60 - Together AI. Baseten spans both serverless per-token Model APIs and dedicated per-GPU-minute deployments (with scale-to-zero idle billing) for teams whose agents need guaranteed capacity - Baseten. The through-line is that all of these are OpenAI-compatible with function calling, so an agent written against one host ports to another with a base-URL change.
The most important insight in this layer is not price, it is which open-weight models are actually agent-grade. The floor-price small models (an 8B Llama, a Mistral-Nemo) are cheap precisely because they are weak at multi-step tool calling, so using them as an agent brain is a false economy. The open-weight models that genuinely hold up in agent loops are the larger, newer ones: OpenAI's GPT-OSS 120B, DeepSeek V4, the Qwen3 235B class, and the GLM-5 line. Here is where the two speed-focused hosts change the calculation:
| Host | Silicon | Example model | Price /1M | Edge |
|---|---|---|---|---|
| Groq | LPU | GPT-OSS 120B | $0.15/$0.60 | ~500 tok/s; 50% cache or 50% batch, not both |
| Cerebras | Wafer-scale | GPT-OSS 120B | $0.35/$0.75 | ~3,000 tok/s, up to 30x a typical GPU |
| Fireworks | GPU | GPT-OSS 120B | $0.15/$0.60 | Serving-tier choice, prompt caching |
| Baseten | GPU | GPT-OSS 120B | $0.10/$0.50 | Cheapest GPT-OSS row; scale-to-zero |
| DeepInfra | GPU | 70B-class | $0.10/$0.32 | Rock-bottom raw price |
| Together | GPU | Qwen3 235B | $0.20/$0.60 | Enterprise SLA, 50% batch |
The speed axis that Groq and Cerebras compete on matters for agents in a way that raw price does not capture. Cerebras now serves GPT-OSS 120B at roughly 3,000 tokens per second, which it puts at up to thirty times a typical GPU, and that collapses the wall-clock time of a long multi-step agent chain - Cerebras. Groq's LPU delivers the same class of speed advantage, but be careful with the discount math: Groq offers a 50% prompt-cache discount and a 50% Batch API discount and the two do not stack, so batch requests are billed at the flat batch rate regardless of cache status. The real floor is half of on-demand, not a quarter - Groq. For an interactive agent where a user is waiting, or a long tool-calling loop where latency compounds across steps, buying speed can be worth more than buying the cheapest token, because the time cost of a slow agent is real even when it does not show up on the invoice.
11. Gateways, routers, and the arbitrage layer
Sitting on top of every provider and host is a layer that does not run models at all: the gateways and routers. Their job is to give an agent one API key, one endpoint, and automatic failover across dozens of underlying providers, plus the ability to route each request to the cheapest or fastest host that serves the model. For an agent, this layer is primarily about two things: uptime (if one provider returns a 429 or a 500, the gateway retries the next one for free) and cost arbitrage (routing to whichever host currently offers the lowest price for a given open-weight model). We went deep on this category in LLM tool gateways: the 2026 builder's guide, and it has become close to mandatory infrastructure for any agent that needs to run reliably at scale.
The fee models are where the gateways differ, and the differences are small but real. OpenRouter is the default choice, routing across 80-plus hosts and 500-plus models with automatic failover, normalized OpenAI-compatible tool calling, and routing suffixes that pick the tradeoff for you: :floor (cheapest), :nitro (fastest), and :exacto, which weights toward tool-calling reliability and is the one agent builders usually want. It takes no per-token markup, charging only a 5.5% fee when you top up credits (5% via crypto), and it exposes around twenty free models for low-volume use - OpenRouter. Vercel AI Gateway goes further on price: zero markup, zero platform fee, and zero fee on bring-your-own-key requests, which makes it the cheapest pure passthrough on paper, with a monthly included credit and a one-command setup for agent CLIs like Claude Code and Cursor - Vercel. Read that free tier carefully: it covers only a subset of the catalog at lower rate limits, and buying credits once ends free-tier eligibility permanently. Cloudflare AI Gateway makes its core features (caching, rate-limiting, retries, analytics) free and only charges a 5% fee on credits bought through its optional Unified Billing - Cloudflare.
The judgment for agent builders comes down to a single trade-off between total cost and reliability value:
- For a single-model, high-volume agent, going direct to the provider (or through Vercel's zero-fee gateway) beats paying OpenRouter's 5.5% top-up fee.
- For a multi-model or failover-critical agent, that 5.5% buys uptime and cost arbitrage that is worth far more than the fee.
- For caching-heavy agents, going direct to a host (DeepInfra, Fireworks, Groq) gives deterministic prompt caching that a marketplace cannot guarantee, because a routed request may land on a host without caching.
That last point is the subtle one and the reason routing is not a free lunch. When OpenRouter sends your request to whichever host is cheapest this second, you lose control over whether that host supports prompt caching, and for an agent whose economics depend on caching a fat system prompt, an inconsistent cache hit rate can cost more than the routing saves. The resolution most mature agent stacks reach is a hybrid: route through a gateway for failover and model diversity, but pin caching-critical, single-model workloads to a direct provider connection. The gateway is for resilience and arbitrage; the direct connection is for deterministic caching economics.
12. The seven levers that actually cut agent cost
Everything up to this point has been about choosing a model. This section is about the levers that move an agent's bill far more than the model choice does, and the reason it comes late is that they are what separate a naive $500 monthly bill from an optimized $50 one on identical work. We covered the full playbook in how to cut LLM costs: the 2026 efficiency guide, but the seven that matter most for agents specifically are worth walking through, because each attacks a different part of the cost structure. The single most important one, again, is prompt caching, because it directly attacks the re-sent-context problem that dominates agent cost. Caching a stable prefix lets every subsequent turn pay roughly 10% of the input rate for those tokens, which inverts old advice: a 50,000-token cached system prompt can cost less to run than a 5,000-token uncached one, as long as the static content sits first and dynamic content is injected last so cache hits do not collapse - DevToolLab.
The second lever, model routing and cascades, is where the thousand-fold price spread from section 4 pays off. You run a cheap model first (a nano or cheap-tier worker) and escalate to a flagship only when confidence is low or the task is provably hard. Combined with caching, this took a code-review workload from $15-$25 per pull request down to $0.50-$1.50 at comparable depth - MorphLLM. Menlo Ventures notes that almost nobody routes multi-agent traffic yet, which means most teams are leaving this saving entirely on the table. We built the full case for it in AI model routing in 2026: cut agent costs 60%, and it is the highest-leverage architectural change most agent teams can make.
The remaining five levers each target a specific waste:
- Batch processing gives a flat 50% discount for non-interactive work (evals, enrichment, offline research), and stacks with cache reads toward roughly 95% savings on the repeated portion.
- Context compaction prunes stale tool outputs and old turns, directly shrinking the transcript that gets re-billed on every step.
- The effort dial turns reasoning-token spend down for easy steps and up only for hard ones, since thinking tokens bill at the output rate.
- Structured outputs constrain the model to a schema, eliminating a whole class of parse-failure retries that each re-send the full context.
- Off-peak scheduling on providers like DeepSeek halves the rate for work that can wait for the discount window.
The reason these levers compound rather than merely add is that they attack different terms in the same cost equation. Caching cuts the price of the re-sent prefix, compaction cuts the size of what gets re-sent, routing cuts the price of the model doing the sending, batch cuts the price of the whole job, and structured outputs cut the number of times you have to send it at all. Stack four of them and a workload that looked uneconomic at flagship prices becomes trivially cheap, which is exactly why the sticker price on a pricing page tells you so little about what an agent will actually cost. The teams that win on agent economics are not the ones who found the cheapest model. They are the ones who pulled every lever.
13. Real per-task cost math
Abstract per-token prices become intuitive only when you translate them into the cost of a completed task, so here are worked examples grounded in real published figures. The most concrete public benchmark is Claude Code, which Anthropic now measures across enterprise deployments at about $13 per developer per active day and $150 to $250 per developer per month, with spend staying under $30 per active day for 90% of users - Anthropic. It is worth pausing on what that number is doing: per-token prices fell across every tier during the same period, and the per-developer bill still sits in the low hundreds per month, because a more capable agent simply reaches for more context and more steps. At the heavy end, an engineer pushing an agent through automation-heavy tasks with 400,000 to 2,000,000 cumulative input tokens per task can reach $500 to $2,000 per month. That order-of-magnitude range between a typical and a heavy user, on the same tool at the same per-token rates, is entirely a function of how much context the agent drags around and how often it loops, which is the practical proof of everything in section 1.
The routing example is even sharper. A code-review agent that spins up parallel specialized sub-agents on a frontier model averages $15 to $25 per pull request. The same review depth, achieved with prompt caching and a cheap-model-first cascade, drops to $0.50 to $1.50 per pull request - MorphLLM. That is a 20-to-30x cost reduction on identical output, and it comes entirely from architecture, not from a cheaper model. The frontier model still does the hard part; it just does not do the easy 80% of the work that a cheap model could have handled. This is the single most important number in the guide for anyone trying to make agent economics work, and we expanded on why so many teams fail to capture it in AI agent ROI in 2026: why most pilots never scale.
The reason agent bills surprise people is captured in one measurement from Anthropic's engineering team: agents use about 4x the tokens of a chat interaction, and multi-agent systems about 15x, and token usage explained roughly 80% of the performance variance in their tests - Anthropic Engineering. That last clause is the uncomfortable part: spending more tokens is literally what buys the better result, so cost and quality are tightly coupled, and you cannot simply cut tokens without cutting quality. The escape is not to spend fewer tokens indiscriminately, it is to spend them on the right model at the right price, which is the entire argument for routing and caching over blanket downgrades.
The multiplier is not a one-off measurement either. Anthropic's own guidance for Claude Code's agent teams puts the same effect at roughly 7x the tokens of a standard session once teammates are running in plan mode, for the identical structural reason: each teammate maintains its own context window and runs as a separate instance - Anthropic. Two independent measurements of the same architecture, landing between 7x and 15x, are enough to treat the fan-out tax as a design constant rather than an artifact.
The multi-agent multiplier deserves a note of caution for cost-conscious builders. A 15x token burn means orchestrator-worker patterns are only economically rational for high-value, heavily parallelizable tasks whose information genuinely exceeds a single context window. Spinning up five sub-agents to do work one agent could handle sequentially is a common and expensive mistake, because every handoff repeats context transfer and adds verification layers. We laid out when the pattern pays and when it does not in multi-agent orchestration: an agentic approach to LLMs, and the short version is that multi-agent is a scaling tool for genuinely parallel problems, not a default architecture.
14. How AI agents are reshaping the pricing field
The rise of agents is not just consuming the cheap tokens, it is changing what the providers build and how they price. Three shifts are visible in the 2026 pricing landscape, and each one is a direct response to agent workloads. The first is that caching moved from a nice-to-have to a headline feature, because agents are the workload that resends the same prefix thousands of times. Providers now compete on cache-read rates ($0.02 to $0.05 at the cheap end) as aggressively as they compete on base input rates, and some (DeepSeek, OpenAI) made caching automatic precisely so agent developers would not have to opt in. When a feature becomes automatic, it is because the dominant workload demands it, and that workload is agents.
The second shift is tiered and off-peak pricing, which exists because agent traffic is spiky and often deferrable. DeepSeek's off-peak windows, the Batch APIs across all major providers, and the long-context surcharges are all attempts to price the specific shape of agent demand: huge, bursty, context-heavy, and frequently non-interactive. This is a market maturing from "one price per token" toward "price the workload," and it rewards builders who understand their own traffic pattern. An agent team that knows which of its work is interactive (pay full price for low latency) and which is batchable (take the 50% discount) captures savings that a team treating all tokens identically leaves behind. We wrote the pricing-strategy side of this in price your AI product to beat token costs on Founden.ai, a site we also run, and the same logic applies to buying tokens as to selling access to them.
The third shift is the most consequential and the one that changes the answer to "which API is cheapest": the emergence of the managed agent platform, which abstracts the token layer away entirely. Instead of choosing a model, wiring up caching, and building routing logic, you describe what you want an agent to do and the platform handles the model selection, the cost optimization, and the orchestration underneath. Anthropic's own Managed Agents surface runs the agent loop and hosts the tool sandbox so you never touch the token math, and it has introduced a second billing dimension that does not exist on a plain completions API: session runtime, metered at $0.08 per session-hour on top of tokens, accruing only while the session is actually running - Anthropic. That is a small number, and it is a significant signal. Once a provider bills for wall-clock time as well as tokens, an idle agent has a price, and "how long does your agent sit thinking" becomes a line item rather than a design detail. Platforms like o-mega take the abstraction further still, letting you build and run an entire autonomous company through conversation while the model routing and cost control happen out of sight. This is worth mentioning because it reframes the cheapest-API question for a large class of builders: for a team whose goal is outcomes rather than infrastructure, the cheapest path may be not choosing a model at all and letting a managed layer optimize the tokens on their behalf. This is not the right answer for everyone (teams that need deterministic control over caching and routing will still go direct), but it is a genuine third option alongside "direct provider" and "gateway," and it is growing fast because the token-optimization work this guide describes is exactly the kind of undifferentiated heavy lifting that most teams would rather not own.
Yuma Heymans, who founded o-mega and co-founded the AI recruitment platform HeroHunt.ai, has argued that the economics of an agent workforce live or die on this exact tension: an agent fleet's dominant running cost is token spend, so the choice between a cheap-but-capable API and smart routing is what makes deploying many agents at once financially viable in the first place. You can follow his writing on the agent-workforce economy at @yumahey.
15. Where cheap wins and where it fails
Honesty about the limits of "cheapest" is what separates a useful guide from a race to the bottom, so this section is deliberately balanced. Cheap wins decisively in a specific and large set of cases: high-volume, well-defined, repetitive steps where the task is bounded and the model does not need to reason its way out of ambiguity. Classification, extraction, routing, formatting, first-pass triage, and any step where a cheap model's output feeds into a verification layer are exactly where the nano and cheap tiers shine. In these cases, paying frontier prices is pure waste, and the routing discipline of "cheap first, escalate rarely" captures nearly all the savings with almost none of the quality loss. If your agent's work decomposes cleanly into many simple steps, the cheap tiers will run it for a tenth of what a naive single-flagship design costs.
Cheap fails, and fails expensively, in the opposite regime: long-horizon, open-ended, high-stakes tasks where a single wrong turn compounds. A coding agent doing a multi-file refactor, a research agent running a fifteen-step investigation, or any workflow where step ten depends on step three being correct is where a cheap model's slightly-lower reliability turns into a cascade of wasted downstream work. Here the frontier models earn their premium not by being smarter per token but by being right more often on the first attempt, which means fewer retries, fewer dead-end branches, and fewer times the whole loop has to restart. The false economy of running Opus-class work on a nano model is real, and it shows up as a bill that is higher, not lower, because the cheap model looped ten times where the expensive one would have finished once.
The synthesis, and the thing that makes this a genuinely hard engineering problem rather than a simple "pick the cheapest" exercise, is that the same agent contains both regimes. A single agent task typically has a few genuinely hard steps embedded in many easy ones, which is precisely why routing beats both "always cheap" and "always expensive." The teams that get agent economics right do not pick a tier, they build a system that puts each step on the right tier, and they measure the completed-task cost rather than the per-token price. That measurement discipline is the whole game: as we documented in the cost of AI agents: uncovering the true cost of agentic AI, the teams that fail are almost always the ones who optimized the sticker price and never measured what a task actually cost to complete.
16. The future outlook for agent economics
Three trends will define agent costs over the next year, and they push in different directions. The first is that LLMflation continues, so the per-token price of any given quality tier will keep falling roughly 10x per year - a16z. Taken alone, this means every agent workload gets cheaper by default, and workloads that are marginal today become trivially affordable within a year. This is the tailwind, and it is the reason the smart move is often to build for the capability you need now and let the price come down to meet you, rather than compromising on a weaker model to save money that time will save for you anyway.
The second trend runs against the first: agent architectures keep getting more token-hungry. Multi-agent systems, longer reasoning chains, larger context windows, and more aggressive tool use all consume the savings that LLMflation provides. Google's sevenfold year-over-year token growth is the macro signature of this, and it means aggregate spend keeps rising even as unit prices fall - Menlo Ventures. The net effect for any given team depends entirely on which force dominates their workload, and the lever that decides it is architectural discipline: the teams that pull the caching, routing, and compaction levers ride the price decline, while the teams that let their agents sprawl watch consumption outrun the savings.
The third and most interesting trend is the shift of optimization up the stack. As caching, routing, and batching become table stakes, the differentiation moves from "which model is cheapest" to "which system optimizes tokens best," and that is increasingly a job for the platform rather than the individual builder. Automatic caching, server-managed context compaction, and managed routing are all examples of the provider absorbing work that builders used to do by hand. The endpoint of this trend is that for a large class of applications, the token-optimization problem this entire guide describes becomes invisible, handled by a managed layer, in the same way that most developers no longer hand-tune database query plans. The cheapest LLM API of 2027 may not be a model at all, it may be a system that picks the model for you, and the builders who win will be the ones who understood the economics well enough to know when to hand them off. We track this convergence in our ongoing coverage of the best LLM for AI agents, and the ranking shifts month to month precisely because the field is moving this fast.
17. Conclusion: a decision framework
The cheapest LLM API for your agent is not a model on a price list, it is a system that puts each step on the right tier and squeezes the architecture. If you take one thing from this guide, take the reframe: stop comparing per-token prices and start measuring per-completed-task cost, because the two diverge by an order of magnitude the moment you introduce a tool-calling loop. A model that is twice the price per token can be a fraction of the cost per task if it caches your prefix, calls tools reliably, and finishes in fewer steps, and a nano model that fails and loops can cost more than a frontier model that gets it right once.
For a concrete starting point, here is the framework the evidence supports. Route the easy, high-volume 80% of your agent's steps to the cheap and nano tiers, where GLM-5.3-Flash, GPT-5.6 Luna, Qwen3.8-Flash, and Gemini 3.1 Flash-Lite all deliver reliable tool calling for well under a dollar per million blended tokens. Reserve the hard 20% for a cheap-frontier model like Grok 4.6 at $2/$6, or a true frontier model like Claude Opus 5 when correctness on a long autonomous task genuinely outweighs cost. Turn on prompt caching for anything that resends a static prefix, take the 50% Batch discount for anything non-interactive, and put a gateway in front for failover while pinning caching-critical workloads to a direct connection. Pull those levers and a workload that looks like $500 a month at flagship prices runs closer to $50.
And if the token-optimization work itself is not where you want to spend your engineering time, the honest answer is that managed platforms like o-mega now do this heavy lifting for you, choosing and routing models underneath an outcome-level interface, which for many teams is the genuinely cheapest path because it removes the optimization problem rather than solving it by hand. Whichever route you take, the discipline is the same: the field moves monthly, the prices in this guide are snapshots, and the only durable advantage is understanding the mechanics well enough to re-optimize as the market shifts underneath you.
This guide reflects the LLM API pricing landscape as of September 2026. Model prices, promotional windows, and available tiers change constantly in this market: the Gemini 3.x Flash introductory rate cited here expires on December 31, 2026, retired models get pulled from provider APIs with little notice, and new models launch monthly. Verify current pricing on each provider's official page before committing a production workload.