AI API Pricing Comparison (October 2026): Claude, GPT-6, Gemini 4, Grok, DeepSeek, Qwen and Mistral per Million Tokens, the Cheapest AI API, and the Multipliers That Really Set Your Bill

Logeshwaran
—

Here is the AI API pricing comparison for October 22, 2026, in US dollars per million tokens (input / output) at standard rates. The top tier is Claude Fable 5.1 and GPT-6 Astra at $10 / $50, with Claude Opus 5.5 at $4 / $20 just below. The workhorse tier is Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Argon at $2 / $10, with Grok 4.7 at $2 / $6. The budget tier is Claude Haiku 5.5 and GPT-6 Luna at $0.10 / $0.50, and the cheapest of all are Qwen's qwen3.7-flash at $0.03 / $0.13 and DeepSeek's flash model off-peak at $0.15 / $0.60. Look at those numbers again. Anthropic and OpenAI now charge identical prices at all three of their tiers: $10 / $50, $2 / $10 and $0.10 / $0.50. So the price list no longer tells you which one is cheaper. The multipliers do. OpenAI doubles the input price for any request over 272K tokens, while Sonnet 5.5 bills a 900K-token prompt at the same rate as a 9K one. Cache hits cost 2.5 percent of the input price on Fable 5.1 but 10 percent on GPT-6 Astra, so a cached coding agent costs about 27 percent more on Astra. And two dates matter for anyone budgeting now: Gemini 4 Argon's price doubles to $4 / $20 on December 1, 2026, and Gemini 3.8 Flash doubles to $1.50 / $7.50 on January 1, 2027. This page has every current price, the cheapest options, each provider's surcharges and discounts, free tiers, and worked monthly costs for a chatbot, a coding agent and long documents.

Jake wanted a chat assistant on the shop's website, something that could answer "is my phone ready?" and "do you fix cracked backs?" at 11 p.m. Ethan opened a spreadsheet, pasted in the price pages of six providers, and called Jake over twenty minutes later. "Two of these companies charge exactly the same, to the cent, at every level," he said. "Then pick either," Jake said. "That's the trap. The price per token is the same. The bill isn't." Here is the spreadsheet, and the reasons the bills differ.

⚡ Quick Answer

• Top tier: Claude Fable 5.1 and GPT-6 Astra $10 / $50; Claude Opus 5.5 $4 / $20. Table.

• Workhorse: Sonnet 5.5, GPT-6.1 Sol, Gemini 4 Argon $2 / $10; Grok 4.7 and qwen3.8-max $2 / $6. Table.

• Cheapest: qwen3.7-flash $0.03 / $0.13; qwen-flash and GPT-5 nano $0.05 / $0.40; Haiku 5.5 and GPT-6 Luna $0.10 / $0.50. Table.

• Price changes coming: Gemini 4 Argon doubles Dec 1, 2026; Gemini 3.8 Flash doubles Jan 1, 2027. Dates.

• What really sets the bill: long-context surcharges, cache-hit prices, thinking tokens, batch and peak hours. Multipliers.

Monthly cost examples · Free tiers · Cheapest for coding · Price your own workload · FAQ.

New to AI APIs? An AI API lets your own app or script send text to a model such as Claude, GPT or Gemini and get an answer back, paying per token instead of a monthly subscription. A token is a piece of a word, and in English 1 million tokens is roughly 750,000 words. You pay one price for the tokens you send (input, including the system prompt and the whole conversation so far) and a higher price for the tokens the model writes (output, including any hidden reasoning). Chat subscriptions like ChatGPT Plus or Claude Pro are separate products with separate limits. Their prices do not apply to the API, and the API needs its own key and billing (our OpenAI API key guide walks through that part).

🧭 NEW HERE? READ THESE FIRST

New to AI APIs, keys and free tiers? These five pages cover the basics:

💡 Always compare a whole request (input + output + surcharges), never the input price alone. Output usually costs 3 to 8 times more per token.

Top-tier AI API prices (frontier models)

These are the most capable models each provider sells, for hard reasoning, long agent runs and complex code. All prices are per million tokens, at the standard tier, for prompts below any long-context threshold, on October 22, 2026:

Model (provider)InputOutputCache hitNotes
Claude Fable 5.1 (Anthropic)$10.00$50.00$0.251M context at the same price
GPT-6 Astra (OpenAI)$10.00$50.00$1.00Over 272K input: $20 / $75
Claude Opus 5.5 (Anthropic)$4.00$20.00$0.20Fast mode $8 / $40
GPT-5.6 Sol (OpenAI)$4.00$20.00$0.40Promotional price, at least through Nov 21, 2026
Gemini 4 Argon (Google)$2.00$10.00$0.10$4 / $20 from Dec 1, 2026; no free tier
Grok 4.7 (xAI)$2.00$6.00$0.50200K+ prompts: $4 / $12; 500K context
qwen3.8-max (Alibaba Cloud)$2.00$6.0010% of input (explicit cache)Singapore region; thinks by default
Mistral Large 4 (Mistral)$1.36$4.18-List price, as OpenRouter showed it on Oct 22
DeepSeek V4 Pro (DeepSeek)$1.32 peak / $0.66 off-peak$3.96 / $1.98$0.044 / $0.022Half price outside peak hours

