If you use an AI model through an API, or you build a product on top of one, three terms decide almost everything: tokens, context windows and prices. They sound technical, but the ideas are simple, and understanding them stops you from being surprised by a bill or a limit.
Tokens are not words
A model does not read words. It reads tokens, pieces of text that it learned to treat as units. A short common word is usually one token. A longer or rarer word is split, so a word like unbelievable may become two or three. Punctuation, numbers and even a leading space can be tokens of their own. For ordinary English, one token is about four characters or three quarters of a word, so 1,000 tokens is roughly 750 words and a 500-word page is about 650 to 700 tokens.
Other languages and code usually need more tokens for the same meaning. Text in Bengali, Hindi, Arabic and many Asian languages is often split into smaller pieces, and long numbers, URLs and symbols split into many small tokens. Measure real examples with the AI token counter instead of trusting a rule of thumb, and use the words to tokens converter for quick planning.
The context window is the model’s working space
Every model can consider only a limited amount of text at once, called its context window. Your instructions, any documents you paste, the conversation so far and the answer it writes all have to fit inside. A window of 128,000 tokens holds roughly 96,000 English words, around 190 pages. The context window checker tells you which models your text fits, and reserves room for the reply.
Fitting is not the same as working well. Details buried in the middle of a very long input can be missed, answers get slower and each request costs more. When you can, send only the relevant sections and put your question at the end.
How pricing works
Providers charge per token, usually quoted per million, and they charge separately for input and output. Output costs more, because generating text takes more computing work than reading it. The cost of a request is the input tokens divided by a million, times the input price, plus the output tokens divided by a million, times the output price.
A worked example with made-up prices
The prices here are invented round numbers for illustration, not any provider’s real rates. Suppose input costs 1 dollar per million tokens and output costs 4. A support chatbot sends 1,500 tokens and gets 400 back. That is 0.0015 plus 0.0016, about 0.0031 dollars per request. At 2,000 requests a day, it comes to about 6.20 dollars a day. A summariser that sends 6,000 tokens and gets 300 back costs about 0.0072 per request, and 500 requests a day is about 3.60. The shapes are different, but the method is the same, and the AI API cost calculator does it for you and can compare two models side by side.
Why real bills run higher
- Chat history is resent. A chat model has no memory, so every new message carries the earlier ones, and the input of a long conversation keeps growing.
- System prompts are charged on every request, however long they are.
- Retries and errors still use tokens.
- Images, search and tool calls may have their own charges.
- Development and testing use tokens before launch.
Add a margin of 30 to 50 percent to a first estimate, then replace it with real figures after a week of use.
Ways to spend less
- Use the smallest model that does the job well. Test a sample of real inputs on a small model first.
- Shorten the system prompt, since it is paid for on every request.
- Send only the part of a document that the question needs.
- Ask for short, structured replies.
- Look at discounts your provider offers for repeated prompt prefixes and for non-urgent batch work.
The AI model price comparison shows what your usage would cost on many models at once, and lets you edit the prices when a provider changes them.
Exact counts versus estimates
Each model family has its own tokenizer, so counts differ. The GPT token counter is exact for the encoding it uses, while the Claude token counter is an estimate, because Anthropic’s tokenizer is not available offline. For billing-accurate numbers, rely on the usage figures that your provider’s API returns with each response.
The short version
Count tokens before you send, make sure your text fits the window with room for a reply, price a typical request and multiply by your volume, then leave a margin. These four steps turn AI costs from a surprise into a number you can plan around.
Frequently asked questions
How many tokens is 1,000 words?
Roughly 1,300 to 1,400 tokens for typical English text. Other languages and code usually need more.
Why does a chat get more expensive as it goes on?
Earlier messages are sent again with every new one, so the input grows with the length of the conversation.
Are token counts exact?
Only when the tokenizer matches the model. Estimates can be off by ten to fifteen percent, so use the usage figures from your provider for billing.
Which model should I use?
The smallest one that does the job well. Test real examples on a small model first, and move up only where the quality is not good enough.