Why the bill is not in words
Models do not read letters or words. Text is cut into tokens: chunks that are often a whole common word, sometimes a fragment, sometimes a single character. unbelievable might become un, bel, iev, able. A space usually travels with the word that follows it. Punctuation is often its own token.
The rules of thumb, for English:
1 token ~= 4 characters ~= 0.75 words
1,000 tokens ~= 750 words ~= 1.5 pages of prose
1,000,000 tokens ~= a 3,000-page bookThese are averages and they hold well for ordinary English prose. They hold badly for code, for tables of numbers, and for anything that is not English.
Input and output are priced differently
This is the part people miss and it changes decisions.
Output tokens typically cost three to five times input tokens. The reason is mechanical: input can be processed in parallel in one pass, while each output token has to be generated one at a time, each one requiring a full pass through the model.
a model at $3 per million in, $15 per million out
reading a 50-page report (30k tokens) and writing 300 words (400 tokens)
input 30,000 / 1,000,000 x $3 = $0.090
output 400 / 1,000,000 x $15 = $0.006
-------
$0.096
writing a 5,000-word article from a short brief
input 200 / 1,000,000 x $3 = $0.0006
output 6,700 / 1,000,000 x $15 = $0.100Almost the same price, opposite shapes. If your work is reading long things and answering briefly, you are buying input and should care about input price. If it is generating long documents, output price is your bill. Comparison pages that quote one number are quoting the wrong one half the time.
Thinking tokens are output tokens
A thinking-mode reply generates hidden reasoning before the visible answer, and that reasoning is billed at the output rate. A 300-word answer preceded by 4,000 words of thinking costs roughly fourteen times the answer alone. This is the single largest surprise on API bills, and it is invisible in the chat window.
Non-English text costs more
Tokenisers are fitted mostly to Latin-script text. The same meaning in Devanagari, Bangla, Thai, Amharic or Georgian can take two to four times as many tokens, because the tokeniser has to fall back on shorter pieces.
Three consequences at once: you pay several times more for the same content, you fit proportionally less into the context window, and generation takes longer because there are more tokens to produce. Chinese and Japanese sit in between: dense in characters, and many characters are single tokens.
This is a real and rarely acknowledged inequity in how these systems are priced, and it is worth knowing about rather than being puzzled by a bill.
Counting them yourself
You do not have to estimate. Every API response reports exactly what you used:
r = client.chat.completions.create(model=M, messages=msgs)
print(r.usage.prompt_tokens, r.usage.completion_tokens)For counting before you send, the free tiktoken library counts for OpenAI-family tokenisers, and transformers loads the tokeniser for any open model:
import tiktoken
enc = tiktoken.get_encoding("o200k_base")
len(enc.encode(open("contract.txt").read())) # exact, before you spendSeveral providers also offer a free token-counting endpoint. Run your own text through one once, in your own language. The number tells you more about your future bills than any pricing page.
What a context window costs you per turn
One arithmetic worth doing once. A model with a 200,000-token window, filled, costs 200,000 input tokens on every single request that uses it. At $3 per million that is $0.60 a message, and a twenty-message conversation over that document is $12 before the model has written a word.
This is why long-context work is where people’s API bills go, and why the fix is almost never a cheaper model. It is sending less: extract the relevant sections, start fresh conversations, and let prefix caching cover the part that has to be resent every time.
The one to hold on to
Cost is driven by three things in this order: how much you send, how much you ask it to write, and which model you send it to. Not by how hard the question is. A one-line question with a 300-page attachment costs a hundred times a difficult question typed on its own, and that ordering surprises almost everyone the first time they see their own numbers.
Every lesson here is open. Your progress is recorded once you pass the AI at Work exam.
Check your understanding
Two jobs on the same model: reading a 50-page report and replying in 300 words, or writing a 5,000-word article from a two-line brief. Why do they cost about the same?
Pick the one you would defend. Your answer stays private.
Stuck on something?Ask Rukmini, your AI tutor