Two things stand out. First, the very top is a tie: Fable 5.1 and GPT-6 Astra both list $10 and $50. Second, the spread below it is huge. DeepSeek V4 Pro off-peak costs about one twenty-fifth of the top tier for output. Whether it does your job as well is a separate question, and only a test on your own tasks answers it (see how to price your own workload). If you have ever wondered what the most expensive AI API is: OpenAI still sells o1-pro at $150 input and $600 output per million tokens, and GPT-5.5 Pro at $30 and $180. Both are older models that almost nobody should pick for new work.

Workhorse AI API prices (the models most apps use)

This is the tier most production apps run on: strong enough for nearly everything, at a fraction of the top-tier price.

Model (provider)InputOutputCache hitNotes
Claude Sonnet 5.5$2.00$10.00$0.101M context, no surcharge
GPT-6.1 Sol$2.00$10.00$0.10Over 272K: $4 / $15
GPT-6 Sol$2.00$10.00$0.20Older; cache hits cost double 6.1's
GPT-5.6 Terra$2.00$12.00$0.20Over 272K: $4 / $18
Gemini 2.5 Pro$1.25$10.00$0.125Over 200K: $2.50 / $15
Grok 4.3$1.25$2.50$0.201M context; 200K+ doubles
Gemini 3.8 Flash$0.75$3.75$0.075$1.50 / $7.50 from Jan 1, 2027; free tier
Mistral Large 3 (2512)$0.50$1.50-Mistral API standard price
qwen-plus$0.40$1.20-Over 256K: $1.20 / $3.60
DeepSeek flash (V4.1 Flash)$0.30 peak / $0.15 off-peak$1.20 / $0.60$0.006 / $0.003Thinks by default; 1M context

The three-way tie at $2 / $10 is the headline. Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Argon (until November 30) cost the same per token, so the choice between them comes down to quality on your task, the surcharges below, and, for Gemini, a price that is about to double. Grok 4.7 matches their input price and undercuts their output price by 40 percent. Among the lower-cost workhorses, Gemini 3.8 Flash is the only one with a free tier, and qwen-plus is the cheapest from a major cloud provider.

The cheapest AI APIs (October 2026)

For classification, extraction, routing, short replies and summaries, the budget models are good enough, and their prices are close to zero:

ModelInputOutputCatch
qwen3.7-flash$0.03$0.13Prompts up to 32K only; then $0.10 / $0.40. Thinks by default
qwen-flash$0.05$0.40Up to 256K; no thinking by default
GPT-5 nano$0.05$0.40Older generation
Claude Haiku 5.5$0.10$0.50Prompts over 100K: $0.50 / $2.50
GPT-6 Luna$0.10$0.50Over 272K: $0.20 / $0.75
Gemini 2.5 Flash-Lite$0.10$0.40Audio input $0.30; free tier
qwen3.8-flash$0.15$0.47Thinks by default; turn it off
DeepSeek flash, off-peak$0.15$0.60Double at peak times (weekday mornings UTC)
Gemini 3.1 Flash-Lite$0.25$1.50Free tier

Which AI API is cheapest? Per token, it is qwen3.7-flash on Alibaba Cloud Model Studio, as long as your prompts stay under 32K tokens and you switch off its default thinking. Per useful answer, it depends on how much each model writes. A model that answers in 80 tokens at $0.50 per million output beats one that reasons for 600 tokens at $0.13. Among the big three, Claude Haiku 5.5 and GPT-6 Luna tie at $0.10 / $0.50, again to the cent, with Gemini 2.5 Flash-Lite cheaper on output at $0.40 and with a free tier. For Jake's chat assistant, that tier was the answer: about $15 a month at 1,000 conversations a day (see worked examples).

Older models can cost more than newer ones

A surprising number of apps still call a model from a year or two ago, and many of those older models cost more than their replacements. If you have not changed your model name in a while, check this table before anything else:

Older modelInput / outputNewer modelInput / output
GPT-5.5$5.00 / $30.00GPT-6.1 Sol$2.00 / $10.00
GPT-5.4$2.50 / $15.00GPT-6.1 Sol$2.00 / $10.00
GPT-4o$2.50 / $10.00GPT-6.1 Sol$2.00 / $10.00
GPT-4o mini$0.15 / $0.60GPT-6 Luna$0.10 / $0.50
Claude Opus 5 / Opus 4.8$5.00 / $25.00Claude Opus 5.5$4.00 / $20.00
Claude Fable 5 (cache hit $1.00)$10.00 / $50.00Claude Fable 5.1 (cache hit $0.25)$10.00 / $50.00

