Scroll AI Now

AI API pricing explained: tokens, costs and caching

Per million token prices from Anthropic, OpenAI and Google, checked 30 November 2026, a worked support bot cost, and how caching cuts the bill.

Short answerAI APIs charge per token, a small piece of text, and quote prices per million tokens. You pay one rate for the input you send and another for the output the model writes. On every model below, output costs at least 5 times input. Caching repeated prompt text cuts the input bill.

How does AI API pricing work?

An AI API bills by the token. Anthropic's pricing page defines its unit as "MTok: Million tokens", so a price of $5 / MTok means $5 for every million tokens.

Every request runs two meters. Input is everything you send: instructions, reference documents, chat history and the user's message. Output is what the model writes back.

Output is the expensive meter. On every model in the table below, the output rate is 5 times the input rate or more.

On Gemini, reasoning counts as output. Google's Gemini pricing page labels its output row "Output price (including thinking tokens)", so the model's thinking is part of the output you pay for.

What does a million tokens cost today?

We checked each vendor's pricing page on 30 November 2026. These are selected standard rates in US dollars per million tokens. Each page lists more models, plus Batch rates. Prices change, so check the vendor page before you build a budget.

ModelInputCached inputOutput
Claude Haiku 5.5 (prompts up to 100,000 tokens)$0.10$0.01$0.50
Claude Sonnet 5.5$2$0.10$10
Claude Opus 5.5$4$0.20$20
OpenAI gpt‑6‑luna$0.10$0.01$0.50
OpenAI gpt‑6.2‑sol$2.00$0.10$10.00
OpenAI gpt‑6.2‑astra$8.00$0.40$40.00
Gemini 3.5 Flash‑Lite$0.30$0.03$2.50
Gemini 3.8 Flash (through 31 December 2026)$0.75$0.075$3.75
Gemini 4 Carbon (through 30 November 2026)$2.00$0.10$10.00

Sources: Anthropic's pricing page, OpenAI's API pricing page and Google's Gemini API pricing page.

The OpenAI rows are the page's short context rates. Its long context rates are higher. The Gemini cached column is Google's context caching price. For Gemini 3.5 Flash‑Lite, Google also charges "$1.00 / 1,000,000 tokens per hour (storage price)" to keep the cache.

Why does the same text cost different amounts on different models?

Token counts are not the same across models. Anthropic's pricing page says the count for the same text depends on the tokenizer, the language and the kind of content.

The same page says newer Claude models, from version 4.7 on, switched to a different tokenizer, giving "approximately 30% more tokens for the same text". Compare costs using token counts from the model you plan to use, not from another model.

Long prompts can also change the rate. On Claude Haiku 5.5, Anthropic's page says "a request whose prompt is over 100,000 tokens pays higher prices": $0.50 input and $2.50 output per million.

OpenAI's page lists separate, higher long context rates. For gpt‑6‑luna, long context input is $0.20 instead of $0.10. Anthropic's page keeps Claude 4.6 and newer models, Haiku 5.5 excepted, on standard rates across the whole 1M token context window.

Worked example: what does a support bot cost per month?

Here is a small help desk bot. The numbers are our assumptions, not vendor figures:

That is 35 million input tokens (10,000 x 3,500) and 3 million output tokens (10,000 x 300) a month.

Without caching, multiply each meter by its rate and add them.

ModelSumPer month
Claude Haiku 5.535 x $0.10 + 3 x $0.50$5.00
OpenAI gpt‑6‑luna35 x $0.10 + 3 x $0.50$5.00
Gemini 3.5 Flash‑Lite35 x $0.30 + 3 x $2.50$18.00
Claude Sonnet 5.535 x $2 + 3 x $10$100.00

With caching on the 3,000 token fixed prompt, assume 1 request in 10 finds the cache expired and writes it again. That gives 1,000 writes and 9,000 cache reads.

On these rates, Claude Haiku 5.5 and gpt‑6‑luna tie as the cheapest of the four models in this example. Each costs about $31.74 a year with caching (12 x $2.645). Sonnet 5.5 costs $602.40 a year (12 x $50.20).

Price says nothing about answer quality. Run the cheapest options on 50 of your real tickets before you choose. Our guide on what to automate in customer support helps you pick which tickets to try first.

How does prompt caching cut the bill?

Caching stores the fixed start of your prompt so later requests read it at a lower rate. Each vendor runs it a little differently.

Anthropic. The prompt caching docs give two ways to turn it on: "a single cache_control field at the top level of your request", or cache_control placed on individual content blocks. They say "By default, the cache has a 5‑minute lifetime" and "The cache is refreshed for no additional cost each time the cached content is used".

The same docs say "Cache write tokens with a 5‑minute TTL are 1.25 times the base input tokens price". The pricing page puts cache reads at "0.1x base input price on most models", and 0.05x on Opus 5.5 and Sonnet 5.5.

