Tokens: How AI text is counted, and why API prices are quoted per million
A token is the small chunk of text an AI model reads and writes. APIs bill by the million tokens, and input, cached input and output each have a price. Here is how to read the table.

A token is the small chunk of text that a language model reads and writes. It can be a whole word, a piece of a word, a number or a punctuation mark. AI companies measure usage in tokens and bill by the million, which is why price tables show figures such as “$1.00 per million input tokens.”
That unit explains almost every line of an API price list, including the one in our report on OpenAI’s gpt-6.1-terra listing.
Turning a price table into the cost of one request
Take Terra’s standard rates from OpenAI’s pricing page, as we reported them: $1.00 per million input tokens and $5.00 per million output tokens. Suppose an app sends a prompt of 10,000 tokens and gets 1,000 tokens back.
- Input: 10,000 tokens is 1% of a million, so $0.01.
- Output: 1,000 tokens is 0.1% of a million, so $0.005.
- Total: $0.015, or about a cent and a half.
Output costs more per token because the model produces it one token at a time. In the listing we covered, output is priced at five times input for every model and tier shown.
The same request through the batch table, at half the standard rates, would cost $0.0075. These figures are illustrations built on the published rates, not measured bills.
Cutting text into reusable pieces
A model cannot read letters or words directly. It reads numbers. A tokenizer is a fixed lookup that turns text into a list of numbers and back again. Each number stands for one entry in the model’s vocabulary, a list of known text pieces.
Why not use whole words? Any list of words would miss new names, typos and technical terms. Why not single letters? Sequences would become very long, and long sequences are slow and costly to process. Tokens sit in between. Common words are often one token. Rare words are split into familiar parts.
OpenAI’s open-source tiktoken library gives a simple picture: a word like “encoding” might split into “encod” and “ing.” The library’s page says its method averages about 4 bytes of text per token. Real counts vary with language, spelling and formatting, so the only exact way to know is to run the tokenizer for the model you use.
Merging frequent pairs until a vocabulary emerges
Most modern tokenizers use a method called byte pair encoding, or BPE. The idea is easy to picture. Start with the smallest units, such as single characters or bytes. Look through a large body of text and find the pair that appears next to each other most often. Merge it into one new unit. Repeat thousands of times.
Early merges create pieces like “th” or “ing.” Later merges create whole common words. The process stops when the vocabulary reaches a chosen size.
According to the tiktoken page, this approach is reversible and lossless, so tokens convert back into the original text exactly. It also works on text never seen in training, because any text can fall back to smaller pieces.
From translation research to the billing unit
The technique has older roots in data compression. Its use for language models traces to a 2015 paper by Rico Sennrich, Barry Haddow and Alexandra Birch, “Neural Machine Translation of Rare Words with Subword Units,” first posted on arXiv on August 31, 2015 and presented at ACL 2016. Translation systems of that era had fixed word lists and struggled with new words.
The authors split rare and unknown words into subword units, including with BPE. On English-German and English-Russian translation tests (WMT 15), they reported gains of 1.1 and 1.3 BLEU points over a dictionary-based baseline. BLEU is a standard score for translation quality.
Subword tokenization then spread to language models in general. Today each vendor ships its own tokenizer, such as OpenAI’s o200k_base encoding in tiktoken. Because vocabularies differ, the same sentence can produce different token counts at different companies.
Why one price list has so many token rates
Providers price tokens differently depending on how they are used. The Terra listing shows several such lines:
- Input and output. Standard rates of $1.00 and $5.00 per million.
- Cached input. $0.05 per million for text the model has already processed, which is 5% of the input price. Our Terra report also notes cache writes at $1.25 or $2.50 per million, depending on how long the cache lasts.
- Batch. $0.50 input and $2.50 output, for work that does not need an immediate answer.
- Fast. $2.00 input and $10.00 output, which the page says was renamed from priority processing on July 30, 2026.
The same unit lets readers compare across the field. In our reporting, one provider listed $2 per million input tokens for Kimi K3.1 Pro through Vercel AI Gateway. Another, DeepSeek, quotes prices in yuan with peak and off-peak rates. Comparing them takes more care than reading two numbers.
Where token counts mislead
Tokens are not words, and they are not a measure of quality. A cheap model may need more tokens to reach an answer, and a pricey one may need fewer. Price per million says nothing about how well the answer is done.
Hidden usage can also surprise newcomers. System instructions, conversation history and tool results all count as input on every request. Long chats get costly because earlier turns are resent each time, which is the problem that caching tries to ease.
Some models also generate internal reasoning text before replying. Whether that counts toward billed output depends on the provider, so check its documentation.
Language matters too. A tokenizer trained mostly on English text may split other languages, code or unusual formatting into more pieces. The same meaning can then cost more. Always test with your own material.
What to watch when prices change
Three things are worth tracking. First, vocabulary changes: a new model with a new tokenizer can change the bill for the same text without any change in the listed rate. Second, new tiers and discounts, since the gap between standard, batch, fast and cached rates now often matters more than the headline price. Third, missing details. OpenAI’s page, as we reported, gives prices for Terra but no context window, benchmarks or release date, so the price alone does not show what the model can do.
For budgeting, a practical habit is to count tokens on a sample of real requests with the provider’s own tokenizer, then multiply by the published rates for each tier.
Sign Up for the Daily AI Pulse
One email a day. All the stories that matter.
By signing up, you agree to our Terms of Use and acknowledge the data practices in our Privacy Policy. You may unsubscribe at any time.
Daniel ReedAI Research, Safety & Ethics AnalystDaniel Reed currently works as an AI Research, Safety & Ethics Analyst at Aiholics, writing about how changes in artificial intelligence are affecting and will affect scholarship,…
You may also like

Gemini 4 Argon is open to developers, at $2 per million input tokens

Nvidia’s 120B Super VL agent model has open weights and costs $0.10 per million tokens

Mixture of experts: How a huge model uses only a small part of itself per token
