LLM API pricing comparison

API prices for the 23 models here run from $0.05 to $10.00 per million input tokens and from $0.40 to $50.00 per million output tokens, lowest on GPT-5 nano and highest on GPT-6 Astra. This LLM API pricing comparison sets models from Anthropic, OpenAI, Google, xAI and DeepSeek side by side, with their cached input and long-prompt rates, and works out what a month of your own token use would cost on each. Every price comes from Neotask’s model price data and was checked against the provider’s own price list on 29 November 2026.

Your monthly token use

Starts at 10 million input and 2 million output tokens a month. Prices are in US dollars per million tokens.

$1.30
Cheapest: GPT-5 nano
$200.00
Most expensive: GPT-6 Astra
154x
Difference

This use costs $1.30 a month on GPT-5 nano and $200.00 on GPT-6 Astra.

ModelYour cost a monthInputCached inputOutput
GPT-5 nanoOpenAI, checked 29 November 2026$1.30$0.05$0.005$0.40
Claude Haiku 5.5Anthropic, checked 29 November 2026$2.00$0.10$0.01$0.50
GPT-6 LunaOpenAI, checked 29 November 2026$2.00$0.10$0.01$0.50
GPT-5.6 LunaOpenAI, checked 29 November 2026$4.40$0.20$0.02$1.20
DeepSeek V4.1 FlashDeepSeek, checked 29 November 2026. Peak-hour rate$5.40$0.30$0.006$1.20
Gemini 3.1 Flash-LiteGoogle, checked 29 November 2026$5.50$0.25$0.025$1.50
GPT-5 miniOpenAI, checked 29 November 2026$6.50$0.25$0.025$2.00
Gemini 3.5 Flash-LiteGoogle, checked 29 November 2026$8.00$0.30$0.03$2.50
Gemini 2.5 FlashGoogle, checked 29 November 2026$8.00$0.30$0.03$2.50
Gemini 3.8 FlashGoogle, checked 29 November 2026$15.00$0.75$0.075$3.75
Gemini 3.6 FlashGoogle, checked 29 November 2026$15.00$0.75$0.075$3.75
Claude Haiku 4.5Anthropic, checked 29 November 2026$20.00$1.00$0.10$5.00
Grok 4.7xAI, checked 29 November 2026$32.00$2.00$0.50$6.00
GPT-5OpenAI, checked 29 November 2026$32.50$1.25$0.125$10.00
Gemini 2.5 ProGoogle, checked 29 November 2026$32.50$1.25$0.125$10.00
Claude Sonnet 5.5Anthropic, checked 29 November 2026$40.00$2.00$0.10$10.00
Claude Sonnet 5Anthropic, checked 29 November 2026$40.00$2.00$0.20$10.00
GPT-6 SolOpenAI, checked 29 November 2026$40.00$2.00$0.20$10.00
GPT-5.6 TerraOpenAI, checked 29 November 2026$44.00$2.00$0.20$12.00
Gemini 3.1 Pro PreviewGoogle, checked 29 November 2026$44.00$2.00$0.20$12.00
Claude Opus 5.5Anthropic, checked 29 November 2026$80.00$4.00$0.20$20.00
Claude Opus 5Anthropic, checked 29 November 2026$100.00$5.00$0.50$25.00
GPT-6 AstraOpenAI, checked 29 November 2026$200.00$10.00$1.00$50.00

Each row links the provider price list its prices were checked against.

How to read the comparison

API providers charge separately for the tokens you send (input) and the tokens the model writes back (output). Output always costs more. In this table it runs from 3 times the input price on Grok 4.7 to 8.3 times on Gemini 3.5 Flash-Lite and Gemini 2.5 Flash, so a job that produces long answers ranks the models differently from one that reads long inputs and answers briefly.

Each provider counts tokens with its own tokenizer, so the same text comes to a different number of tokens on each. The calculator applies one set of counts to every model, so for a close call between two providers, count your text with each one’s tokenizer; our token counter does GPT, Claude and Gemini.

Cached input is the discounted price for input the provider already holds from an earlier request. The calculator applies it to the share of your input you mark as cached. It leaves out what some providers charge to write to the cache, storage charges for cached content, batch and priority tiers, and tools such as web search, all of which are priced separately.

A model released since our price data was last updated is left out until we add it, rather than shown with a price we haven’t checked.

Claude API pricing

Claude Opus 5.5 costs $4.00 per million input tokens and $20.00 per million output tokens. Claude Haiku 5.5 is the only Claude model here whose price depends on prompt length: a request with a prompt up to 100k tokens pays $0.10 in and $0.50 out, and a longer one pays $0.50 and $2.50. Writing to Anthropic’s prompt cache costs extra: on Opus 5.5, $5.00 per million tokens for a cache that lasts five minutes and $8.00 for one that lasts an hour.

ModelInputCached inputOutputLong prompts
Claude Opus 5.5$4.00$0.20$20.00Same rates
Claude Sonnet 5.5$2.00$0.10$10.00Same rates
Claude Haiku 5.5$0.10$0.01$0.50Over 100k: $0.50 in, $2.50 out
Claude Opus 5$5.00$0.50$25.00Same rates
Claude Sonnet 5$2.00$0.20$10.00Same rates
Claude Haiku 4.5$1.00$0.10$5.00Same rates

Anthropic’s pricing page says Claude 4.7 and later models use a tokenizer that produces about 30% more tokens for the same text, so the same prompt counts as more tokens on Opus 5.5 than on Haiku 4.5. Claude Fable 5.2 is not in our price data yet. For Claude Code costs on each Claude plan, use the Claude Code pricing calculator.

Source: Claude API pricing, checked 29 November 2026.

OpenAI API pricing

