explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

custom AI agents

[email protected]

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource librarydemofor LLMs

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

More from us

InfloqInfluencer marketingBgBlurPrivacy-first blurOlly SocialSocial AI copilotCeptoryVideo intelligenceBgRemoverBackground removal

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportprivacytermsdata rightssubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • The base formula
  • What is a token?
  • Why output costs more
  • Four meters hidden behind “input” and “output”
  • Context caching with worked math
  • Agents multiply the meter
  • Tool fees are not always tokens
  • Batch, priority, and service tiers
  • Long-context tiers
  • Subscription price versus API tokens
  • Five ways bills surprise teams
  • Build a cost dashboard that matters
  • A procurement example
  • Bottom line
  • A five-minute bill audit
  • Related on explainx.ai
← Back to blog

explainx / blog

AI Token Pricing, Explained Without the Pricing-Page Fog

Learn how AI input and output token pricing works, why output costs more, context caching, reasoning tokens, tool fees, and real bill formulas.

Jul 26, 2026·8 min read·Yash Thakker
AI PricingTokensContext CachingAPI CostsAI Fundamentals
go deep
AI Token Pricing, Explained Without the Pricing-Page Fog

An AI price card might say $5 input / $30 output per million tokens. That does not mean a request costs $35. It means each part of the request is metered separately, and the expensive part depends on how much text the system processes, generates, repeats, reasons over, and sends to tools.

Token pricing looks like a software unit. Underneath it are accelerators, memory bandwidth, batching, networks, buildings, electricity, engineering, and provider margin. This guide explains the meter without requiring you to become an infrastructure accountant.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

The base formula

For a simple request:

text
cost = (input tokens / 1,000,000 × input price)
     + (output tokens / 1,000,000 × output price)

If a model charges $5/M input and $30/M output, a request with 10,000 input tokens and 2,000 output tokens costs:

text
input:  10,000 / 1,000,000 × $5  = $0.05
output:  2,000 / 1,000,000 × $30 = $0.06
total:                                  $0.11

The output is one-fifth the token volume but more than half the bill.

What is a token?

A token is a chunk produced by a model-specific tokenizer. It can be a word, part of a word, punctuation, whitespace, code fragment, or byte pattern. One English word is not always one token. Other languages, unusual identifiers, tables, and encoded data can tokenize very differently.

Do not budget from page count alone. Use the tokenizer or usage field for the actual model. The same text can produce different counts after a provider changes model family.

Input tokens can include far more than what a user typed:

  • system and developer instructions;
  • conversation history;
  • retrieved documents;
  • tool descriptions and schemas;
  • images or audio converted into model units;
  • application metadata;
  • examples and formatting constraints.

Output can include visible text, structured JSON, code, tool arguments, and sometimes hidden reasoning tokens.

Why output costs more

During input processing, hardware can calculate many prompt positions in parallel. During generation, each next token depends on the tokens before it. The model repeatedly loads state and computes one step, occupying scarce serving capacity until it stops.

Providers therefore price output throughput higher. They also price commercially, not just physically: generation is where customers perceive value, high output reserves capacity, and different service tiers carry different margins.

The operational lesson is simple. A concise answer limit can save more than trimming a few prompt sentences. Ask for the format you need, not “everything you know.”

Four meters hidden behind “input” and “output”

Uncached input

New tokens processed at the standard input rate.

Cached input

Repeated prefixes eligible for a discount. OpenAI and other providers publish separate cached-input rates for some models. A cache hit is usually based on exact or provider-defined prefix matching; similar meaning is not enough.

Cache writes

Some providers charge extra to create a cache, with different prices for short and long retention. Anthropic, for example, documents write multipliers and discounted cache reads. Caching pays only when the prefix is reused enough times before expiration.

Output and reasoning

Visible output is billed at the output rate. Reasoning models may consume additional internal tokens. The usage object—not the visible character count—is authoritative.

Context caching with worked math

Suppose 1,000 daily requests share a 40,000-token handbook and add 2,000 unique tokens. Each returns 1,000 output tokens. Assume:

  • Standard input: $5/M
  • Cached input read: $0.50/M
  • Output: $30/M

Without caching:

text
42,000 × 1,000 = 42M input tokens → $210
1,000 × 1,000 = 1M output tokens → $30
daily total = $240

With a successful cache after the first write, approximately:

text
40M cached tokens → $20
2M new tokens → $10
1M output tokens → $30
plus cache-write/retention cost
daily total before cache write ≈ $60

Caching can cut this workload by roughly 75%. If the handbook changes every request, traffic is low, or prefixes do not match, the saving disappears.

Our context-window pricing guide explains why an advertised one-million-token window can also trigger long-context price tiers and repeated-turn multiplication.

Agents multiply the meter

A chat request may be one model call. An agent task can be ten:

  1. Interpret task.
  2. Plan.
  3. Search.
  4. Read results.
  5. Call a database.
  6. Inspect output.
  7. Retry a failed tool.
  8. Draft.
  9. Verify.
  10. Revise.

If the full conversation and tool results are resent each time, input grows turn by turn. A 20,000-token starting context across eight calls is not 20,000 billable tokens. It can exceed 160,000 even before appended observations.

The complete formula is:

text
monthly cost = Σ all turns (
  uncached input × rate
  + cached input × rate
  + output/reasoning × rate
  + tool charges
) + storage + vector database + orchestration + compute

Our real monthly agent budget applies this to research, email, documents, and spreadsheet tasks.

Tool fees are not always tokens

Web search, code execution, file processing, image generation, embeddings, speech, and managed agent features may have separate meters. A search can be priced per call while retrieved text also becomes input tokens. A code sandbox may charge by session time. Vector databases charge storage and queries.