GPT-5.5 costs 2.5 times GPT-6.1 Sol's input price and 3 times its output price. Claude Opus 5 costs 25 percent more than Opus 5.5. Claude Fable 5 has the same headline price as Fable 5.1, but its cache hits cost four times as much, which matters enormously for agents. Some older models are still the cheapest in their family. GPT-4.1 nano lists $0.10 / $0.40, and GPT-5 nano $0.05 / $0.40. They are reasonable for very simple jobs, but test the newer budget models first, because the newer ones usually do more per token. Moving model names is usually a one-line change. Before you make it, rerun your 20 test examples, because newer models can format answers differently.

On the Grok side, Grok 4.5, 4.6 and 4.7 all list $2 / $6. Grok 4.5's cache hits are actually cheaper ($0.30 against $0.50), so a cache-heavy workload on 4.5 can cost less than the newest version. Newer is not automatically cheaper, but it is cheaper often enough to make checking worth five minutes.

Price changes already announced: Gemini doubles on December 1 and January 1

Several Gemini models now carry two prices: one "through" a date, and one "starting" the next day. Every one of them doubles:

  • Gemini 4 Argon: $2 / $10 through November 30, 2026, then $4 / $20 from December 1, 2026. Context caching goes from $0.10 to $0.20. Batch and Flex go from $1 / $5 to $2 / $10, and Priority from $3.60 / $18 to $7.20 / $36.
  • Gemini 3.8 Flash and Gemini 3.6 Flash: $0.75 / $3.75 through December 31, 2026, then $1.50 / $7.50 from January 1, 2027. Cache storage goes from $0.50 to $1.00 per million tokens per hour.
  • Gemini 3.8 Flash TTS and Flash-Lite TTS, Gemini Embedding 2 and the Robotics ER 2 previews follow the same January 1, 2027 doubling.

The output price on all of these includes thinking tokens. If you are building a budget for 2027 around a Gemini model, use the second number. On December 1, Gemini 4 Argon stops matching Sonnet 5.5 and GPT-6.1 Sol and costs twice as much per token as both. Ethan put the December price in his spreadsheet in red. "So the cheap option has an expiry date," Jake said. "Like milk," Ethan said.

OpenAI has one dated note too: GPT-5.6 Sol's promotional pricing runs "at least through November 21, 2026". On the other side, DeepSeek is adding charges, not doubling prices. Its Search and Fetch tools, when called through tools like Claude Code or Codex, are free until November 1, 2026 (Beijing time) and then cost $0.75 per 1,000 successful requests.

Long-context surcharges: the multiplier that decides big-document bills

Several providers raise the price of a whole request once its input passes a threshold. Every token in that request is then billed at the higher rate, not just the tokens past the line:

Provider / modelThresholdAbove the threshold
Claude Fable 5.1, Opus 5.5, Sonnet 5.5None (1M context)Same price; a 900K prompt costs the same per token as 9K
Claude Haiku 5.5100K prompt tokens5×: $0.50 / $2.50
OpenAI GPT-6 and GPT-5.6 families272K input tokensInput 2×, output 1.5× (Sol $4 / $15)
xAI Grok 4.x200K prompt tokens2× input, cache and output
Gemini 2.5 Pro200K$2.50 / $15
Gemini 4 Argon, 3.8 FlashNone listedSame price (but see the dated doubling)
Qwen qwen-plus256K3×: $1.20 / $3.60
DeepSeek flash and V4 ProNone (1M context)Same price

Here is what that does to one request with a 400,000-token document and a 2,000-token answer. On Claude Sonnet 5.5: 0.4 × $2 + 0.002 × $10 = $0.82. On GPT-6.1 Sol, which crosses 272K: 0.4 × $4 + 0.002 × $15 = $1.63, about double. Grok 4.7 lands at $1.62, and Gemini 4 Argon at $0.82 until December, then $1.64. At the budget tier the surprise flips. Claude Haiku 5.5 crosses its 100K line and charges $0.50 / $2.50, about $0.21, while GPT-6 Luna's long-context rate is $0.20 / $0.75, about $0.08. Same headline price, and a 2.5× gap on long documents, the other way round.

The practical rule is to keep requests under the threshold when you can. Send only the relevant chunks with retrieval, split documents, and trim old conversation turns. When you truly need huge prompts, favor providers without a threshold. Anthropic's Haiku 5.5 rule also counts cache reads and writes toward the 100K, so a long cached prefix can push a request over the line even if the new part is small.

Thinking tokens: why the same question costs different amounts

