A token is a chunk of text, an image, or a document page that a model converts into numbers before it reads it. Providers bill by tokens because tokens measure the work the model does. Input and output are counted separately, and the same text can produce different counts on different models.
What counts as input
Input is everything you send, not just the question. The system prompt counts. So do tool definitions, earlier turns of the conversation, images, and PDFs. A one line question with a long system prompt and ten tool schemas is mostly overhead, and you pay for that overhead on every request unless caching applies.
Provider documentation on token counting says the endpoint accepts the same structured input as a normal request, including system prompts, tools, images, and PDFs, and returns the total input tokens. That is a good hint about what the bill includes.
What counts as output
Output is what the model generates. If the model reasons before answering, those reasoning tokens are part of the output. The extended thinking documentation says the thinking_tokens field reports how many of the billed output tokens were internal reasoning. So a short visible answer can still be an expensive one.
Tool calls are output too. The model writes the function name and its arguments, and those tokens are billed like any other generated text.
Why input and output are priced apart
Providers publish one rate for input and a different one for output. In the batch pricing table I fetched, each model lists a higher rate for output than for input. Check the live pricing page for your model, because rates change and differ by model.
The practical lesson is that a long answer costs more per token than a long prompt. Asking for terse, structured output is one of the cheapest controls you have.
Counts are estimates until the bill
The token counting page says the count returned before you send a request is an estimate, and the actual number can differ by a small amount. Billing reflects the real request.
Counts also change between models. The same page notes that newer model generations use a different tokenizer, and the same text can produce roughly 30 percent more tokens than on earlier models. A price per million tokens is only comparable between models if you also compare how many tokens your workload produces. Recount your own prompts against the model you plan to use.
What to do with this
- Log input and output tokens for every call, from the usage object in the response.
- Track the share of output that is reasoning.
- Treat any pre-flight count as a forecast, and reconcile it against billed usage.
- Recount prompts whenever you change models.
Quick check
Is a token the same as a word?
No. A token is a piece of text that may be a whole word, part of a word, or punctuation. The exact split depends on the model's tokenizer, so word counts are only a rough guide.
Do reasoning tokens show up on the bill?
Yes. Provider documentation describes thinking tokens as part of the billed output tokens, even when you only see a summary of the reasoning.
Sources
Last reviewed: 19 October 2026.