StackProofStackProof

Pricing

LLM API pricing compared: cost per 1M tokens and per task

Hosted LLMs ranked by input/output token price - plus what a realistic 3-call agent task (1.5k in / 0.5k out) actually costs on each.

Published LLM pricing looks simple: a dollar figure per million input tokens, another per million output tokens. That simplicity hides the two facts that actually decide your bill. The first is that the spread between models is enormous, far larger than the quality gap between them. Across the ten models in our open dataset, input prices run from $0.06 to $5.00 per million tokens, an 83x spread, and output prices run from $0.18 to $30.00, a 167x spread.

The second fact is that output tokens are priced higher than input tokens on every single model we track, usually by a wide margin. That asymmetry is why the per-token headline number is close to useless on its own, and why two teams paying the same list price can see bills that differ by an order of magnitude.

This guide works through what a realistic task actually costs on each model, using one fixed task profile so the comparison is honest, and shows which parts of the bill are worth attacking.

Sticker prices per million tokens hide what you'll actually pay, because real tasks mix input and output and often make several calls. Below, every model in our dataset is ranked by the cost of one realistic agent task (3 calls, 1,500 input + 500 output tokens each):

Model$/1M in$/1M out$/task
Mistral Small$0.15$0.6$0.0016
DeepSeek-V4-Flash$0.44$1.32$0.0040
Gemini 2.5 Flash$0.3$2.5$0.0051
Grok 4.3$1.25$2.5$0.0094
GPT-5.4 mini$0.75$4.5$0.0101
Claude Haiku 4.5$1$5$0.0120
Claude Sonnet 5$2$10$0.0240
Gemini 3.1 Pro$2$12$0.0270
Claude Opus 4.8$5$25$0.0600
GPT-5.5$5$30$0.0675

The spread is about 43x from cheapest to frontier for the same task shape. Because output tokens are priced highest, the fastest lever is usually a tighter max_tokens and less verbose prompting - not switching providers. Plug your own token profile into the $/task calculator to see your real numbers and the self-hosting break-even.

Why cost per million tokens is the wrong unit

Nobody ships a million tokens. You ship tasks: a support reply, a code review, a document summary. A task usually involves several model calls, each with its own prompt and completion. The only unit that lets you forecast a bill or compare two models fairly is cost per task.

For every figure in this guide we use one fixed profile: 1,500 input tokens and 500 output tokens per call, three calls per task. That is a small agent loop, roughly a plan step, a tool-use step and a final answer. It totals 4,500 input and 1,500 output tokens per task. Nothing about that profile is special, but holding it constant is what makes the comparison meaningful.

On that profile the ten models range from $0.00054 to $0.06750 per task. Run a million tasks a month and that is the difference between $540 and $67,500. Same task, same token counts, a 125x difference in the invoice.

Output tokens are where the money goes

Every model in the dataset charges more for output than input. The multiple ranges from 2x on Grok 4.3 and DeepSeek-V4-Flash to 8.33x on Gemini 2.5 Flash. Most of the frontier models sit at 5x or 6x.

Because our task profile sends three times as many input tokens as it receives output tokens, you might expect input to dominate. It does not. On Gemini 2.5 Flash, output is 74% of the task cost despite being a quarter of the tokens. On GPT-5.5 and GPT-5.4 mini it is 67%. On the Claude models it is 62%. Only on the two cheapest models, where the output multiple is lowest, does input carry a comparable share.

The practical consequence is that a token you do not generate is worth several tokens you do not send. Trimming a verbose system prompt feels productive, but capping how much the model writes back moves the bill more, on nine of the ten models we track.

The tiers are not what the labels suggest

Providers group models into loose tiers, and the dataset carries those labels: value, fast, mid, frontier. The labels are a rough guide to capability, but they are a poor guide to cost, because the tiers overlap heavily in price.

Claude Haiku 4.5 is labelled fast and costs $0.01200 per task. Grok 4.3 is labelled mid and costs less, at $0.00937. Gemini 2.5 Flash, also fast, costs $0.00510, which undercuts every mid-tier model in the set. Meanwhile the frontier tier itself splits: Gemini 3.1 Pro runs $0.02700 per task while GPT-5.5 runs $0.06750, two and a half times more for the same nominal tier.

Read the price, not the label. Within a provider the tiers are consistent, but across providers a fast model from one vendor can cost more than a mid model from another.

What the spread means for model choice

A 125x cost range across a single task profile means model selection dominates every other cost decision you can make. No amount of prompt tuning recovers the difference between $540 and $67,500 per million tasks.

That does not mean the cheapest model wins. It means the burden of proof sits with the expensive one: if you are paying 125x, you should be able to point at the specific failures a cheaper model produces on your workload. In practice most teams have never run that test, and the frontier model was chosen during a prototype and never revisited.

The useful exercise is to price your actual task profile across the set, then measure quality on your own evaluation cases, in that order. Cost is knowable in advance and precisely. Quality is not, so spend your measurement effort there.

What these prices leave out

These are published list rates. Real invoices diverge for several reasons, and it is worth knowing which way each one pushes.

Cached input is billed at a steep discount by most providers, which matters enormously when a long system prompt repeats on every call. Batch or asynchronous tiers typically cut rates substantially in exchange for latency. Committed-use and enterprise agreements move rates further. All three push the real bill below list.

Pushing the other way: retries after a failure or a refusal are billed, and so are the tokens in a response you discard. Reasoning models can emit a large volume of internal tokens that are billed as output but never shown to the user, which can make a nominally cheap model surprisingly expensive on hard prompts. None of that appears on a pricing page.

Treat the ranking here as durable and the absolute figures as a dated snapshot. Provider pricing changes without notice, and our dataset carries the date it was generated.

FAQ

Why compare cost per task instead of cost per million tokens?
Because you ship tasks, not tokens. A task bundles several calls with different input and output sizes, and since output is priced 2x to 8.33x higher than input on every model tracked, two models with similar headline rates can differ sharply once you account for the actual mix. Holding one task profile constant across models is the only way to compare them honestly.
Are output tokens really more expensive than input tokens?
Yes, on all ten models in our dataset. The multiple ranges from 2x (Grok 4.3, DeepSeek-V4-Flash) to 8.33x (Gemini 2.5 Flash), with most frontier models at 5x or 6x. On our task profile output accounts for 40% to 74% of the total cost even though it is only a quarter of the tokens.
Is the most expensive model always the best?
No, and the price gap is far larger than any quality gap. On our profile the range is 125x for identical work. The right test is to price your real task profile across the set first, since cost is knowable precisely in advance, then measure quality on your own evaluation cases, which is the part that actually requires experimentation.
Do these prices include discounts?
No. They are published list rates and exclude cached-input pricing, batch tiers, committed-use agreements and enterprise terms, all of which push a real bill lower. They also exclude retries and the internal reasoning tokens some models bill as output without showing you, which push it higher.