TechAugust 17, 202611 min read
LLM API pricing comparison 2026, 18 models and 3 real jobs
Every LLM API pricing comparison stops at the price per million tokens. This one prices 3 real jobs across 18 models, and names the 4 clauses that change the ranking after you sign up.

An LLM API pricing comparison in 2026 runs from $0.05 to $30 per million input tokens, and the distance between the cheapest usable model and the most expensive one is far wider than most teams budget for. On the same 10,000 support conversations, Z.ai's GLM 5.3 Flash costs $4.00 and Claude Opus 5 costs $325.00 at the rates their own pricing pages carried on 28 August 2026.
Those figures come from the vendors' own pages, priced against 3 jobs a real product actually runs, a support chatbot, a coding agent and a bulk extraction run. The ranking then changes once you account for 4 clauses no price table shows, a tokenizer that counts the same text differently, a context threshold that doubles one rate, a clock that halves another, and an expiry date sitting on the cheapest flagship line.
What are you actually paying for when you call an LLM API?
You pay per token, in 2 directions, and the output direction costs several times more than the input direction. On the Claude API, Claude Opus 5 costs $5 per million input tokens and $25 per million output tokens, so everything the model writes is billed at 5 times the rate of everything you send it.

A token is roughly 4 characters or 0.75 words of English, which is the estimate Anthropic publishes in its own pricing documentation. That ratio is why a system prompt of 2,000 words lands around 2,700 tokens, and why an agent that rereads the same long file on every turn burns money quietly. Your bill is really 3 meters running at once, fresh input, cached input, and generated output.
Cached input is the meter most price comparisons forget. On the Claude API a cache hit costs 0.1 times the base input rate, so a cached token on Claude Sonnet 5 costs $0.20 per million instead of $2.00, while writing that cache costs 1.25 times the base rate for the 5 minute window and 2 times for the 1 hour window. Anthropic's own documentation says the 5 minute cache pays for itself after a single read, which makes it free money on any prompt that repeats.
The meters that never reach a price table are the server side tools. Anthropic bills web search at $10 per 1,000 searches on top of the tokens those results consume, code execution at $0.05 per hour per container once an organization passes 1,550 free hours a month, and a Managed Agents session at $0.08 per session hour on top of everything else. A busy research agent can spend more on searches than on the model reading them, and it is one of the quieter ways this industry actually earns, which we took apart in how AI companies make money.
Which LLM API is cheapest per million tokens in 2026?
In an LLM API pricing comparison built from the vendors' own pages on 28 August 2026, the lowest output price among the paid models on this table belongs to Z.ai's GLM 5.3 Flash at $0.25 per million tokens, and the lowest input price belongs to OpenAI's older gpt-5-nano at $0.05 per million. The most expensive text model in the same table is OpenAI's GPT 5.5 Pro at $30 input and $180 output, which is 600 times the input price of gpt-5-nano.

