LLM API Pricing Comparison 2026: 5 Providers, Real Costs
As of October 2026, the cheapest major models are GPT-6 Luna and Claude Haiku 5.5. Both list at $0.10 per million input tokens and $0.50 per million output. The mid-tier models (GPT-6.1 Sol, Claude Sonnet 5.5 and Gemini 4 Argon's promo rate) sit at $2 in / $10 out. The top tier (GPT-6 Astra, Claude Fable 5.1) costs $10 in / $50 out. Before you compare any of these, know that Gemini's current rates are promotional and double on and . Caching and batch discounts also move a real bill far more than the list price does. The tables and formulas below turn these rates into a monthly number for chat, coding and long-document work.
Which option is right for you?
Start with the cheapest model that passes your own quality bar, then add caching. Each situation below maps to one first pick.
| Your situation | What to pick first | First page to open | Why (one line) |
|---|---|---|---|
| Beginner, prototyping with $0 budget | Gemini 3.8 Flash (free tier) | Gemini API pricing | Its free tier covers input and output tokens, so you can build before you pay. |
| Daily work: production chat, support bots, internal tools | Claude Sonnet 5.5 or GPT-6.1 Sol | Claude pricing / OpenAI pricing | Both list $2 / $10, and both bill cache reads at $0.10. |
| Tight budget, high volume (classification, routing, extraction) | GPT-6 Luna or Claude Haiku 5.5 | OpenAI models | $0.10 / $0.50 is the lowest list price among the five providers' current lineups. |
| Coding agents, long multi-step tasks | Claude Opus 5.5 | Claude models overview | Anthropic recommends it for most workloads, at $4 / $20. |
| Long documents (200K+ tokens) | Claude Haiku 5.5 with caching, or Gemini 3.8 Flash | Prompt caching docs | Cached reads cost a fraction of base input, and long-context cost is mostly input. |
| Lowest output price at mid-tier quality | Grok 4.7 | xAI models | $6 per million output tokens, compared with $10 at OpenAI and Anthropic's mid tier. |
| EU vendor or open-weight preference | Mistral Medium 3.5 / Large 4 | Mistral pricing | Some of its models are open-weight, but per-model API prices are harder to find. |
If you mostly use Claude interactively for coding rather than through your own app, the comparison changes. Compare the API with a flat plan first: Claude API Pricing vs Max Plan: Break-Even Table for 2026.
LLM API Pricing Comparison 2026: Live Rates for OpenAI, Claude, Gemini, Mistral and xAI
The current per-million-token rates, taken from each vendor's own pricing page as of October 2026, are below. Check each official page before you commit, because three of these providers changed prices in 2026.
Flagship, mid and budget tiers side by side
| Provider | Model (API ID) | Input $/M | Cached input $/M | Output $/M | Context | Source |
|---|---|---|---|---|---|---|
| OpenAI | gpt-6-astra | 10.00 | 1.00 | 50.00 | 1.05M | OpenAI pricing |
| OpenAI | gpt-6.1-sol | 2.00 | 0.10 | 10.00 | 1.05M | OpenAI models |
| OpenAI | gpt-6-luna | 0.10 | 0.01 | 0.50 | 1.05M | OpenAI pricing |
| Anthropic | claude-fable-5-1 | 10.00 | 0.25 | 50.00 | 1M | Claude pricing |
| Anthropic | claude-opus-5-5 | 4.00 | 0.20 | 20.00 | 1M | Claude models |
| Anthropic | claude-sonnet-5-5 | 2.00 | 0.10 | 10.00 | 1M | claude.com/pricing |
| Anthropic | claude-haiku-5-5 (≤100K prompt) | 0.10 | 0.01 | 0.50 | 1M | claude.com/pricing |
| Anthropic | claude-haiku-5-5 (>100K prompt) | 0.50 | 0.05 | 2.50 | 1M | claude.com/pricing |
| Gemini 4 Argon (promo to Nov 30) | 2.00 → 4.00 | 0.10 → 0.20 | 10.00 → 20.00 | — | Gemini pricing | |
| Gemini 3.8 Flash (promo to Dec 31) | 0.75 → 1.50 | 0.075 → 0.15 | 3.75 → 7.50 | — | Gemini pricing | |
| Gemini 3.5 Flash-Lite | 0.30 | — | 2.50 | — | Gemini pricing | |
| Gemini 2.5 Flash-Lite | 0.10 | — | 0.40 | — | Gemini pricing | |
| xAI | grok-4.7 (<200K) | 2.00 | 0.50 | 6.00 | 500K | xAI models |
| xAI | grok-4.3 (<200K) | 1.25 | 0.20 | 2.50 | 1M | xAI models |
| Mistral | Mistral Large (Mistral's own pricing example) | 0.50 | — | 1.50 | — | Mistral pricing |
All prices are in USD (as of October 2026; check the official page).
What the table doesn't tell you
- Gemini prices are temporary. Google's page lists Gemini 4 Argon input at "$2.00 through . $4.00 starting ". Gemini 3.8 Flash doubles on (Gemini pricing). If you budget at today's rate, your December or January bill will be wrong.
- Mistral publishes few per-model API prices on its main pricing page. It gives one example ("Mistral Large costs $0.5 /M tokens in and $1.5 /M tokens out") and sends you to the docs and Mistral Studio for the rest (Mistral pricing). Resellers list different numbers. OpenRouter, for example, shows Mistral Medium 3.5 at $1.65 in / $8.25 out (OpenRouter). Confirm the price in your own Mistral console before you budget.
- Price can depend on prompt length. Claude Haiku 5.5 costs five times more per token once a prompt goes over 100K tokens (claude.com/pricing). Every Grok model doubles its rates at 200K tokens and above (xAI models). OpenAI defines long context as more than 272K input tokens, and rates there "typically double" where a long-context variant exists (OpenAI pricing).
How Has LLM API Pricing Changed from 2025 to 2026
Prices for comparable tiers fell by roughly 20–50% between late 2025 and October 2026. At the same time, a new, more expensive top tier appeared above the old flagships. That means comparing a "flagship" price from 2025 with one from 2026 often compares two different products.
Same-family price drops you can verify on official pages
Both vendors keep legacy models and their prices on their docs, so you can check these drops directly:
| Family | Older model (release) | Price in / out | Current model | Price in / out | Change |
|---|---|---|---|---|---|
| Claude Opus | Opus 4.5 () | $5 / $25 | Opus 5.5 | $4 / $20 | −20% |
| Claude Sonnet | Sonnet 4.6 () | $3 / $15 | Sonnet 5.5 | $2 / $10 | −33% |
| OpenAI "Sol" | gpt-5.6-sol | $4 / $20 | gpt-6-sol / gpt-6.1-sol | $2 / $10 | −50% |
Sources: Claude Opus 4.5 page, Claude Sonnet 4.6 page and OpenAI pricing (as of October 2026).
Cached input got much cheaper
The bigger 2026 change was in cache pricing. Anthropic's standard cache read is 10% of base input. On Opus 5.5 and Sonnet 5.5 it is 5%, and on Fable 5.1 it is 2.5% (Claude models overview). Fable 5.1's cache hits cost $0.25/M, compared with $1/M on Fable 5, at the same base price (Claude pricing). At OpenAI, gpt-6.1-sol's cached input is $0.10, half of gpt-6-sol's $0.20 (OpenAI pricing). For agent workloads that resend the same context on every turn, this matters more than the headline price.
Context windows grew
Claude Opus 4.5 had a 200K context window and 64K max output. Every current Claude model has 1M context and 128K max output (Opus 4.5 page). OpenAI's three recommended GPT-6 models each have a 1.05M window (OpenAI models).
Common mistake: comparing tokens across generations as if they were the same unit. Anthropic says 1M tokens is about 555k words on the tokenizer introduced with Claude Opus 4.7, while earlier models fit about 750k words into 1M tokens (Claude models overview). The same text can produce more tokens on a newer model. Fix: re-count tokens on a sample of your real prompts after any model upgrade, instead of reusing old token counts.
How to Calculate Your Actual LLM API Cost (Not Just List Price)
Your monthly cost is your request volume multiplied by the per-request cost. Per-request cost is uncached input, cached input and output tokens, each multiplied by its own per-million rate.
The formula
cost_per_request = (uncached_input × input_rate
+ cached_input × cache_read_rate
+ cache_write_tokens × cache_write_rate
+ output_tokens × output_rate) / 1,000,000
monthly_cost = cost_per_request × requests_per_month
batch_cost = monthly_cost × 0.5 (if the job can wait for Batch)
Steps to build your own calculator in a spreadsheet
- Measure real token counts. Log 50–100 production-like requests and record the usage fields the API returns. On Claude, total input is
cache_read_input_tokens + cache_creation_input_tokens + input_tokens. Theinput_tokensfield alone only counts tokens after the last cache breakpoint (Claude rate limits). - Create one row per model with columns for input rate, cache read rate, cache write rate and output rate, copied from the table above.
- Add columns for average uncached input, cached input and output per request, then apply the formula.
- Multiply by monthly requests. Add a second "after promo" column for Gemini rows, using the December 2026 and January 2027 prices.
- Add a 0.5 multiplier for any traffic you can move to Batch. OpenAI, Anthropic and Google all list a 50% batch discount (OpenAI Batch, Claude models, Gemini pricing).
Worked example: a support chatbot
This is an illustration, not a measurement. Say each request has 3,000 input tokens and 400 output tokens, and you send 100,000 requests a month. That's 300M input tokens and 40M output tokens. Without caching:
| Model | Monthly cost |
|---|---|
| Gemini 2.5 Flash-Lite | $46 |
| gpt-6-luna / Claude Haiku 5.5 | $50 |
| Gemini 3.5 Flash-Lite | $190 |
| Gemini 3.8 Flash | $375 now → $750 from Jan 2027 |
| grok-4.3 | $475 |
| grok-4.7 | $840 |
| Claude Sonnet 5.5 / gpt-6.1-sol | $1,000 |
| Gemini 4 Argon | $1,000 now → $2,000 from Dec 2026 |
| Claude Opus 5.5 | $2,000 |
| Claude Fable 5.1 / gpt-6-astra | $5,000 |
Now suppose 2,000 of those 3,000 input tokens are a fixed system prompt that gets cached. On Sonnet 5.5, that gives 100M uncached tokens × $2 = $200, plus 200M cached × $0.10 = $20, plus output $400. The total is about $620 instead of $1,000, before cache-write charges.
LLM API Cost Comparison by Task Type: Chat vs Code vs Long-Context
The cheapest model changes with the task. Short chat is mostly output, coding agents resend the same context over and over, and long-document work is mostly input. Use the example shapes below, then replace them with your own token counts.
Chat (short prompts, short answers)
The $0.10 / $0.50 models win at volume, as the chatbot table above shows. Their limitation is quality on harder questions. Anthropic describes Haiku 5.5 as built "for high-volume, latency-sensitive tasks such as classification, extraction, and routing" (Claude models overview). A common setup is to send most traffic to Haiku or Luna and pass only difficult questions to a mid-tier model.
Coding agents (many turns, heavily cached context)
Example shape (an illustration): one session has 40 turns, and each turn sends 60K input tokens and returns 2K output tokens. That's 2.4M input and 80K output per session. Assume 90% of the input is cached reads, and ignore cache writes:
| Model | Uncached input | Cached reads | Output | Per session |
|---|---|---|---|---|
| Claude Sonnet 5.5 | $0.48 | $0.22 | $0.80 | ~$1.50 |
| gpt-6.1-sol | $0.48 | $0.22 | $0.80 | ~$1.50 |
| grok-4.7 | $0.48 | $1.08 | $0.48 | ~$2.04 |
| Claude Opus 5.5 | $0.96 | $0.43 | $1.60 | ~$2.99 |
| Claude Fable 5.1 | $2.40 | $0.54 | $4.00 | ~$6.94 |
| gpt-6-astra | $2.40 | $2.16 | $4.00 | ~$8.56 |
Two things stand out. First, Grok 4.7's cheap output is offset by a $0.50 cache-read rate, five times Sonnet 5.5's. Second, the two $10/$50 models cost nearly the same per token, but Fable 5.1's $0.25 cache read makes cached-context sessions cheaper than on Astra. Also check whether your model's reasoning or "thinking" tokens appear in the output count in the usage fields. Default effort differs by model: medium on Opus 5.5 and high on Sonnet 5.5 (Claude models overview). Effort settings can move output volume.
Long-context (one 400K-token document, 20 questions)
Example: the document is cached once, then 20 questions are asked about it, with 500 output tokens per answer.
- Claude Haiku 5.5 (>100K tier): cache write 400K × $0.625 = $0.25, plus 7.6M cached reads × $0.05 = $0.38, plus output $0.03. Total about $0.66.
- Gemini 3.8 Flash (promo, implicit caching): first pass 400K × $0.75 = $0.30, plus 7.6M × $0.075 = $0.57, plus output $0.04. Total about $0.91, but only if the implicit cache actually hits (Gemini caching).
- Claude Sonnet 5.5: write $1.00, reads $0.76, output $0.10. Total about $1.86. Without caching, the same job costs about $16.
- grok-4.3 (≥200K rates): $1.00, plus 7.6M × $0.40, plus output. Total about $4.09 (xAI models).
Pitfall: Gemini's implicit caching is automatic, but a hit isn't guaranteed. Google advises putting large repeated content early in the prompt and sending similar requests close together (Gemini caching).
LLM API Key Price Comparison: Free Tiers, Credits and Minimum Spend
Getting an API key is free or nearly free with every provider. What limits you is the tier system, which caps monthly spend and throughput until you have paid enough or been a customer long enough.
| Provider | Free entry | How tiers advance | Monthly spend caps |
|---|---|---|---|
| OpenAI | Free tier in allowed regions ($100/month limit) | Build at $5 of credit purchases, Launch at $100, Grow at $500 | $500 / $5,000 / $200,000 |
| Anthropic | New orgs may start in an "Evaluation" tier with lower limits | Automatic, based on usage history and account standing | Start $500, Build $1,000, Scale $200,000; Custom has no cap |
| Google Gemini | Free tier (active project or free trial) | Tier 1: link billing. Tier 2: $100 spent + 3 days. Tier 3: $1,000 spent + 30 days | $250 / $2,000 / $20,000–$100,000+ |
| Mistral | Free Le Chat plan; API terms are in the console | Not published on the pricing page | Not published on the pricing page |
| xAI | Not stated in the model docs | Not stated in the model docs | Not stated in the model docs |
Sources: OpenAI rate limits, Claude rate limits, Gemini rate limits, Mistral pricing (as of October 2026; check the official page).
Set a spend limit on Claude (exact steps)
- In the Claude Console, open Billing (
platform.claude.com/settings/billing). - In the Spend limits section, click Adjust limit (or Set limit if none exists).
- Enter a value below your tier's cap and save (Claude rate limits).
To raise the cap itself, open the Rate limits page (platform.claude.com/usage/limits) and use Request tier increase.
Common mistake: treating a spend-cap error like a rate-limit error. When an Anthropic organization reaches its tier cap, requests return HTTP 429 with no retry-after header until 00:00 UTC on the first of the next month, so retries, including the SDK's automatic ones, keep failing (Claude rate limits). Fix: check error.details.error_code for enforced_spend_limit_reached and alert a human instead of retrying.
OpenAI vs Claude vs Gemini: Which Has the Best Price-to-Performance Ratio
There is no single winner. At equal list prices, the best value is whichever model passes your own eval set at the lowest cost per successful task. The vendors' prices line up closely enough that quality and caching decide the outcome.
Matched price points
| Price point (in / out) | OpenAI | Anthropic | |
|---|---|---|---|
| $10 / $50 | gpt-6-astra ("most capable model for the most demanding work") | Claude Fable 5.1 ("demanding reasoning and long-horizon agentic work") | — |
| $4 / $20 | — | Claude Opus 5.5 | Gemini 4 Argon from |
| $2 / $10 | gpt-6.1-sol ("near-Astra performance… at a lower cost") | Claude Sonnet 5.5 | Gemini 4 Argon until |
| $0.10 / $0.50 | gpt-6-luna | Claude Haiku 5.5 (≤100K) | Gemini 2.5 Flash-Lite ($0.10 / $0.40) |
Sources: OpenAI models, Claude models overview, Gemini pricing (as of October 2026).
How to judge value
- Build 50–200 test cases from real traffic, each with a pass/fail check.
- Run each candidate model and record its pass rate and actual token usage.
- Compute cost per passed task = total cost ÷ number of passes. If a model is cheaper per token but fails more often and needs retries, it can cost more per passed task.
- Re-run the eval when a promo ends or a new model ships.
Example (an illustration): if gpt-6.1-sol and Sonnet 5.5 both pass 92% of your tests, the tie is decided by cached-input share and output length, because their list prices are the same. Independent leaderboards such as Artificial Analysis are useful for building a shortlist. Their limitation is that they can't tell you how a model handles your specific prompts.
Who this approach is NOT for: if you spend under about $50 a month, a full eval is overkill. Pick a model from the first table, set a spend limit, and move on.
What Developers on Reddit Say About LLM API Pricing (and What's Outdated)
Reddit threads such as those on r/LocalLLaMA and r/OpenAI are useful for spotting cost traps you hadn't thought of. Treat any price quoted there as a lead to check, because model names and rates change several times a year.
How stale can a thread be? Claude Opus 4.5 was released on , at $5 / $25, and less than a year later it is a legacy model, with Opus 5.5 at $4 / $20 (Opus 4.5 page). A thread from early 2026 recommending Sonnet 4.6 at $3 / $15 is now out of date on price.
When reading a thread:
- Check the post date against the model's release date on the vendor's model page.
- Look for the model ID. "Claude Sonnet" with no version number tells you nothing about price.
- Re-check any cost complaint against the current caching rules. Many complaints about a surprise bill come down to cache misses or long-context surcharges. Both are covered in the next section, and both are documented by the vendors.
- Ignore anecdotes that don't include token counts. "My bill was $400" means nothing without the volume behind it.
Third-party comparison sites have the same problem. Several pages appear in search results under this query (CloudZero, BenchLM). Use them to discover models, then confirm every number on the official page.
Hidden Costs in LLM API Pricing: Caching, Batch, and Rate-Limit Overages
The headline price leaves out cache-write charges, cache storage fees, speed-tier premiums, tool fees and long-context surcharges. Any one of these can outweigh a $1 difference in list price.
Caching costs to write, and sometimes to store
- Anthropic: cache writes cost 1.25× base input for the default 5-minute TTL, or 2× for a 1-hour TTL (
"ttl": "1h"incache_control). Prompts below the model's minimum length can't be cached at all: 512 tokens on current 5.x models, and up to 4,096 tokens on Haiku 4.5 and Opus 4.5/4.6 (Claude prompt caching). - Google: Gemini 3.8 Flash charges cache storage of $0.50 per million tokens per hour until , then $1.00 (Gemini pricing). Explicit caching "is not supported… for Gemini 4 Argon and onward", and implicit caching needs at least 4,096 tokens on Argon and 3.8 Flash (Gemini caching).
- Mistral: cached input tokens "reduce input cost by up to 90% for repeated prompts" (Mistral pricing).
Steps to check that caching works on Claude: mark the stable part of the prompt (system prompt, tool definitions, documents) with cache_control. Then confirm that cache_read_input_tokens is greater than zero on the second request. You can also watch the cache rate on the Usage page's Rate Limit – Input Tokens chart (Claude rate limits). On most Claude models, cached reads also don't count toward your input-tokens-per-minute (ITPM) rate limit, so caching raises your effective throughput as well.
Common mistake: putting a timestamp or user ID at the top of the prompt. That changes the prefix on every request, so the cache never hits. Fix: put the content that changes after everything that stays the same.
Batch: half price, slower results
OpenAI's Batch API gives a 50% discount, returns results within 24 hours, accepts up to 50,000 requests per batch (200 MB file), and doesn't count against standard rate limits (OpenAI Batch). Anthropic and Google also take 50% off batch requests. Limitation: batch doesn't work for anything a user is waiting on.
Speed tiers and tool fees
- OpenAI's Fast tier doubles the price: gpt-6-astra costs $20 / $100 there. The Flex tier halves it: gpt-6-luna drops to $0.05 / $0.25 (OpenAI pricing).
- OpenAI web search costs $10 per 1,000 calls plus the search-content tokens, billed at the model's rates (OpenAI pricing). An agent that searches on every turn can spend more on search than on tokens.
Spend caps that pause production
Each tier caps monthly spend: $500 on Anthropic's Start tier and $250 on Gemini's Tier 1 (Claude rate limits, Gemini rate limits). If launch traffic pushes you past the cap, the API stops serving requests until the tier is raised. Fix: request the tier increase a week before launch, not on launch day.
Next steps
You can have a realistic monthly estimate today with the three steps below.
Do it yourself today:
- Log 50 real requests and record their input, cached-input and output token counts.
- Put two or three candidate models into the spreadsheet formula above. Add the post-promo Gemini prices if Gemini is on your list.
- Set a spend limit below your tier cap on every provider you use. On Claude, that's Billing → Spend limits → Adjust limit.
If you'd rather not manage API billing yourself: for an individual or a small team using Claude mainly for interactive coding and writing, a flat subscription may be simpler. Claude Pro costs $20/month ($17/month billed annually), and Max starts at $100/month for 5× or 20× Pro's usage (claude.com/pricing; as of October 2026, check the official page). These plans suit people who want a predictable bill and don't need to build an app. They don't fit products that serve your own customers, because subscriptions don't replace API access for your app's traffic. They also have usage limits rather than unlimited use. For a free way to try models, Google's free tier for Gemini 3.8 Flash costs nothing, but you'll need to move to a paid tier for higher limits and for models such as Gemini 4 Argon, which has no free tier (Gemini pricing).
Related guides on this site:
FAQ
What's the best way to compare LLM API pricing?
Compare cost per task, not price per token. Measure the input, cached-input and output tokens of real requests, apply each model's three rates, then multiply by your monthly volume. Use each vendor's official pricing page as the source, because third-party tables often lag behind price changes.
What does an LLM models API pricing comparison look like in October 2026?
Listed prices fall into four clear tiers: $10 / $50 (GPT-6 Astra, Claude Fable 5.1), $4 / $20 (Claude Opus 5.5), $2 / $10 (GPT-6.1 Sol, Claude Sonnet 5.5, Gemini 4 Argon's promo rate) and $0.10 / $0.50 (GPT-6 Luna, Claude Haiku 5.5). xAI's Grok 4.7 is $2 / $6 under 200K tokens. Gemini's current rates double on (Argon) and (3.8 Flash).
Which AI LLM API is cheapest overall?
Among current models from the five providers, Gemini 2.5 Flash-Lite ($0.10 / $0.40) has the lowest list output price. GPT-6 Luna and Claude Haiku 5.5 follow at $0.10 / $0.50. Using OpenAI's Flex tier halves Luna's price to $0.05 / $0.25 if you can accept slower processing. The cheapest model is only a bargain if it passes your quality checks.
Why do output tokens cost more than input tokens?
Every provider here prices output at roughly 3–5× input, for example $2 in and $10 out on Sonnet 5.5 and GPT-6.1 Sol. For chat and coding, that means output length often drives the bill. Limiting max_tokens and asking for concise answers cuts cost directly. For long-document work, input and cache rates matter more.
Sources
- OpenAI API pricing
- OpenAI models
- OpenAI rate limits and usage tiers
- OpenAI Batch API guide
- Anthropic Claude pricing (docs)
- Claude pricing (claude.com)
- Claude models overview
- Claude Opus 4.5 model page
- Claude Sonnet 4.6 model page
- Claude prompt caching
- Claude rate limits
- Gemini API pricing
- Gemini API rate limits
- Gemini context caching
- xAI models and pricing
- Mistral AI pricing
- OpenRouter: Mistral Medium 3.5
- Artificial Analysis
- CloudZero: LLM API pricing comparison
- BenchLM: LLM pricing
Spotted something out of date or wrong? Tell us at shigoto.ai.note@gmail.com. We check every guide against its official sources.