Read the price card for both model usage and built-in tools. A cheap model that makes twenty paid searches can cost more than a better model making three.

Batch, priority, and service tiers

Providers may discount asynchronous batch work because it can be scheduled when capacity is available. Priority or low-latency service may cost more. Reserved throughput trades commitment for capacity certainty.

Classify workloads:

  • Interactive: latency matters; standard or priority.
  • Background: hours are acceptable; batch.
  • Predictable high volume: compare reservations.
  • Spiky experiments: pay-as-you-go.

Do not pay interactive rates for an overnight classification job.

Long-context tiers

Some providers charge higher rates after a prompt crosses a threshold. A model with a one-million-token capacity may price inputs above 272,000 tokens differently, and the higher multiplier can apply to the full session rather than only tokens above the line.

This creates a cost cliff. Retrieving 250,000 relevant tokens may be much cheaper than sending 300,000 poorly filtered tokens, even before quality degradation. Capacity is a ceiling, not a target.

Subscription price versus API tokens

A $20 consumer subscription is not usually a bag of API credits. It bundles interface features and access subject to limits, fair-use controls, model availability, and changing policies. API use is separately metered.

For a professional doing interactive research and writing, a subscription can be cheaper and easier. For automation, integration, observability, and repeatability, API pricing applies. Compare them with our white-collar AI subscription guide.

Five ways bills surprise teams

1. Conversation history grows

A long chat resends earlier messages. Start a new thread or summarize state when old detail is unnecessary.

2. RAG retrieves too much

More documents can lower answer quality while raising input cost. Tune chunking, ranking, and top-k against citation accuracy.

3. Outputs are unbounded

Set useful maximums and schemas. Do not ask for ten alternatives if two enter the workflow.

4. Retries are invisible

SDKs, agents, or application logic may retry rate limits, invalid JSON, and tool failures. Attribute every call to the original task.

5. Reasoning is hidden from the UI

Visible output can be short while reasoning usage is large. Log provider usage fields and model tier.

Build a cost dashboard that matters

Track:

MetricReason
Input, cached input, output, reasoningExplains the invoice
Calls and tool calls per taskExposes loops
Cache hit rateValidates caching economics
Cost per accepted taskConnects spend to value
P50/P95 costFinds long-tail blowups
Human repair timePrevents shifting cost to labor
Model and prompt versionExplains changes
Customer/workflow allocationEnables budgets and pricing

Set a per-task cap and a monthly alert. An agent should stop or request approval before a retry cascade spends more than the task is worth.

A procurement example

Suppose 50 employees each complete 20 AI-assisted tasks per workday, 22 days a month. Each accepted task averages 30,000 uncached input, 10,000 cached input, and 3,000 output tokens on a $5/$0.50/$30 price card.

text
tasks = 50 × 20 × 22 = 22,000
input = 660M × $5/M = $3,300
cached = 220M × $0.50/M = $110
output = 66M × $30/M = $1,980
model total = $5,390/month

That is about $0.245 per task before tools and software. If the workflow saves five minutes of a $40/hour employee's time, gross labor value is $3.33 per task. If review takes six additional minutes, the economics reverse. Token cost is only useful beside outcome and labor.

Bottom line

Input pricing pays for what the model reads. Output pricing pays a higher rate for what it generates. Caching discounts repeated prefixes. Reasoning and tools can add meters you do not see in the answer. Agents repeat the entire equation across turns.

Budget at the task level, log the provider's usage object, and divide by accepted outcomes. Once you do that, a price card stops being marketing fog and becomes an engineering input.

A five-minute bill audit

Export one day of usage and choose ten representative tasks. For each task, group every model call under a single task ID. Add uncached input, cached input, output, reasoning, tool calls, and retries. Compare the provider usage record with your application log; a missing retry or tool call is a measurement bug.

Next, sort tasks by cost and inspect the top ten percent. Long tails usually reveal one of four problems: conversation history that never resets, retrieval returning too many passages, unbounded output, or a loop retrying without changing strategy. Fix that cause before negotiating a lower token rate.

Finally, attach an outcome. Mark whether the task was accepted and record human repair minutes. A workflow that costs $0.08 but consumes twelve minutes of repair is not cheaper than one that costs $0.40 and is ready in two minutes. This small audit converts a provider invoice into a product decision and gives finance, engineering, and users the same denominator.

Related on explainx.ai

  • OpenAI cuts GPT-5.6 Luna 80%, Terra 20% (Jul 30, 2026)
  • Context-window pricing, decoded
  • What an AI agent costs per month
  • The $600/day AI agent teardown
  • How AI agents work end to end
  • The model-selection energy math

Prices and billing categories vary by provider and change frequently. The formulas are evergreen; verify current model, cache, long-context, reasoning, tool, batch, and regional rates before committing spend.

Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Jul 31, 2026

DeepSeek-V4-Flash-0731: Codex Support and $0.14/$0.28 Pricing

DeepSeek-V4-Flash-0731 keeps the same architecture as the preview but ships a large agent-benchmark jump over V4-Pro-Preview, native Responses API format, and drop-in Codex support — undercutting GLM 5.2 and GPT Luna on price.

Jul 28, 2026

What Is an Embedding? Plain-English Examples (2026)

Stop thinking of embeddings as a black-box API call. This guide shows what an embedding actually is, walks through concrete text examples, and includes an interactive demo that compares semantic ranking to naive keyword overlap.

Jul 26, 2026

Context Window Pricing, Decoded

A context window is a capacity limit, not a flat-price bucket. This technical explainer shows what gets resent each turn, how cumulative input grows, and when caching or compaction changes the bill.