{"slug": "the-cheapest-llm-api-in-2026-and-whether-it-is-good-enough-for-your-agent", "title": "The cheapest LLM API in 2026, and whether it is good enough for your agent", "summary": "As of October 26, 2026, OpenAI's gpt-5-nano is the cheapest LLM API from a major provider at $0.05 per million input tokens and $0.40 per million output tokens, according to a pricing survey drawing on OpenAI, Anthropic, Google and DeepSeek rate cards. The post reports that a migration 58.8% cheaper and 75.2% faster with zero failed calls still failed its evaluation because the cheaper model called the wrong tools on a quarter of comparisons, while another migration 71.2% cheaper passed every budget. It argues the only reliable test is replaying production traffic against both models and comparing tool calls and arguments.", "body_md": "[← all posts](https://www.evalshift.dev/blog)\n\n# The cheapest LLM API in 2026, and whether it is good enough for your agent\n\nThe cheapest LLM APIs as of October 2026, from $0.05 per million tokens, and how to tell if a cheap model is good enough for your agent before you switch.\n\nAs of October 26, 2026, the cheapest LLM API from a major provider is OpenAI's `gpt-5-nano`, at\n$0.05 per million input tokens and $0.40 per million output tokens. Among current-generation\nmodels, OpenAI's `gpt-6-luna` and Anthropic's Claude Haiku 5.5 tie at $0.10 input and $0.50\noutput, DeepSeek's `deepseek-flash` costs $0.15 input and $0.60 output off-peak (double that at\npeak), and Google's cheapest model open to new projects is `gemini-3.1-flash-lite` at $0.25 input\nand $1.50 output. If you drop the major-provider filter, aggregators list small niche models from\n$0.01 per million input tokens.\n\nWhether the cheapest LLM is good enough for *your agent* is a separate question, and the price\ntable cannot answer it. The only reliable answer is to replay your own production traffic against\nyour current model and the cheap candidate and compare what the agent *does*: which tools it\ncalls, with which arguments, and whether it still answers when it should. I ran exactly that on a\nmigration that was 58.8% cheaper and 75.2% faster with zero failed calls, and the report still\nreturned **FAIL**, because the cheaper model called the wrong tools on a quarter of the\ncomparisons. Another migration, 71.2% cheaper, passed every budget. Price told me nothing about\nwhich one would be which.\n\nThe rest of this post is the price table, why list price is not what an agent actually costs, and the check to run before you switch.\n\n## ## Cheapest LLM API prices, October 2026\n\nPrices are per million tokens, standard (non-batch) tier, from each provider's own pricing page:\n[OpenAI ↗](https://developers.openai.com/api/docs/pricing),\n[Anthropic ↗](https://claude.com/pricing),\n[Google Gemini API ↗](https://ai.google.dev/gemini-api/docs/pricing) and\n[DeepSeek ↗](https://api-docs.deepseek.com/quick_start/pricing). The last column is what 1,000 agent\ncalls cost at 3,000 input and 400 output tokens each, uncached, which is roughly one turn of a\nsmall tool-calling agent with its system prompt and tool definitions.\n\n| Provider | Model | Input | Output | 1,000 calls | The catch | \n|---|---|---|---|---|---|\n| OpenAI | `gpt-5-nano` | $0.05 | $0.40 | $0.31 | Previous generation | \n| OpenAI | `gpt-4.1-nano` | $0.10 | $0.40 | $0.46 | Older still | \n|  | `gemini-2.5-flash-lite` | $0.10 | $0.40 | $0.46 | Retired on Vertex AI; Gemini API serves existing projects only | \n| OpenAI | `gpt-6-luna` | $0.10 | $0.50 | $0.50 |  | \n| Anthropic | Claude Haiku 5.5 | $0.10 | $0.50 | $0.50 | Prompts over 100K tokens bill at $0.50 / $2.50 | \n| DeepSeek | `deepseek-flash` | $0.15 | $0.60 | $0.69 | Off-peak price; peak hours are $0.30 / $1.20 | \n| OpenAI | `gpt-5.4-nano` | $0.20 | $1.25 | $1.10 |  | \n|  | `gemini-3.1-flash-lite` | $0.25 | $1.50 | $1.35 |  | \n|  | `gemini-3.5-flash-lite` | $0.30 | $2.50 | $1.90 |  | \n\nFor scale, the same 1,000 calls cost $3.75 on `gemini-3.8-flash`, $5.00 on `gpt-6.1-terra` and\n$10.00 on Claude Sonnet 5.5. The cheapest tier is 10 to 30 times cheaper than the mid-tier models\nmost agents are built on, which is why the question keeps coming up.\n\nOutside the major providers, [BenchLM's pricing table ↗](https://benchlm.ai/llm-pricing) lists 198\npaid models from 40 providers. Its cheapest entry is a 4B-parameter Perplexity model at $0.01 per\nmillion input tokens, and its cheapest model with a benchmark score is Qwen3.7 Flash at $0.03\ninput and $0.13 output. Those are real prices, but most of the very cheapest rows are small\nclassifier-style models with no published score, not general agent models.\n\nTwo notes on the Google rows. `gemini-2.5-flash-lite` is the cheapest Gemini model on paper, but\nit retired on Vertex AI on October 20, 2026, and new Gemini API projects can't use it; the\n[Gemini deprecation checklist](https://www.evalshift.dev/blog/gemini-model-deprecation-migration-checklist) has the dates.\nAnd several Gemini 3.x prices on Google's page are marked as introductory, valid until the end of\n2026, so check the page before you budget a year out.\n\nAll three of OpenAI, Anthropic and Google take 50% off for batch requests. That matters for offline jobs and evals, and almost never for an agent, which has a user waiting on the other end.\n\n## ## List price is not what your agent costs\n\nAn agent is not one call. It is a loop: the model reads the conversation, calls a tool, reads the result, and decides what to do next, and every turn resends the whole growing context. So for agents, input price usually matters more than output price, and four things move the real bill away from the list price:\n\n- +**Tokens per task, not per call.** A cheaper model that takes two extra tool-call turns to finish\na task, or retries a malformed call, can cost more per task than a pricier model that gets it\nright the first time.\n- +**Prompt caching.** Your system prompt and tool definitions repeat on every turn. Cached input is\n$0.01 per million on`gpt-6-luna` and Haiku 5.5, and $0.003 off-peak on`deepseek-flash` . With a\nlong, stable prefix, the cache discount can matter more than the headline price.\n- +**Price tiers inside one model.** Haiku 5.5 is $0.10 input up to 100K-token prompts and $0.50\nabove. DeepSeek doubles during peak hours. An agent with long contexts, or traffic concentrated\nin one time zone, does not pay the number in the first row.\n- +**Reasoning tokens.** Models that think before answering bill those tokens as output. Two models\nwith the same price per token can differ several-fold in tokens per answer.\n\nThe only number worth comparing is measured cost on your traffic. In the run described below, the source model cost $0.1799 and the candidate $0.0741 for the same 16 calls, a 58.8% saving measured on real requests rather than read off a pricing page.\n\n## ## Is the cheapest LLM good enough for your agent?\n\nSometimes. Here is a case where it was not.\n\nI replayed 16 real examples from an agent against its current model and a cheaper candidate. On\nevery number a finance review would check, the candidate won: 58.8% cheaper, 75.2% faster, and\nnot one failed or truncated call. The EvalShift migration report returned **FAIL**.\n\nTwo budgets broke, and both were about behavior, not quality of prose:\n\n- +**Tool-selection divergence was 25%** against a 10% limit. The cheaper model picked a different\ntool, or a tool where none was needed, on a quarter of the comparisons.\n- +**The equivalence rate fell to 61.4%** against a required 75%. Fewer than two in three paired\ncomparisons were judged to do the same job as the current model.\n\nThe failures were the kind that never show up in an error rate. Asked for an opinion on working\nlate, the current model answered in two sentences; the cheaper one issued a `search_web` call and\nreturned no text at all. In another example, the cheaper model told the user an action was done\nwithout ever calling the tool that does it. In a third, it routed the request to a different tool.\n\nEvery one of those calls succeeded at the API level. A dashboard tracking latency, cost and error\nrate would have shown the migration as a clean win. The full breakdown, with the per-evaluator\nresults and the diffs, is in\n[the new model was 59% cheaper and 75% faster, and I still wouldn't ship it](https://www.evalshift.dev/blog/cheaper-faster-and-still-a-fail).\n\n### ### And when the cheap model is good enough\n\nThe opposite result is just as real. A customer-support agent with six tools moved from\n`gemini-3.7-pro` to `gemini-3.7-flash`, measured over 120 production examples: 71.2% cheaper,\n61.9% faster, and all ten budgets held, including zero allowed regressions on the security slice\nand zero argument drift on refunds. That one shipped. The policy and the full report are in\n[this one passed: 71% cheaper, and the agent still does the same thing](https://www.evalshift.dev/blog/what-a-passing-migration-proves).\n\nThe difference between the two was not the size of the discount. It was what each agent asked the model to do, and the only way to find that out was to run it.\n\n## ## Where cheap models break in agents\n\nThe cheapest tier is usually fine at the parts of an agent that look like classification or extraction with a clear schema. The regressions I see cluster in the parts where the model has to decide something:\n\n- +**Whether to call a tool at all.** Cheap models over-call (searching instead of answering) or\nunder-call (answering from memory where a lookup was required).\n- +**Claiming an action without doing it.** \"I've updated your address\" with no`update_address` call in the trace. This is the most expensive failure, because the text reads as a success.\n- +**Which tool.** With several tools that overlap, the cheaper model picks a neighbor.\n- +**Arguments.** An id copied with a typo, an enum value outside the allowed set, a date in the\nwrong format. The call succeeds and does the wrong thing.\n\nNone of these show up in a benchmark score, and most don't show up in a semantic-similarity score\neither, because the text around the mistake is fluent. They show up when you compare the tool-call\ntrace of the old model and the new one on the same input. The\n[guide to evaluating agent tool calls](https://www.evalshift.dev/blog/evaluating-agent-tool-calls) covers the checks for\neach of them.\n\n## ## How to tell if the cheapest LLM is good enough for your agent\n\nSix steps, and only the first one uses the price table.\n\n## ## Step 1: shortlist by price, then stop looking at price\n\nPick two or three candidates from the table above that support the features the agent uses: tool calling, structured output, your context length. More candidates than that and the comparison turns into a benchmark exercise instead of a decision.\n\n## ## Step 2: replay real traffic, not a demo set\n\nTake 100 to 300 inputs from production, stratified by route or intent, so the rare but expensive\npaths are in the sample, and run them through the current model and each candidate. A\n[golden suite built from production traffic](https://www.evalshift.dev/blog/build-a-golden-suite-from-production-traffic)\nis the reusable version of this, and\n[how many eval cases you need](https://www.evalshift.dev/blog/how-many-eval-cases-do-you-need) covers the sizing.\n\n## ## Step 3: write the limits down before the run\n\nMaximum tool-selection divergence, minimum equivalence rate, and zero tolerance on routes that move money or touch security. Deciding after you have seen the numbers is how a bad migration gets approved, because a 58.8% saving makes almost any regression look acceptable in hindsight.\n\n## ## Step 4: compare behavior, not just answers\n\nDiff tool calls, arguments and structured fields per example, and read every example that\nregressed. An LLM judge helps on open-ended text, but\n[know when to trust it](https://www.evalshift.dev/blog/when-to-trust-an-llm-judge), and don't let an averaged score stand\nin for the per-example diff.\n\n## ## Step 5: measure cost per task on the same run\n\nUse the cost both models actually incurred on your inputs, with your caching, not the list price. If the cheaper model needs more turns per task, this is where it shows.\n\n## ## Step 6: decide per route\n\nThe cheapest model is often good enough for some routes and not others. Sending the easy routes to it and keeping the rest on the current model captures most of the saving without the failures.\n\n## ## Doing this with EvalShift\n\nThis is the workflow EvalShift automates. It replays a frozen suite against the current and\ncandidate model, scores every pair with tool-call, structural, semantic and judge evaluators,\nchecks the result against the budgets you wrote, and produces a pass or fail verdict with the\nper-example diffs and the measured cost beside it. It runs locally and writes a single HTML\nreport. The [step-by-step migration test guide](https://www.evalshift.dev/blog/test-llm-model-migration-before-you-ship)\nshows the whole flow, and [getting started](https://www.evalshift.dev/docs/getting-started) has the install.\n\nThe cheapest LLM API is a fact you can look up. Whether it is good enough for your agent is a fact you can only measure.\n\n## ## FAQ\n\n**What is the cheapest LLM API?** As of October 26, 2026, the cheapest from a major provider is\nOpenAI's `gpt-5-nano` at $0.05 per million input tokens and $0.40 per million output tokens. The\ncheapest current-generation models are OpenAI's `gpt-6-luna` and Anthropic's Claude Haiku 5.5,\nboth $0.10 input and $0.50 output. Aggregators list small niche models from $0.01 per million\ninput tokens.\n\n**What is the cheapest Gemini API model?** On paper `gemini-2.5-flash-lite`, at $0.10 input and\n$0.40 output, but it retired on Vertex AI on October 20, 2026 and the Gemini API serves it only to\nprojects that already used it. For new projects the cheapest is `gemini-3.1-flash-lite` at $0.25\ninput and $1.50 output.\n\n**Is the cheapest LLM good enough for an AI agent?** Sometimes, and only a replay of your own\ntraffic can tell. One swap that was 58.8% cheaper and 75.2% faster with no failed calls still\nfailed, because the cheaper model chose a different tool on 25% of comparisons and claimed actions\nit never performed. Another swap, 71.2% cheaper, passed every budget.\n\n**Why can a cheaper model end up costing more per task?** An agent pays per task, not per call. A\nmodel that needs extra tool-call turns, retries malformed calls, or spends more reasoning tokens\ncan cost more per completed task than a pricier model, and long prompts or peak hours can move it\nonto a higher price tier.\n\n**Where do cheap LLMs usually fail in agents?** In decisions rather than prose: calling a tool\nwhere the previous model answered directly or skipping a required lookup, reporting an action as\ndone without calling its tool, picking a neighboring tool, and passing malformed arguments. All of\nthese can return fluent text and a successful API response.\n\n## ## Keep reading\n\n- +[The new model was 59% cheaper and 75% faster. I still wouldn't ship it.](https://www.evalshift.dev/blog/cheaper-faster-and-still-a-fail) — the full failing report, evaluator by evaluator.\n- +[This one passed: 71% cheaper, and the agent still does the same thing](https://www.evalshift.dev/blog/what-a-passing-migration-proves) — the policy and report from a cheap swap that held.\n- +[What actually breaks when you switch LLMs](https://www.evalshift.dev/blog/what-breaks-when-you-switch-llms) — why the\nworst regressions from a model swap read as correct.", "url": "https://wpnews.pro/news/the-cheapest-llm-api-in-2026-and-whether-it-is-good-enough-for-your-agent", "canonical_source": "https://www.evalshift.dev/blog/cheapest-llm-api", "published_at": "2026-10-26 00:00:00+00:00", "updated_at": "2026-10-27 21:14:34.183549+00:00", "lang": "en", "topics": ["large-language-models", "ai-agents", "ai-tools", "ai-infrastructure"], "entities": ["OpenAI", "gpt-5-nano", "Anthropic", "Claude Haiku 5.5", "DeepSeek", "deepseek-flash", "Google", "gemini-3.1-flash-lite"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/the-cheapest-llm-api-in-2026-and-whether-it-is-good-enough-for-your-agent", "markdown": "https://wpnews.pro/news/the-cheapest-llm-api-in-2026-and-whether-it-is-good-enough-for-your-agent.md", "text": "https://wpnews.pro/news/the-cheapest-llm-api-in-2026-and-whether-it-is-good-enough-for-your-agent.txt", "jsonld": "https://wpnews.pro/news/the-cheapest-llm-api-in-2026-and-whether-it-is-good-enough-for-your-agent.jsonld"}}