Token Cost
Token cost is the usage-based price of calling a large language model (LLM) through an API. Providers bill by the number of tokens the model reads (input) and writes (output), usually quoted in US dollars per million tokens, with separate rates for each.[1][2][3] Prompt caching, batch processing and choosing a cheaper model tier can lower it.[1]
What does Token Cost mean in simple terms?
When you call an LLM API, text is split into small pieces called tokens, and you pay for every token. Input tokens (your instructions, documents and chat history) and output tokens (the answer the model writes) have different prices. Output usually costs more: at current list prices it is about five times the input rate on Anthropic's Claude models and five times on OpenAI’s GPT-6.1 Sol at its standard short-context rate.[1][2] Some providers also bill a model's internal "thinking" as output tokens.[3] If your API bill keeps growing faster than expected, start by looking at input, output and cached-input costs separately.
How can Token Cost be explained with an analogy?
It works like printer ink: you are not charged per page, but for the ink you actually use.
Where is Token Cost used?
Customer chat — Model choice sets the scale of the bill (illustrative calculation)
Assume a hypothetical support chatbot handles 10,000 conversations a month, each using about 3,000 input tokens (instructions, retrieved help articles, history) and 700 output tokens. That is 30 million input and 7 million output tokens. At Anthropic's list prices on 2026-10-14, this would cost about $6.50 on Claude Haiku 5.5 ($0.10 / $0.50 per million tokens for prompts up to 100,000 tokens), about $130 on Claude Sonnet 5.5 ($2 / $10) and about $260 on Claude Opus 5.5 ($4 / $20).[1] The traffic is the same, but the bill differs by a factor of about 40.
Result: About $6.50 vs $130 vs $260 per month for the same hypothetical traffic (list prices, no caching).[1]
Agent sessions — Cached context lowers the input bill
Agents call the model many times per task, and each step resends the instructions and earlier results as input. Anthropic's pricing page gives a worked example: a one-hour Claude Managed Agents session on Claude Opus 5.5 with 50,000 input and 15,000 output tokens costs $0.58, including $0.08 of session runtime. If 40,000 of those input tokens are cache reads, the total falls to $0.428.[1] A cache read costs 0.1 times the base input price on most Claude models (less on some newer ones). A five-minute cache write costs 1.25 times and pays off after one read; a one-hour write costs 2 times and pays off after two reads.[1] Anthropic also recommends routing simple steps to Haiku and saving Opus for the hardest reasoning.[1]
Result: $0.58 → $0.428 per session in Anthropic's worked example (about 26.2% lower).[1]
A large fixed document — One developer's caching estimate
A developer reported sending about 81,000 tokens of unchanging video metadata with every request to a YouTube analytics bot on Claude. By his own calculation, prompt caching cut the cost per request from about $0.24 to $0.024; at 100 requests a day that would mean about $720 versus $72 a month, though he notes he does not use the tool that often.[5] OpenAI applies caching automatically to prompts of at least 1,024 tokens on supported models that share a prefix; at launch in 2024 the discount was 50%,[4] it rose to 75% for GPT-4.1,[7] and the current standard short-context price for GPT-6.1 Sol lists cached input at one twentieth of the normal input price.[2] Caching works best when a long instruction or document stays exactly the same across many requests.
Result: About 90% lower cost per request in this individual developer's estimate ($0.24 → $0.024).[5]
Language and tokenizer — The same text, a different token count
How many tokens a sentence uses depends on the model's tokenizer, the language and the type of content.[1] A Samsung SDS insight article notes that Korean text is generally split into more tokens than English because many tokenizers were trained mostly on English data, although newer models are narrowing the gap.[8] Tokenizers also change between model generations: Anthropic states that Claude 4.7 and later models produce about 30% more tokens for the same text than earlier models.[1] Teams serving Korean, Japanese or other non-English users should measure token counts on their own text rather than assume English ratios.
Result: About 30% more tokens for the same text on Claude 4.7 and later models (Anthropic).[1]
Try it today
- For the model you use most, write down the input, output and cached-input prices from the provider's official pricing page, with the date you checked.[1][2][3]
- From last week's API logs, take the average input and output tokens per call and decide whether your costs are driven mainly by input or by output.
- Find long instructions or documents that repeat across calls and check them against each provider's minimum cacheable length (for OpenAI, 1,024 tokens).[4]
- Run five real requests on a cheaper tier (such as Haiku or a Flash model) and compare quality, then set a simple routing rule.[1][3]
- Decide whether non-urgent work such as overnight jobs can move to a Batch API, which Anthropic, OpenAI and Google price at a 50% discount.[1][2][3]
Limits and direction
List prices change often. OpenAI's gpt-4o-2024-08-06 cut prices by 50% on input (to $2.50 per million tokens) and 33% on output (to $10) compared with the May 2024 GPT-4o release,[6] and GPT-4.1 launched in April 2025 at $2 / $8.[7] Anthropic's Opus models went from $15 / $75 (Opus 4 and 4.1) to $5 / $25 (Opus 4.5 to 4.8) and $4 / $20 (Opus 5.5).[1] Google lists Gemini 3.8 Flash at $0.75 / $3.75 through December 31, 2026, doubling from January 1, 2027.[3] An a16z analysis estimated in 2024 that the cost of an LLM at a given performance level was falling about tenfold a year, while noting the method is imperfect.[9] When you prepare a budget or purchase order, record the date, model and tier you priced.
Tokens are not the only line item. Tool definitions and tool results add input tokens, web search is charged per search (for example, $10 per 1,000 standard web-search calls on Anthropic and OpenAI, with additional token charges depending on the service), and US-only data residency on recent Claude models adds a 1.1x multiplier.[1][2] Claude Haiku 5.5 charges higher rates for prompts over 100,000 tokens.[1]
Three trends stand out. First, operating discounts are becoming standard: Anthropic's cache and batch discounts stack,[1] and OpenAI applies caching automatically without code changes.[4] Second, providers offer clear model tiers (Haiku, Sonnet and Opus; Astra, Sol and Luna; Flash and Pro) with large price gaps, so sending simple work to cheaper tiers and reserving expensive tiers for hard decisions can be a useful routing strategy.[1][2][3] Third, tokenizers differ by language and model generation, so a model upgrade can change your token count as well as your price per token.[1][8]
Which concepts are related to Token Cost?
- Related conceptPrompt VersionOften discussed alongside token cost in prompt and AI-usage work.
- Related conceptPrompt LibraryOften discussed alongside token cost in prompt and AI-usage work.
- Related conceptPersona PromptingOften discussed alongside token cost in prompt and AI-usage work.
Which sources explain Token Cost?
- Anthropic — Pricing, Claude Platform Docs (accessed 2026-10-14) — https://platform.claude.com/docs/en/about-claude/pricing
- OpenAI — API Pricing (accessed 2026-10-14) — https://developers.openai.com/api/docs/pricing
- Google AI for Developers — Gemini Developer API pricing (accessed 2026-10-14) — https://ai.google.dev/gemini-api/docs/pricing
- OpenAI — Prompt Caching in the API (2024-10-01) — https://openai.com/index/api-prompt-caching/
- Du'An Lightfoot (Medium) — Prompt Caching is a Must! How I Went From Spending $720 to $72 Monthly on API Costs (2025-09-04) — https://medium.com/@labeveryday/prompt-caching-is-a-must-how-i-went-from-spending-720-to-72-monthly-on-api-costs-3086f3635d63
- OpenAI — Introducing Structured Outputs in the API (2024-08-06) — https://openai.com/index/introducing-structured-outputs-in-the-api/
- OpenAI — Introducing GPT-4.1 in the API (2025-04-14) — https://openai.com/index/gpt-4-1/
- Samsung SDS Insight Report (IDG reprint) — ChatGPT vs Claude: why the same question costs differently (2026-04-27) — https://www.samsungsds.com/kr/insights/understanding-tokenization-and-consumption-in-llms.html
- Andreessen Horowitz — Welcome to LLMflation: LLM inference cost is going down fast (2024-11-12) — https://a16z.com/llmflation-llm-inference-cost/
Tell us what you think
Your feedback helps us improve the content.