AI API Billing Units: 17 Meters from Tokens to PTU-Hours
Contents
AI APIs meter usage in at least 17 distinct units: text tokens, reasoning tokens, cached tokens, media-input tokens, realtime audio tokens, characters, minutes and seconds of media, output objects, requests, pages, GPU-seconds, container-hours, GB-days, token-hours, PTU-hours, training tokens, and synthetic credits. Anyone estimating the cost of a product that touches more than one modality has to convert between several of them, and the conversion rules are where budgets go wrong. This page is a field guide: every unit, how it is metered, and the gotcha attached to it.
TL;DR
- AI APIs bill in at least 17 distinct units across four layers: consumption, time and capacity, rate modifiers, and synthetic wrappers.
- One audio minute bills two ways: $0.0020 to $0.0164 per audio-minute on dedicated transcription, or 1 audio token per 100 ms heard on gpt-realtime-2.1.
- Storage alone has two meters: OpenAI file search bills $0.10 per GB-day; Gemini context caching bills $0.50 per million tokens per hour.
- Modifiers change rates, not units: batch is half price, DeepSeek off-peak halves again, US-pinned Claude inference costs 1.1x.
What units do AI APIs bill in?
Seventeen, in the order the sections below follow: consumption units (1 to 10), time and capacity units (11 to 16), and synthetic wrappers (17), plus a modifier layer that changes rates without changing units. The table is the reference; each row links the deep dive.
| # | Unit | Where it appears | The gotcha |
|---|---|---|---|
| 1 | Text tokens | Every chat API | Same text, different counts per tokenizer; about 30% more tokens from one tokenizer generation to the next |
| 2 | Reasoning tokens | Thinking models | Billed as output you never see; 88 to 99.3% of some answers |
| 3 | Cached tokens | Prompt caching | Write premium by TTL, read discount, per-provider minimums |
| 4 | Media-input tokens | Vision, audio, PDF input | Three conversion schemes for one image; PDFs bill at image rates |
| 5 | Realtime audio tokens | Speech-to-speech | 1 token per 100 ms heard, 1 per 50 ms spoken |
| 6 | Characters | TTS, guardrails | Chinese speech costs 3 to 7x less than English per audio-minute |
| 7 | Media minutes/seconds | STT, video and music generation | 8x price spread per audio-minute across models with near-equal accuracy |
| 8 | Output objects | Image generation, human eval | A quality knob swings one image 36x at identical resolution |
| 9 | Requests | Web search, grounding, file search | $0.01 per search plus injected tokens at the model’s input rate |
| 10 | Pages | OCR, document AI | Mistral bills per 1,000 pages with batch and cache discounts on top |
| 11 | GPU-seconds | Serverless model hosts | Rate depends on the card, $0.000225/s (T4) to $0.001525/s (H100) |
| 12 | Container/session-hours | Code execution, managed agents | 5-minute minimum, files preload billing even if the tool never runs |
| 13 | GB-days | File and vector storage | $0.10 per GB-day after the free gigabyte |
| 14 | Token-hours | Context-cache storage | Gemini bills $0.50 per million tokens per hour, doubling in 2027 |
| 15 | PTU/model-unit hours | Provisioned capacity | Cached tokens consume no capacity; output weighs more than input |
| 16 | Training tokens | Fine-tuning | Epochs multiply the bill; some models bill $100 per hour instead |
| 17 | Credits/CCUs | Marketplaces, subscriptions | A scalar over the real rate card; 100 CCU = $1.00 on AWS Marketplace |
Which units count what you consume?
Ten of the seventeen are consumption units: the meter ticks when you use the service, and each modality picked a different thing to count.
The token family (units 1 to 5). Text tokens are the anchor, but they are not one unit: tokenizers differ per model family, so the same text bills different counts, and Anthropic documents that its 4.7-and-later tokenizer produces about 30% more tokens for the same text than the previous one. Reasoning tokens are output tokens you usually cannot read; we measured 81 billed tokens for a 10-token answer, 88% of it reasoning. Cached tokens price by operation and cache lifetime (TTL): on the Claude API a 5-minute cache write costs 1.25x base input, a 1-hour write 2x, and a read 0.1x. Media inputs convert to tokens by provider-specific formulas: one 1024x1024 image bills 693, 1,089, and 1,372 tokens on GPT-5.6, Gemini, and Claude respectively; Gemini rates audio at 25 tokens per second and 720p video at 5,792 tokens per second and bills PDFs at the image token rate. Realtime speech has its own token: gpt-realtime-2.1 bills exactly 1 audio token per 100 ms of user speech and 1 per 50 ms of model speech.
Characters and time (units 6 and 7). Text-to-speech (TTS) bills per character (OpenAI lists $15 to $30 per million characters), which is why spoken Chinese costs 3 to 7x less than English per audio-minute: the same speaking time consumes fewer characters. Bedrock’s guardrails define their own character unit, a “text unit” of up to 1,000 characters. Dedicated transcription models bill per audio-minute, $0.0020 to $0.0164 across the models we measured; video generation bills per second by resolution; Gemini prices music per song.
Objects, requests, and pages (units 8 to 10). Image generation bills per image by tier or per output token, and the two cross over: per-token wins below about 1,000 output tokens, flat per-image wins above. Server-side tools bill per request: web search costs $0.01 per search on the three surfaces we measured, and the results then bill again as input tokens (1,500 to 3,100 per search). Gemini’s search grounding (letting the model query Google Search mid-request) adds a quota shape: 5,000 free requests per month, then $14 per 1,000. OCR bills per page. Bedrock’s model evaluation bills $0.21 per completed human task, the only unit in this zoo denominated in people.
Which units rent time or capacity instead?
Six units bill for holding resources, whether or not tokens flow. This layer is where cost estimates miss hardest, because the meter runs while your code does nothing.
- GPU-seconds. Serverless hosts bill model runtime by hardware class: on Replicate, a T4 costs $0.000225 per second and an H100 $0.001525. The unit prices the card, not the output.
- Container and session hours. Anthropic’s code execution bills $0.05 per container-hour beyond 1,550 free hours a month, with a 5-minute minimum per execution; OpenAI’s code interpreter bills per 20-minute session, priced by memory size, $0.03 for 1 GB up to $1.92 for 64 GB. Claude’s managed agents bill $0.08 per session-hour, metered to the millisecond and only while running.
- GB-days and token-hours. Two storage meters for the same idea. OpenAI file search storage is $0.10 per GB-day with 1 GB free; Gemini explicit context caching bills storage at $0.50 per million tokens per hour, rising to $1.00 in 2027. A cache you forget to delete is a subscription you did not know you had.
- PTU-hours and model units. Provisioned capacity bills per unit-hour regardless of traffic. Azure’s provisioned throughput units (PTUs) are model-independent quota with per-model minimum deployment sizes; output tokens consume more capacity than input tokens, and cached tokens consume none, so a high cache-hit rate shrinks the PTU count you need. Bedrock sells the same shape as model units with 1-month or 6-month commitments.
- Training tokens. Fine-tuning bills per token of training data multiplied by epochs, except where it bills wall-clock: some OpenAI models list $100 per training hour.
What changes the rate without changing the unit?
Seven things change the price of a unit without touching the unit itself: batch tier, service tier, clock time, context length, geography, quality knobs, and free quotas. Billing code that stores one price per model gets every one of these wrong, because the same token has different prices depending on how, when, and where it is processed.
| Modifier | Effect | Example |
|---|---|---|
| Batch tier | 50% off input and output | Anthropic and OpenAI batch APIs; Mistral OCR too |
| Service tier | Premium for speed | OpenAI fast tier at 2x standard rates; flex tier discounted |
| Clock time | Off-peak discount | DeepSeek: off-peak is half of peak; peak is 01:00-04:00 and 06:00-10:00 UTC weekdays |
| Context length | Rate steps at a threshold | Gemini rates step above 200k prompt tokens; Claude 4.6+ is flat across the full 1M window |
| Geography | Residency premium | Claude inference_geo: "us" is 1.1x on every token category; regional endpoints for Claude models on Bedrock and Google Cloud carry a 10% premium over global |
| Quality knobs | Same unit, different burn | gpt-image quality swings 196 to 7,024 billed tokens for one 1024x1024 image |
| Free quotas | Rate cliff at a threshold | Grounding: 5,000 free requests/month; code execution: 1,550 free hours/month |
The multipliers stack. Anthropic documents that caching multipliers combine with the batch discount and the residency premium, so one cached, batched, US-pinned token carries three factors at once.
What are credits and CCUs?
They are synthetic wrappers over the real meters, used where invoicing needs one line item. When Claude bills through AWS or Azure Marketplace, usage is rated in dollars at the normal per-unit prices and then converted to Claude Consumption Units at 100 CCU per dollar; discounts show up as fewer CCUs metered, not a cheaper CCU. Subscription products run the same trick with credits, and the boundary can sit inside one company: ElevenLabs meters its subscription plans in credits while stating that API usage is billed in US dollars, not credits. When you see a synthetic unit, the question to ask is which consumption or capacity meter sits underneath it and at what conversion.
Which rounding rules and minimums bite?
These are the quantization rules, collected in one place because each one lives in a different document:
- Code execution containers bill a 5-minute minimum, and including files in a request bills execution time even if the tool is never called.
- Code interpreter sessions quantize to 20-minute blocks by RAM tier.
- Realtime speech quantizes to 100 ms heard / 50 ms spoken per audio token; 60 seconds of silence billed zero under server voice-activity detection (VAD), and cancelling a spoken answer 2 seconds in billed 4 seconds.
- Image generation with
n=4re-bills the prompt four times; there is no prompt caching on that surface. - Video tokens carry a +1 frame in the formula and encoded dimensions that differ from advertised ones: 720p bills as 1248x704.
- Prompt caches have per-provider minimum cacheable lengths; below the minimum you pay the write premium and cache nothing.
- Guardrails text units round up per 1,000 characters.
- Tool definitions bill as input before any call: Anthropic’s tool-use system prompt adds 286 to 804 tokens depending on model and tool choice, and a full computer-use toolset adds about 4,500.
How do you compare costs across units?
Normalize to dollars per user interaction, because that is the only unit every meter converts into.
Our voice-agent study did exactly this: a cascade stack billing audio-minutes (STT), tokens (LLM), and characters (TTS) came to $0.0037 to $0.025 per conversation-minute, against $0.057 for gpt-realtime-2.1 and $0.016 for its mini, which prices the realtime premium and its latency payoff in one comparable number. The procedure generalizes: pick the interaction (a support ticket, a document, a conversation-minute), meter each hop in its native unit, rate each at its current price, and only then compare. Comparing $/1M tokens to $/audio-minute directly is a category error; comparing $/interaction is arithmetic.
How a gateway normalizes the zoo
Synthorai’s answer is to rate at request time and keep the native unit alongside the dollars. Every request produces one usage record carrying the native meter readings (tokens by class, seconds, characters, request counts), the resolved price version, and the rated cost, so an invoice line can always be decomposed back into unit times rate. This is the same conversion a CCU does at the marketplace boundary, done per record and kept inspectable. It also composes with zero-retention mode: the usage record needs meter readings and a content hash, never the payload. When a price changes upstream, the price version pins which rate card each historical record was rated under, which is the property that makes month-end reconciliation an audit rather than an argument.
FAQ
Are audio tokens the same as text tokens?
No. Realtime audio tokens are a separate meter with separate prices: on gpt-realtime-2.1 one token covers 100 ms of speech heard or 50 ms spoken, which works out to $0.0192 per minute to listen and $0.0768 per minute to speak. The audio and text meters carry separate rate cards even inside one model.
Why does the same image bill different token counts on different providers?
Because the conversion scheme differs, not the image: patch formulas, capped tiles, and flat fees all coexist. One 1024x1024 image measured 693 tokens on GPT-5.6, 1,089 on Gemini, 1,372 on Claude, and file format or content never moved a single token.
Do cached tokens count as input tokens?
They are metered separately and priced by operation: cache writes carry a premium over base input (1.25x or 2x by TTL on the Claude API), reads a discount (0.1x). On provisioned capacity the distinction matters twice: cached tokens consume no PTU capacity, so caching reduces both the bill and the capacity you must reserve.
Is per-character or per-minute pricing cheaper for speech?
It depends on the language. Per-character TTS makes spoken Chinese 3 to 7x cheaper per audio-minute than English because Chinese packs more speech into fewer characters; per-minute pricing is language-neutral. For transcription the per-minute models we measured ran $0.0020 to $0.0164 per audio-minute with near-equal accuracy on clean speech.
Unit definitions and rates quoted from provider pricing pages fetched 2026-08-30, and from our own measured studies linked in place. Prices drift; unit structures drift slower, but check the linked source before wiring any number into billing code.
Related measured studies: token anatomy, prompt caching, cache minimums, image-input tokens, image generation, transcription, speech-to-text, realtime speech, video generation, web search, voice agents, tokenizers, cost by language.