Glossary · Definition
Tokens
Tokens are the chunks of text a language model reads and writes; they are how context limits are measured and how most model APIs are billed.
By Nythrex EngineeringUpdated 1 min read
In plain words
Models don’t process words but tokens — pieces of words, whole words or punctuation. Providers charge per million input and output tokens, usually with output costing more. The same text can take more tokens in some languages than in English.
When it matters to you
- Estimating API costs
- Designing prompts and retrieval
- Comparing models and providers
Common pitfalls
- Counting only the user’s message, not the whole prompt
- Forgetting output tokens are pricier
- Assuming token counts are identical across languages and models
Keep reading
Free toolLLM API cost calculatorEstimate the monthly cost of an LLM feature from requests, tokens, model price tiers and prompt caching. Free, in your browser, with your own prices.Guide11 ways to cut your LLM billLLM cost optimisation: prompt caching, model routing, shorter context, better retrieval, batching and budgets — checked against evals so quality holds.GlossaryContext windowThe context window is the maximum amount of text (measured in tokens) a model can consider at once — instructions, history, retrieved documents and its own a…GlossaryPrompt cachingPrompt caching lets a model provider reuse the processing of an identical prompt prefix across requests, reducing cost and latency for repeated content.
Want a second opinion on your project?
Tell us what you’re building and where you’re stuck. We’ll reply within one business day with the most practical next step — even if that step isn’t us.