Anthropic's pricing page says a 5‑minute cache pays for itself "after one cache read". The docs set a 512 token minimum cacheable length on the Claude API for several models, including Sonnet 5.5 and Haiku 5.5.

OpenAI. The prompt caching guide says "Prompt caching is enabled by default for supported OpenAI models". It also says "The minimum cacheable prompt length is 1,024 tokens for GPT‑5.6 and later and varies by request settings for earlier models".

For GPT‑5.6 and later, the guide puts writes at 1.25 times the normal input rate for the default 30 minute lifetime. It adds: "Cache‑write pricing is not an additive fee". Reused tokens are "discounted up to 95%".

The guide's advice: "Put stable developer instructions and shared reference material first". Anthropic's caching docs likewise describe the API resuming "from specific prefixes in your prompts".

Google. Gemini 3.5 Flash‑Lite lists a $0.03 caching price plus hourly storage. Keeping 3,000 tokens stored for a 30 day month costs 0.003 x $1.00 x 720 hours = $2.16. For Gemini 4 Carbon, the page says "Implicit caching only (explicit caching is not supported)".

Which discounts and surcharges change the price?

Batch work is cheaper when you can wait for answers. Anthropic's Batch API comes "with a 50 percent discount on both input and output tokens". Google's paid tier lists "Batch API (50% cost reduction)".

OpenAI's pricing page lists eligible background requests at 30% below Standard for a 2 hour completion window, and 40% below for an 8 hour window. OpenAI's page names GPT‑6 Luna, GPT‑6.1 Terra and both GPT‑6.2 models, Astra and Sol, for this discount.

A live support chat cannot wait hours, so batch fits side jobs. Examples are nightly ticket tagging or weekly summaries.

Where your data is processed can add cost. Anthropic's pricing page says US‑only inference on Claude 4.6 and later "incurs a 1.1x multiplier on all token pricing categories". It adds that whether the multiplier applies "depends on the platform".

OpenAI's page says "Regional processing (data residency) endpoints are charged a 10% uplift for models released on or after March 5, 2026". Anthropic's pricing page adds that its caching multipliers "stack with other pricing modifiers, including the Batch API discount and data residency".

What price changes should you watch right now?

Several prices on these pages carry dates. On 30 November 2026 we saw these:

On Google's page, Gemini 4 Carbon input and output rates double on 1 December 2026. Put the price date in your budget sheet.

How do you estimate your own API bill?

  1. Take 20 real requests and count their tokens with the vendor's own counter. Anthropic's pricing page points to its Token counting tool for this.
  2. Split each request into the fixed part (instructions, FAQ) and the changing part (customer message, history).
  3. Multiply by your monthly volume, then price input, cached input, writes and output on two or three models.
  4. Put the fixed part first and check it passes the vendor's minimum cache length.
  5. Test answer quality on the cheapest option, then recheck prices on the day you launch.

For the wider choice of vendor and plan, see how to choose an AI tool for your business.

What can the API see, and how do you limit it?

Everything you put in a prompt is sent to the vendor. For a support bot that means customer messages, order details and anything your FAQ contains.

Read each vendor's data terms for the tier you use. Google's pricing page shows the free tier card saying "Content used to improve our products". Its paid tier card says content is not used to improve its products.

Limit what the bot can reach. Send only the ticket fields it needs, leave out payment card and ID numbers, and keep your API key on your server, never in a web page. Our guide to protecting customer data when your team uses AI has a fuller checklist.

If you want to see how other builders use these APIs, see today's agent skills and AI videos in the feed. Scroll AI Now is a free learning feed, not an API vendor.

Questions

How many words are in a token?

No single number applies. Anthropic's pricing page says the count depends on the model's tokenizer, "the language, and the type of content", so count your own text with the vendor's counter.

Why is output more expensive than input?

Vendors set separate rates, and on every model we listed the output rate was at least 5 times the input rate. Short replies and a word limit in your instructions keep this meter down.

Is prompt caching automatic?

OpenAI's guide says "Prompt caching is enabled by default for supported OpenAI models". Anthropic's docs say you turn it on with "a single cache_control field at the top level of your request", or with cache_control on individual content blocks.

Is there a free AI API?

Google's Gemini pricing page lists a free tier for Gemini 3.8 Flash and Gemini 3.5 Flash‑Lite. The same page says free tier content is used to improve Google's products, so keep customer data off it.

Do batch requests cost less?

Yes, if you can wait. Anthropic's pricing page lists a 50 percent discount on Batch API input and output, and Google's page lists a 50% cost reduction. OpenAI's pricing page lists background request discounts of 30% or 40% for some models.

Try it in your browser

Today's AI news, one card per swipe.
Free to start.

Open the web app