Reasoning ("thinking") models write a hidden chain of thought before the answer, and every provider bills it as output. Gemini's output price explicitly covers thinking tokens, and Qwen's output price covers "chain of thought + answer". The price per token stays the same, but the number of output tokens can grow several times over. Three things to check:

  • Is thinking on by default? DeepSeek's models think by default. Qwen's qwen3.5 to qwen3.8 models do too, while qwen-plus and qwen-flash do not. Many Gemini models think as well. A move to a "cheaper" model can raise the bill if the new one thinks and the old one did not.
  • Can you limit it? Most APIs have a switch or an effort setting. Qwen has enable_thinking and thinking_budget, OpenAI models take reasoning_effort, and the other providers have similar effort or budget controls in their API references. For short replies, set the lowest effort or turn it off.
  • Measure it. Every API returns token usage per response. Run 20 real requests and average the output tokens, including reasoning. That number, not the price table, is what you multiply.

Here is a quick example of the effect. A model at $0.50 per million output tokens that answers in 100 tokens costs $0.05 per 1,000 answers. If it reasons for 900 tokens first, it costs $0.50 per 1,000, ten times more for the same visible reply. Thinking is often worth it for hard problems. For "is my phone ready?" it is wasted money.

Prompt caching compared: who discounts repeated prompts most

When many requests start with the same long text (a system prompt, a manual, a codebase), caching lets you pay a fraction of the input price for that repeated part. Cache-hit prices, as a share of each model's input price:

  • Claude Fable 5.1: $0.25 against $10, so 2.5 percent. Writes cost 1.25× input for a 5-minute cache or 2× for 1 hour.
  • Claude Opus 5.5 and Sonnet 5.5: $0.20 and $0.10, both 5 percent. Haiku 5.5: $0.01, 10 percent.
  • GPT-6.1 Sol: $0.10, 5 percent. GPT-6 Astra: $1.00, 10 percent. GPT-6 Sol: $0.20, 10 percent. OpenAI also lists 30-minute and 12-hour cache-write prices for its newest models.
  • Gemini 4 Argon: $0.10, 5 percent, implicit caching only (explicit caching is not supported). Gemini 3.8 Flash: $0.075, 10 percent, plus $0.50 per million tokens per hour of storage for explicit caches.
  • Grok 4.7: $0.50, 25 percent, the least generous discount here.
  • DeepSeek flash: $0.006 at peak, 2 percent. Qwen: explicit cache hits at 10 percent, creation at 125 percent.

This is where the Fable 5.1 versus GPT-6 Astra tie breaks. Take a coding agent session that sends 2 million input tokens, 90 percent of them cache hits, and gets back 50,000 output tokens. On Fable 5.1 that costs about $4.95. On GPT-6 Astra the same session costs about $6.30, roughly 27 percent more, purely from the cache-hit price. Grok 4.7's 25 percent cache price makes it $1.60 against $1.08 for Sonnet 5.5 and GPT-6.1 Sol, even though Grok's output is cheaper. If your workload repeats a long prefix, the cache-hit column matters more than the input column.

Batch, flex, off-peak and fast modes: discounts and premiums

Every provider sells the same model at several speeds, and the price changes with the speed:

  • Batch (50 percent off). OpenAI, Anthropic, Google and Mistral all halve input and output for batch jobs, and so does Alibaba Cloud on its supported Qwen models. You submit a file of requests and collect results within hours. Anthropic lets batch and caching discounts combine; Alibaba does not. On xAI, only some models accept batch.
  • Flex (Google, 50 percent off). Gemini 4 Argon's Flex tier matches its Batch price ($1 / $5 until December), for requests that can wait for spare capacity.
  • Off-peak (DeepSeek, 50 percent off). DeepSeek's peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday. Every other hour, including weekends and Chinese public holidays, is half price. DeepSeek's models hosted on Alibaba Cloud have a different peak window (08:00 to 22:00 UTC+8), so check which host you are on.
  • Priority and fast modes (premiums). Google's Priority tier for Gemini 4 Argon costs 1.8× standard ($3.60 / $18). Anthropic's fast mode for Opus 5.5 is 2× ($8 / $40). OpenAI's Fast mode ("Ultrafast" in its table, renamed from Priority processing on July 30, 2026) costs 6× for GPT-6.1 Sol ($12 / $60) and GPT-6 Astra ($60 / $300).
  • Data residency (premiums). OpenAI adds 10 percent for regional processing on models released on or after March 5, 2026, and 10 percent for FedRAMP endpoints. Anthropic applies 1.1× to US-only inference (inference_geo: "us") on Claude 4.6 and later models, and its regional endpoints on cloud platforms cost 10 percent more than global ones.

Put together, the same Sonnet-class request can cost anywhere from half price (batch) to six times the price (OpenAI fast mode), a 12× range, without changing the model. Ethan's rule for the shop: everything a customer is waiting for runs at standard speed, and everything that can wait until morning, like the nightly summary of repair notes, runs in batch.