| Model | Input / 1M | Output / 1M | Cached input / 1M |
|---|---|---|---|
| gpt-5-nano (OpenAI) | $0.05 | $0.40 | $0.005 |
| GLM-5.3-Flash (Z.ai) | $0.075 | $0.25 | $0.015 |
| Mistral Small 4 | $0.15 | $0.60 | about 10% of input |
| gpt-5.6-luna (OpenAI) | $0.20 | $1.20 | $0.02 |
| DeepSeek V4 Flash, off peak | $0.22 | $0.66 | $0.007 |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 | not listed |
| Mistral Large 3 | $0.50 | $1.50 | about 10% of input |
| DeepSeek V4 Pro, off peak | $0.66 | $1.98 | $0.022 |
| Gemini 3.7 Flash | $0.75 | $3.75 | $0.075 |
| Claude Haiku 4.5 | $1.00 | $5.00 | $0.10 |
| GLM-5.3 (Z.ai) | $1.40 | $4.40 | $0.26 |
| Claude Sonnet 5 | $2.00 | $10.00 | $0.20 |
| Grok 4.6, under 200k context | $2.00 | $6.00 | $0.50 |
| gpt-5.6-terra (OpenAI) | $2.00 | $12.00 | $0.20 |
| gpt-5.6-sol (OpenAI) | $4.00 | $20.00 | $0.40 |
| Claude Opus 5 | $5.00 | $25.00 | $0.50 |
| Claude Fable 5 | $10.00 | $50.00 | $1.00 |
| gpt-5.5-pro (OpenAI) | $30.00 | $180.00 | not listed |
Read that table by direction rather than by row. Output is where the money goes on chat products, because an answer or a summary is mostly generated text, so the output column decides the invoice. Input is where the money goes on agents and document work, because those workloads push enormous context in and get short edits back out.
If you want a single number to sort on, blend the 2 price columns in the ratio your own product uses. A support product that sends 3,000 tokens and receives 700 sits at 81% input and 19% output, so its blended rate is 0.81 times the input price plus 0.19 times the output price. That puts Claude Sonnet 5 at $3.52 per million tokens and GLM 5.3 Flash at $0.108 per million, which are the rates behind the job table further down this page. An agent with heavy context and short edits leans harder toward input, a writing tool leans the other way, and that is exactly why a single ranking never fits every workload.
The cheap end of the table isn't made of toys any more. Z.ai lists GLM 4.7 Flash and GLM 4.5 Flash at no charge across every category on its pricing page, Google runs a free tier on the Gemini API with limited model access, and DeepSeek's flash line sits under a quarter of a dollar per million input tokens at its off peak rate. If you want the background on why so many of these weights can be downloaded at all, we wrote it up in open weight AI models and what they cost.
One row carries a story worth knowing. Anthropic launched Claude Sonnet 5 at $2 and $10 as introductory pricing through 31 August 2026, with a rise to $3 and $15 scheduled for the day after. Its pricing documentation now states that the rise will not happen and the introductory rate is the standard rate, which we verified on 28 August 2026, 3 days before the old deadline.
What does a support chatbot cost per 10,000 conversations?
10,000 support conversations at 3,000 input tokens and 700 output tokens each cost $4.00 on GLM 5.3 Flash and $325.00 on Claude Opus 5, using the list prices above and no caching. That is the same job with the same token counts, and an 81 times spread between the cheapest line and the most expensive one.

| Model | 10,000 conversations | Input cost | Output cost |
|---|---|---|---|
| GLM 5.3 Flash | $4.00 | $2.25 | $1.75 |
| Mistral Small 4 | $8.70 | $4.50 | $4.20 |
| DeepSeek V4 Flash, off peak | $11.22 | $6.60 | $4.62 |
| GPT 5.6 Luna | $14.40 | $6.00 | $8.40 |
| Gemini 3.5 Flash Lite | $26.50 | $9.00 | $17.50 |
| Gemini 3.7 Flash | $48.75 | $22.50 | $26.25 |
| Claude Haiku 4.5 | $65.00 | $30.00 | $35.00 |
| Grok 4.6 | $102.00 | $60.00 | $42.00 |
| Claude Sonnet 5 | $130.00 | $60.00 | $70.00 |
| Claude Opus 5 | $325.00 | $150.00 | $175.00 |
Anthropic runs a similar sum on its own pricing page and puts 10,000 support tickets at about $37.00 on Claude Haiku 4.5, using an average of 3,700 tokens per conversation. Our split is more output heavy than theirs, which is why the same model lands at $65.00 here. Both numbers are worth having, because the shape of your traffic moves the answer further than the vendor you pick.
Caching moves the ranking again, and it moves it a long way. If 2,000 of those 3,000 input tokens are a system prompt that never changes, and you cache it, the Claude Sonnet 5 line falls from $130.00 to roughly $94.00 before cache writes are counted. The same trick on GLM 5.3 Flash saves a few cents, because there was very little there to save in the first place.
The number that should worry you is retries. A model that needs a second attempt on 1 conversation in 5 costs 20% more than the table says, and a model that escalates to a human being costs whatever a human being costs. That is why the cheapest row is rarely the row a support team ships, and why the honest measure is cost per resolved conversation rather than cost per million tokens.
Which LLM API is cheapest for a coding agent?
A coding agent that reads 2,000,000 input tokens in a day, with 80% of them served from cache, and writes 200,000 output tokens, costs $0.70 on DeepSeek V4 Pro at its off peak rate and $7.80 on Claude Opus 5. Claude Sonnet 5 lands at $3.12 on the identical workload.

