AI & LLM cost
Token
The basic unit of text an LLM API meters and bills by: roughly three to four characters of English text, not a whole word.
Last updated
Definition
Language models don't process raw characters or whole words; they process tokens, sub-word chunks produced by the model's tokenizer. Pricing, context-window limits, and usage reporting are all denominated in tokens, which is why the same sentence can cost measurably different amounts depending on language, formatting, or how much of it is code versus prose. Tokenizers split those differently.
Because token counts aren't intuitive from character or word counts alone, teams that want to predict cost accurately measure actual token counts on representative prompts rather than estimating from text length.
Where it shows up
Token counts appear directly in a model provider's API response, in a usage field reporting the input and output token counts for that specific request, and again in the provider's own console or usage dashboard, where they're the metering unit every published rate card is built around.
What makes it expensive
Estimating cost from character or word counts feels close enough, and it is not. A tokenizer splits prose, code, and other languages at different rates, so two texts of equal length can bill very differently. The API already returns a token count on every call. Measure a few representative prompts rather than reasoning about them.
Related
Token spend moves every day.
Model prices and rate limits change between invoices. CostMon tracks your AI spend daily, so a change shows up before the bill does.