Free AI API tiers compared

  • Google Gemini API: the most generous standing free tier. Gemini 3.8 Flash, 3.6 Flash, the Flash-Lite models, 2.5 Pro and others are "free of charge" on the free tier, within rate limits. Two catches: Gemini 4 Argon is not available on the free tier, and free-tier content is used to improve Google's products, while paid-tier content is not. Our Gemini free tier guide covers the limits.
  • Alibaba Cloud Model Studio (Qwen): new accounts in the Singapore region get a free quota, typically 1 million tokens per model, valid for 90 days. Turn on "Free Quota Only" so the trial cannot become a bill.
  • OpenAI, Anthropic, xAI and DeepSeek: their API pricing pages show no standing free tier, only paid rates. You prepay or add a card. DeepSeek deducts from a "granted balance" first when your account has one.
  • Running models yourself: open-weight models (Qwen, DeepSeek, Gemma, Mistral's open models) cost nothing per token on your own hardware, limited by your GPU or Mac's memory.

Quick answers to the questions people type most often about free LLM APIs:

  • Is the Gemini API free? Yes, on the free tier for the Flash, Flash-Lite and 2.5 Pro models, within rate limits. Gemini 4 Argon is paid only.
  • Is the Claude API free? No standing free tier. You pay per token from the first request, from $0.10 per million input tokens on Haiku 5.5.
  • Is the OpenAI API free? No standing free tier. The cheapest current model, GPT-5 nano, costs $0.05 per million input tokens.
  • Is the DeepSeek API free? No, but off-peak prices start at $0.15 per million input tokens, and cache hits at $0.003.
  • Is the Grok API free? No standing free tier. The cheapest Grok text model, grok-build-0.1, costs $1 per million input tokens.
  • Is the Qwen API free? For 90 days, up to about 1 million tokens per model, for new Singapore-region accounts.

If you are learning, the Gemini free tier plus Qwen's 90-day quota let you build and test a real app without paying anything. Just check what each free tier does with your data before you send anything sensitive through it.

Monthly cost examples: chatbot, coding agent, long documents

1. A website chat assistant, like Jake's: 1,000 conversations a day (30,000 a month), each request about 3,000 input tokens (instructions, shop FAQ and conversation) and 400 output tokens, with no caching and no thinking:

  • Claude Fable 5.1 or GPT-6 Astra: about $1,500 a month. Claude Opus 5.5: $600.
  • Claude Sonnet 5.5, GPT-6.1 Sol or Gemini 4 Argon (this month): about $300. Gemini 4 Argon from December: $600. Grok 4.7 or qwen3.8-max: $252.
  • Gemini 3.8 Flash: $112.50 now, $225 from January. DeepSeek V4 Pro: $166 at peak, $83 off-peak.
  • qwen-plus: about $50. DeepSeek flash: $41 at peak, $21 off-peak.
  • Claude Haiku 5.5 or GPT-6 Luna: about $15. Gemini 2.5 Flash-Lite: $13.80. qwen-flash: about $9.

Caching the shop's 2,500-token FAQ prefix would cut the input part of every one of those bills by most of its cost. For the budget models the whole bill is so small that quality and reliability matter more than the last few dollars.

2. A coding agent session: 2 million input tokens across many requests (90 percent served from cache, each request under the long-context thresholds) and 50,000 output tokens:

  • Claude Fable 5.1: $4.95. GPT-6 Astra: $6.30. Claude Opus 5.5: $2.16.
  • Claude Sonnet 5.5, GPT-6.1 Sol, Gemini 4 Argon (now): $1.08 each. Grok 4.7: $1.60.
  • Gemini 3.8 Flash: $0.47 now, $0.94 from January. DeepSeek V4 Pro: $0.54 peak, $0.27 off-peak.
  • Claude Haiku 5.5 or GPT-6 Luna: about $0.06. DeepSeek flash off-peak: about $0.07.

Without caching, every one of those costs four to five times more: Fable 5.1 would be $22.50 and Sonnet 5.5 $4.50 per session. For agents, caching is not an optimization. It is the main pricing decision.

3. Long documents: 100 contracts a month, each 400,000 tokens with a 2,000-token summary, one request each. That is about $82 on Claude Sonnet 5.5 (no threshold), $163 on GPT-6.1 Sol (long-context rate) and $162 on Grok 4.7. Gemini 4 Argon is $82 until November 30, then $164. Gemini 3.8 Flash comes to about $31, DeepSeek flash about $12 at peak, and qwen-plus about $49 (above its 256K tier). On budget models, Haiku 5.5 is about $21 and GPT-6 Luna about $8. If those contracts can be split into chunks under the thresholds, the GPT and Grok bills roughly halve.

Cheapest AI API for coding

Coding workloads are dominated by long, repeated context (your files) and by agents that make dozens of calls per task, so the cache-hit price and the long-context rule matter more than the headline. On price for a typical cached agent session, the ranking from the example above is: Haiku 5.5 and GPT-6 Luna (about $0.06), DeepSeek flash off-peak ($0.07), Gemini 3.8 Flash ($0.47 for now), then the $2 / $10 tier at about $1.08. xAI also sells grok-build-0.1, a coding model at $1 / $2 with a 256K context. Alibaba's qwen3-coder-flash is priced in four tiers from $0.30 / $1.50 for prompts up to 32K.

The honest advice is to price the top two or three candidates on a real task from your own repository, because a cheaper model that needs three attempts costs more than a pricier one that succeeds once. Many teams use a strong model to plan and a cheap one to make the routine edits, which is easy when tools let you set a different model per role.

Direct, OpenRouter, or a cloud platform?

You can buy most of these models in three ways:

  • Direct from the model maker (Anthropic, OpenAI, Google, xAI, DeepSeek, Mistral, Alibaba Cloud). You get list prices, the newest features first, and each provider's own free tier or quota.
  • Through OpenRouter, one key and one bill for hundreds of models. On October 22, 2026, its listed prices for the first-party models in this guide matched the direct prices: Claude Opus 5.5 $4 / $20, Sonnet 5.5 $2 / $10, Haiku 5.5 $0.10 / $0.50, GPT-6.1 Sol $2 / $10, GPT-6 Astra $10 / $50, Gemini 4 Argon $2 / $10 and Grok 4.7 $2 / $6. It also lists models whose makers' pages are hard to read, such as Mistral Medium 3.5 at $1.50 / $7.50 and Mistral Small (2603) at $0.15 / $0.60.
  • Through a cloud platform (Amazon Bedrock, Google Vertex AI, Microsoft Foundry). Billing goes on your cloud account, with that cloud's security, private networking and data controls. Prices are often the same as list, with regional variations. For Claude, regional endpoints on cloud platforms cost 10 percent more than global ones. Our Claude Platform on AWS guide covers one such route.

Gemini API pricing tiers: Standard, Batch, Flex, Priority and grounding

Google sells each Gemini model in up to five tiers, and the tier you pick changes both price and data use:

  • Standard is the normal pay-as-you-go price, the one in the tables above.
  • Batch is half price, for jobs submitted as a file and collected later.
  • Flex is also half price for Gemini 4 Argon, for live requests that can wait for spare capacity.
  • Priority costs about 1.8 times Standard, for guaranteed fast responses at busy times.
  • Contributor is an invite-only private preview at the Batch price with Standard speed. The catch is in the last row of its table: content is used to improve Google's products. Paid Standard, Batch, Flex and Priority traffic is not.

Grounding (letting Gemini search the web or Google Maps while it answers) is priced separately. For Gemini 3 and newer models, you get 5,000 free Google Search requests a month, shared across those models, then $14 per 1,000. One question can trigger several searches, and each search counts. Grounding with Google Maps has the same 5,000 free requests and then $14 per 1,000. Older Gemini 2.5 Pro grounding works differently: 1,500 grounded prompts a day free, then $35 per 1,000. If your app answers questions about current events or local places, add grounding to your estimate, because it can cost more than the tokens.

xAI (Grok) and Z.ai (GLM) API pricing

The whole Grok text lineup follows one rule: any model with a long-context price charges double for all tokens in a request whose prompt reaches 200K tokens.

  • Grok 4.7, the current flagship: $2 input, $0.50 cached, $6 output, 500K context.
  • Grok 4.6 and 4.5: the same $2 / $6, with 4.5's cache hits at $0.30.
  • Grok 4.3 and the Grok 4.20 reasoning, non-reasoning and multi-agent models: $1.25 / $2.50 with 1M context. Grok 4.3 has the lowest output price of any model at this capability level in this guide.
  • grok-build-0.1, for coding: $1 / $2, 256K context.

One detail for anyone switching from OpenAI: models from grok-4.20 onward silently ignore logprobs and top_logprobs, so code that depends on them gets nothing back without an error.

Z.ai's GLM models appear on OpenRouter at $0.70 / $2.20 for GLM-5.3 and $2.80 / $8.80 for GLM-5.3 Prime on October 22, 2026, and GLM 5.3 is also available on Amazon Bedrock (our GLM 5.3 on Bedrock guide has that route). Like DeepSeek and the newer Qwen models, GLM-5 models think by default when you call them on Alibaba Cloud, so budget for reasoning tokens.

Image, video and voice API prices

Not every AI API is priced per token. Image, video and voice models are priced per image, per second or per minute:

  • Images: Qwen-Image 2.1 Turbo $0.016 and Pro $0.04 per image (10 free images each for new Alibaba Cloud accounts). xAI's Grok Imagine Image costs $0.02, Image 2.0 $0.04 and the quality model $0.05 per image.
  • Video: Grok Imagine Video 1.5 Lite costs $0.02 per second, the original Grok Imagine Video $0.05, and Video 1.5 $0.08 per second. A 10-second clip costs between 20 and 80 cents.
  • Voice: xAI's text to speech costs $15 per million characters, speech to text $0.10 an hour (or $0.20 streaming), and live speech to speech $0.08 a minute. Gemini 3.8 Flash TTS costs $0.50 per million text tokens in and $9 per million audio tokens out until December 31, 2026, doubling on January 1, 2027.

For media, multiply by what you actually generate, including retries. Image and video prompts often need three or four attempts before you keep one, so the real cost per kept image is several times the list price.

Seven ways to cut your AI API bill

  1. Pick the smallest model that passes your test set. Moving from the $2 / $10 tier to the $0.10 / $0.50 tier is a 20× saving, the biggest lever you have.
  2. Turn thinking down for simple tasks. Reasoning tokens can multiply output many times over. Use the lowest effort setting that still gives right answers.
  3. Cache your long, repeated prefix. Put the system prompt, documents or code first, keep them identical, and pay 2.5 to 25 percent of the input price on every repeat.
  4. Stay under long-context thresholds. Retrieve the relevant chunks instead of sending whole documents, and trim old conversation turns.
  5. Batch anything that can wait. Overnight summaries, tagging and evaluations run at half price on most providers, or off-peak on DeepSeek.
  6. Cap the output. Set a maximum output length on every request, so a runaway reply cannot write thousands of tokens you did not need.
  7. Watch the calendar. Put dated price changes, like Gemini's December 1 and January 1 doublings, into your budget, and re-check the price pages once a month.

You do not need all seven at once. For most small apps, the first and third cover nearly all the savings: the right-sized model, plus caching of the part you send every time.

Model routing: top-tier quality at close to budget prices

You do not have to pick one model for everything. Many apps send every request to a cheap model first and escalate only the hard ones to a stronger model. The cheap model can answer directly when it is confident, or it can classify the request ("simple question", "needs a human", "complex problem") and pass the hard ones up. The savings are large because most real traffic is easy.

Take Jake's chat assistant from the examples above: 30,000 requests a month. All on the $2 / $10 tier, it costs about $300. All on the $0.10 / $0.50 tier, it costs about $15. Now suppose 90 percent of questions are simple ("are you open Sunday?", "is my phone ready?") and stay on the budget model, and 10 percent go to the workhorse. The blended bill is 0.9 × $15 + 0.1 × $300 = $43.50 a month, about one seventh of the all-workhorse price, while the hard questions still get the stronger model. You pay a little extra for the routing step itself, which is one more short call on the budget model.

Three things make routing work. First, the escalation rule must be cheap to evaluate: a short classification prompt, not a second full conversation. Second, you need a fallback when the budget model is unsure, which can be as simple as asking it to say "escalate" in that case. Third, log which requests escalate, so you can see whether the split matches reality. If 40 percent escalate, the budget model is too weak for your traffic, or your rule is too cautious. Ethan's version for the shop has one extra rule: anything that mentions a refund goes straight to a person, whatever the model thinks.

How to price your own workload (in 30 minutes)

  1. Collect 20 real examples of what your app will send: real prompts, real documents, real conversation lengths.
  2. Measure tokens on two or three candidate models. Send the examples, then record input, cached and output tokens (including reasoning) from each response's usage field.
  3. Apply the right price row: check whether any request crosses a long-context threshold, whether thinking is on, and which share of input is cache hits.
  4. Add the multipliers you will actually use: batch for background work, off-peak if your jobs can wait, data residency if you need it, fast mode if latency matters.
  5. Multiply by real volume, then add 30 percent for retries, longer conversations and growth.
  6. Score quality on the same 20 examples. Pick the cheapest model that passes, not the cheapest model.
  7. Put the dated price changes in the sheet, such as Gemini on December 1 and January 1, and set a reminder to re-check the price pages monthly.

Ethan's 20 examples were last month's real customer questions, warranty rules and all. He ran them through three budget models, kept the one whose answers Jake liked best, set a monthly budget alert, and wrote the December Gemini price in the sheet in case he wanted to revisit later.

Why is my AI API bill higher than the price table says?

Output tokens are far higher than the visible replies

Thinking is on. Reasoning tokens are billed as output. Lower the effort or switch thinking off for simple tasks.

Long documents cost double what I calculated

The request crossed a long-context threshold (272K on OpenAI, 200K on Grok, 100K on Haiku 5.5), so every token was billed at the higher rate.

Caching does not seem to reduce the bill

The repeated text must be at the start of the prompt and identical byte for byte. Any change near the beginning breaks the cache match.

The same job costs more some days

You may be on peak pricing (DeepSeek) or the provider changed price on a dated schedule (Gemini on Dec 1 and Jan 1).

My cloud bill is about 10 percent above list price

Regional or data-residency processing adds 10 percent on OpenAI's newer models, US-only inference adds 10 percent on Claude, and so do regional cloud endpoints.

The chat subscription is cheaper than the API

They are separate products. Subscription plans do not cover API usage, and API usage is billed per token on its own account.

AI API pricing: frequently asked questions

What is the cheapest AI API in 2026?

Per token in October 2026, qwen3.7-flash at $0.03 input and $0.13 output per million tokens for prompts up to 32K, then qwen-flash and GPT-5 nano at $0.05 and $0.40.

Which AI API is cheapest among OpenAI, Anthropic and Google?

Claude Haiku 5.5 and GPT-6 Luna tie at $0.10 input and $0.50 output per million tokens. Gemini 2.5 Flash-Lite costs $0.10 and $0.40 and has a free tier.

How much does the OpenAI API cost?

In October 2026, GPT-6 Astra costs $10 and $50, GPT-6.1 Sol $2 and $10, and GPT-6 Luna $0.10 and $0.50 per million tokens, doubling input above 272K tokens.

How much does the Claude API cost?

Claude Fable 5.1 costs $10 and $50, Opus 5.5 $4 and $20, Sonnet 5.5 $2 and $10, and Haiku 5.5 $0.10 and $0.50 per million input and output tokens.

How much does the Gemini API cost?

Gemini 4 Argon costs $2 and $10 until November 30, 2026, then $4 and $20. Gemini 3.8 Flash costs $0.75 and $3.75 until December 31, 2026, then $1.50 and $7.50.

How much does the xAI Grok API cost?

Grok 4.7 costs $2 per million input tokens and $6 per million output tokens, doubling for prompts of 200K tokens or more. Grok 4.3 costs $1.25 and $2.50.

How much does the DeepSeek API cost?

DeepSeek's flash model costs $0.30 input and $1.20 output at peak and half that off-peak. DeepSeek V4 Pro costs $1.32 and $3.96 at peak.

Why do Claude and GPT cost the same?

In October 2026, Anthropic and OpenAI list identical prices at three tiers: $10 and $50, $2 and $10, and $0.10 and $0.50. Bills still differ through caching and long-context rules.

Is the Gemini API price going up?

Yes. Google's pricing page shows Gemini 4 Argon doubling on December 1, 2026, and Gemini 3.8 Flash and 3.6 Flash doubling on January 1, 2027.

What is the most expensive AI API?

Among current list prices, OpenAI's o1-pro at $150 input and $600 output per million tokens, followed by GPT-5.5 Pro at $30 and $180.

Are thinking tokens billed in AI APIs?

Yes. Reasoning tokens are billed as output tokens. Gemini's output price includes thinking tokens, and the same applies to Claude, GPT, Qwen and DeepSeek.

What does price per million tokens mean?

It is the cost of 1 million tokens, roughly 750,000 English words. Input and output are priced separately, and output usually costs 3 to 8 times more.

Which AI APIs have a free tier?

Google's Gemini API has a free tier for its Flash and Flash-Lite models, and Alibaba Cloud gives new Singapore accounts a 90-day free quota for Qwen models.

How much does batch processing save on AI APIs?

OpenAI, Anthropic, Google, Mistral and Alibaba Cloud take 50 percent off input and output for batch jobs. DeepSeek charges half price off-peak instead.

Is OpenRouter more expensive than going direct?

On October 22, 2026, OpenRouter's listed prices matched the direct prices for Claude, GPT-6, Gemini 4 Argon and Grok 4.7.

What is the cheapest AI API for coding?

For cached agent sessions, Claude Haiku 5.5 and GPT-6 Luna, then DeepSeek flash off-peak. For harder tasks, the $2 and $10 tier of Sonnet 5.5 and GPT-6.1 Sol.

πŸ“š ALSO READ

Deep dives on the models in this comparison:

📌 Bookmark this page. We update the tables when the price pages change, and the dated Gemini increases are already in.

The shop's chat assistant went live on the $0.10 / $0.50 tier at about $15 a month, with the FAQ cached and thinking off. Jake asked what happens on December 1. "Nothing, for us," Ethan said. "We're not on the model that doubles. But I wrote the date down anyway." Jake looked at the spreadsheet with its column of red December prices. "You trust a price list about as far as you can throw it." "About that far," Ethan said.

📌 If you keep one line from this page

Claude and GPT now cost the same per token at every tier, and Gemini 4 Argon matches them until December 1. So compare long-context thresholds, cache-hit prices, thinking tokens and batch on 20 of your own requests, not the headline price.

$10/$50 Fable 5.1, GPT-6 Astra · $2/$10 Sonnet 5.5, GPT-6.1 Sol, Gemini 4 Argon · $0.10/$0.50 Haiku 5.5, GPT-6 Luna · per 1M tokens, October 22, 2026.

Revision note. Prices are each provider's standard rates on October 22, 2026 (Mistral Medium, Small and Large 4 from OpenRouter's listing that day). "Look before you leap," the old proverb says, and with AI prices it helps to look at the multipliers before you leap at the headline.

#AI

Related