| Model | Agent day | Fresh input | Cache reads | Output |
|---|---|---|---|---|
| DeepSeek V4 Pro, off peak | $0.70 | $0.26 | $0.04 | $0.40 |
| Gemini 3.7 Flash | $1.17 | $0.30 | $0.12 | $0.75 |
| GLM 5.3 | $1.86 | $0.56 | $0.42 | $0.88 |
| Grok 4.6, under 200k context | $2.80 | $0.80 | $0.80 | $1.20 |
| Claude Sonnet 5 | $3.12 | $0.80 | $0.32 | $2.00 |
| GPT 5.6 Terra | $3.52 | $0.80 | $0.32 | $2.40 |
| GPT 5.6 Sol | $6.24 | $1.60 | $0.64 | $4.00 |
| Claude Opus 5 | $7.80 | $2.00 | $0.80 | $5.00 |
Those figures leave cache writes out, so treat every row as a floor rather than a quote. On the Claude API a 5 minute cache write costs 1.25 times the base input rate, and an agent that rebuilds its cache on every turn pays that surcharge again and again. Vendors that publish a cache read price without a matching write price look cheaper on paper than they bill in practice, so read the small print before you set a budget.
Context length is the clause that bites hardest on this job. xAI's model documentation prices Grok 4.6 at $2 input and $6 output below 200,000 tokens, then $4 and $12 at or above that threshold, so the same agent doubles its rate the moment a long file lands in context. Anthropic goes the other way and prices the full 1,000,000 token window at standard rates on Claude 4.6 and later, which means a 900,000 token request costs the same per token as a 9,000 token one.
None of this settles which agent to run, only what running one costs. We put the 2 most common ones through the same 5 checks in Claude Code vs Codex, and if the invoice still looks wrong at the end of the month, the honest alternative is to stop paying per token and run a local model for coding on hardware you already own.
Why does the same text cost more tokens on some models?
A pair of models can list the same price per million tokens and still charge differently for the same document, because each one cuts that document into a different number of tokens. Anthropic's pricing page says Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text, and it adds that the exact increase depends on the content and the shape of the workload.

Apply that to the support job above. Claude Sonnet 5 costs $130.00 on 37,000,000 tokens, but if the same text yields around 30% more tokens on the newer tokenizer, the bill for that text is closer to $169.00, which pushes it past Grok 4.6 at $102.00. The price per token never changed, the token count did, and Claude Haiku 4.5 is not in that group, so its $65.00 line doesn't move at all.
This is why a price table is a starting point rather than an answer. The unit being sold isn't a character, a request or a page, it is a token, and every vendor is free to define that unit however it likes. Nobody publishes a conversion table between tokenizers, so the only measurement you can trust is your own text run through each vendor's counter.
There is a practical move here that costs nothing at all. Take 20 real documents or 20 real conversations out of your product, run them through each API's token counting endpoint, and compare the counts before you compare the prices. A vendor that is 10% cheaper per token and 30% heavier per document is more expensive, and you will only ever see that on your own text.
Which discounts and clauses change the bill after you sign up?
Batch processing takes exactly 50% off input and output at OpenAI and Anthropic, and the same 50% on Google's Gemini Flash models, while a cache hit on the Claude API costs 10% of the base input price. The clauses that move in the other direction are a context threshold that doubles Grok 4.6 above 200,000 tokens, and an expiry date sitting on Gemini 3.7 Flash pricing.