At $10.00 input and $50.00 output per million tokens, GPT-6 Astra is the most expensive model in the table. GPT-6 Sol costs $2.00 and $10.00, and GPT-6 Luna $0.10 and $0.50. Above a 272k-token prompt, OpenAI’s GPT-6 and GPT-5.6 models double the input price and charge 1.5 times the output price: GPT-6 Sol goes to $4.00 and $15.00. Writing to OpenAI’s 30-minute prompt cache costs $2.50 per million tokens on GPT-6 Sol.

ModelInputCached inputOutputLong prompts
GPT-6 Astra$10.00$1.00$50.00Over 272k: $20.00 in, $75.00 out
GPT-6 Sol$2.00$0.20$10.00Over 272k: $4.00 in, $15.00 out
GPT-6 Luna$0.10$0.01$0.50Over 272k: $0.20 in, $0.75 out
GPT-5.6 Terra$2.00$0.20$12.00Over 272k: $4.00 in, $18.00 out
GPT-5.6 Luna$0.20$0.02$1.20Over 272k: $0.40 in, $1.80 out
GPT-5$1.25$0.125$10.00Same rates
GPT-5 mini$0.25$0.025$2.00Same rates
GPT-5 nano$0.05$0.005$0.40Same rates

OpenAI also lists GPT-6.2 and GPT-6.1 models, which are not in our price data yet.

Source: OpenAI API pricing, checked 29 November 2026.

Gemini API pricing

Google prices Gemini 3.8 Flash at $0.75 per million input tokens and $3.75 per million output tokens. Its price list says that doubles to $1.50 and $7.50 from 1 January 2027. Gemini 3.6 Flash has the same prices and the same change. Gemini 3.1 Pro Preview bills a whole request at $4.00 input and $18.00 output once the prompt is over 200k tokens, against $2.00 and $12.00 below it. Google’s output price includes the model’s thinking tokens.

ModelInputCached inputOutputLong prompts
Gemini 3.8 Flash$0.75$0.075$3.75Same rates
Gemini 3.6 Flash$0.75$0.075$3.75Same rates
Gemini 3.5 Flash-Lite$0.30$0.03$2.50Same rates
Gemini 3.1 Pro Preview$2.00$0.20$12.00Over 200k: $4.00 in, $18.00 out
Gemini 3.1 Flash-Lite$0.25$0.025$1.50Same rates
Gemini 2.5 Pro$1.25$0.125$10.00Over 200k: $2.50 in, $15.00 out
Gemini 2.5 Flash$0.30$0.03$2.50Same rates

A cache you create yourself, which Google calls explicit caching, also pays an hourly storage charge on top of the cached input price. The Gemini 4 models are not in our price data yet.

Source: Gemini Developer API pricing, checked 29 November 2026.

Grok API pricing

Grok 4.7, which xAI calls its flagship model, has a 500k-token context window. A million tokens cost $2.00 as input, $0.50 as cached input and $6.00 as output. Once a prompt reaches 200k tokens, xAI bills every token in that request at $4.00 input and $12.00 output.

ModelInputCached inputOutputLong prompts
Grok 4.7$2.00$0.50$6.00Over 200k: $4.00 in, $12.00 out

Source: xAI docs: Grok 4.7, checked 29 November 2026.

DeepSeek API pricing

At peak hours, DeepSeek V4.1 Flash charges $0.30 per million input tokens, $0.006 for a cache hit and $1.20 for output. Off-peak prices are half. Peak hours are 01:00 to 04:00 and 06:00 to 10:00 UTC on weekdays, excluding Chinese public holidays; every other hour is off-peak. DeepSeek V4 Pro is left out because our price data doesn’t yet match DeepSeek’s current price for it.

ModelInputCached inputOutputLong prompts
DeepSeek V4.1 Flash$0.30$0.006$1.20Same rates

Source: DeepSeek API docs: models and pricing, checked 29 November 2026.

A worked example

Take the calculator’s starting point: 10 million input tokens and 2 million output tokens in a month, none of it cached. On GPT-5 nano that is 10 × $0.05 plus 2 × $0.40, or $1.30. On Claude Opus 5.5 it is 10 × $4.00 plus 2 × $20.00, or $80.00. If 80% of the Opus input were read from the cache, the input part would fall from $40.00 to $9.60.

Questions

Which LLM API is the cheapest?
Of the 23 models here, GPT-5 nano has the lowest input price, at $0.05 per million input tokens and $0.40 per million output tokens. Which model is cheapest for you depends on how much you send and how much comes back, which is what the calculator works out.
What is a cached input token?
An input token the provider has already processed and stored from an earlier request, such as a long system prompt or document you send again. Every model here charges less for it than for fresh input: from a fiftieth of the input price on DeepSeek V4.1 Flash to a quarter on Grok 4.7.
Do long prompts cost more?
On 9 of these models, yes. Once a prompt passes a threshold, from 100k tokens on Claude Haiku 5.5 to 272k on OpenAI’s GPT-6 and GPT-5.6 models, the whole request is billed at higher rates. Turn on the long-prompt switch in the calculator to see those rates.
Are any of these prices about to change?
Yes. Google has announced that Gemini 3.8 Flash and Gemini 3.6 Flash go from $0.75 to $1.50 per million input tokens on 1 January 2027. Each row shows the day we last checked it against the provider’s price list.
How do I count the tokens in my text?
Paste it into our free token counter. It counts GPT tokens exactly and estimates Claude and Gemini tokens, showing how far its estimates were from the real counts when we measured them.

Run agents in NeotaskNeotask agents can run on a Claude Code subscription, hosted models or your own provider keys, and the Sessions page lists each run’s model with its input, output and cache tokens.

Download Neotask