A bulk extraction run of 20,000,000 input tokens and 2,000,000 output tokens costs $30.00 on Claude Haiku 4.5 at list price and $15.00 through the Batch API, for work that returns within a window instead of instantly. Google applies the same 50% to batch calls on its Gemini Flash models, and OpenAI's pricing page states a flat 50% batch discount across its models. If the job can wait a few hours, half the invoice is the easiest saving on this page.
DeepSeek prices by the clock, which almost nobody accounts for. Its pricing page lists peak hours as 01:00 to 04:00 and 06:00 to 10:00 UTC from Monday to Friday, with every other hour off peak at half the peak rate, so DeepSeek V4 Flash input runs $0.44 per million during peak and $0.22 outside it. A nightly job scheduled in the wrong window pays double for nothing.
Google's cheapest flagship line has a date attached to it. The Gemini API pricing page lists Gemini 3.7 Flash at $0.75 input and $3.75 output through 31 December 2026, then $1.50 and $7.50 starting 1 January 2027. The support job that costs $48.75 on that model today costs $97.50 on new year's day, which is the sort of clause that belongs in a budget rather than in a footnote.
There are 2 smaller multipliers worth knowing before they surprise you. Anthropic charges 1.1 times standard pricing when you pin inference to the United States with the inference geo parameter on Claude 4.6 and later, and its Fast mode research preview prices Claude Opus 5 at $10 input and $50 output instead of $5 and $25. Both stack on top of everything else, and the caching multipliers stack on top of them.
Price isn't the only gate on the cheap rows either. Anthropic sorts accounts into Start, Build and Scale usage tiers, each carrying its own rate limits, and says volume discounts beyond those tiers are negotiated case by case rather than published. A rate limit becomes a cost the moment your queue backs up and your product has to fail over to a second vendor mid traffic. The practical question isn't only what a model charges, it is how much of that model you are allowed to buy per minute on your first day.
So which LLM API should you pick in 2026?
For a high volume chatbot where answers are short and traffic is large, GLM 5.3 Flash at $0.075 and $0.25 is the cheapest credible line on this table, with DeepSeek V4 Flash off peak at $11.22 and Mistral Small 4 at $8.70 close behind on the same 10,000 conversations. For a coding agent, Claude Sonnet 5 at $3.12 a day is the balance most teams settle on, while DeepSeek V4 Pro at $0.70 is the answer when the budget decides. For anything that can wait, a batch capable model at 50% off costs less than a cheaper model at list price.
For work where a wrong answer is expensive, the cheap rows stop being cheap very quickly. A model at $0.075 per million that needs 3 attempts costs more than a model at $2.00 per million that lands the first time, and it costs your users their patience on top of that. Work out what a wrong answer costs you before you go looking at the price per million.
The 4 clauses are the reason to redo this exercise every quarter rather than every year. One vendor's tokenizer changed the count on the same text by roughly 30%, a context threshold doubles one rate, a clock halves another, and a published price expires on 31 December 2026. None of those clauses show up in the headline number on a pricing page, and all of them show up on the invoice.
The method matters more than this table, which will be out of date within a month. Take your own traffic, count your own tokens on each vendor's counter, apply only the discounts you can genuinely use, and read the price per million last rather than first. Running that on your own traffic takes an afternoon, and unlike this table it survives the next price change.
Questions people ask
What is the cheapest LLM API in 2026?
GLM 5.3 Flash on Z.ai carries the lowest output price among the paid models compared here, at $0.075 per million input tokens and $0.25 per million output tokens as listed on 28 August 2026. OpenAI's older gpt-5-nano is cheaper on input at $0.05 per million, with output at $0.40. On 10,000 conversations of 3,000 input and 700 output tokens each, GLM 5.3 Flash costs $4.00 against $4.30 for gpt-5-nano, so the output price decides it.
What should an LLM API pricing comparison include beyond the price per million tokens?
It should include cached input prices, batch discounts and every clause that changes the rate after you sign up. The 4 that matter most in 2026 are the tokenizer that decides your token count, a context threshold that doubles the Grok 4.6 rate above 200,000 tokens, DeepSeek's peak and off peak clock, and the expiry date on Gemini 3.7 Flash pricing.
How do I estimate my LLM API bill before I build anything?
Take 20 real documents or conversations out of your product, run them through each vendor's token counting endpoint, then multiply the counts by the published input and output prices. Apply only the discounts you can genuinely use, batch pricing when the work can wait and caching when your prompt repeats. The result is a number you can defend, which a price table on its own never gives you.
Why do 2 models with the same price cost different amounts?
They count tokens differently, so the same document becomes a different number of billable units. Anthropic's pricing page says Claude 4.7 and later models use a newer tokenizer that produces approximately 30% more tokens for the same text than its earlier models. Rival vendors at $2 per million input can therefore bill differently for one identical document, and only your own text shows you which is cheaper.
Is the batch discount worth using in an LLM API pricing comparison?
Yes, whenever the work can wait a few hours. OpenAI and Anthropic take 50% off both input and output for batch requests, and Google does the same on its Gemini Flash models, so a bulk extraction of 20,000,000 input and 2,000,000 output tokens falls from $30.00 to $15.00 on Claude Haiku 4.5. The trade is latency, since batch results arrive within a window rather than immediately.
Are the free LLM APIs good enough for production?
They can be for work where a wrong answer is cheap. Z.ai lists GLM 4.7 Flash and GLM 4.5 Flash at no charge across every category, and Google runs a free tier on the Gemini API with limited model access. The constraints are rate limits and support rather than raw quality, so a free line is fine for a side project and risky under a product deadline.
