Token Pricing
Also known as: token cost, LLM pricing, API token cost, prompt tokens, completion tokens
Token pricing is the billing model used by AI API providers like OpenAI, Anthropic, and Google to charge for large language model usage.
A token is roughly equivalent to four characters of text (about three-quarters of a word). Providers charge separately for input tokens (the text sent to the model, including the system prompt and any context) and output tokens (the text generated by the model). Prices vary by model, with more capable models costing significantly more per token. Understanding token pricing is essential for estimating API costs when building AI-powered products.
Token Pricing, explained at three levels
At home
When you use an AI through an API (the way software connects to AI), you pay per token. A token is roughly a short word -- 'cat' is one token, 'unbelievable' might be three. Every word you send to the AI costs money (input tokens) and every word it sends back costs money (output tokens). The more you send and receive, the more you pay. This is why you might notice AI products showing 'monthly usage' -- they are tracking tokens to calculate your bill.
At work
Token pricing matters for businesses building AI-powered products because API costs can scale unexpectedly. A customer service bot that handles 10,000 conversations per day, each with a 2,000-token context, is processing 20 million tokens daily. At typical current pricing for mid-tier models, that might cost hundreds to thousands of dollars per day. Understanding token consumption per workflow is the first step in estimating whether an AI feature is economically viable.
At home
Tokens are not the same as words or characters, though they roughly correspond. Most tokenizers (the software that converts text into tokens for processing) produce approximately 750 tokens per 1,000 English words. Non-English languages, code, and mathematical notation are often less efficient -- the same content in Japanese or Python may use more tokens than English prose. Images processed as visual tokens in multi-modal models have separate token counting rules.
At work
The key cost levers in LLM API usage are: model choice (more capable models cost 10-100x more per token than less capable models), prompt engineering (more concise system prompts consume fewer input tokens on every call), output length control (limiting the maximum output tokens reduces costs and is important for structured outputs), caching (if your system prompt is the same across many calls, prompt caching can eliminate the cost of resending it each time), and batching (many providers offer batch APIs at 50% discount for non-real-time workloads).
At home
Context windows -- the maximum number of tokens an LLM can process in a single call -- directly affect cost architecture. A model with a 200,000-token context window allows very long documents or conversation histories to be processed in a single call, but processing 200,000 tokens costs significantly more than processing 2,000. For applications with long conversation histories, summarization strategies (condensing earlier conversation turns into a shorter summary) are commonly used to manage context size and cost without losing important information.
At work
From a practitioner standpoint, token cost estimation should be part of the AI feature business case before development begins. The cost model should cover: average prompt size (system prompt + context + user message), expected output length, number of calls per user per day/month, model tier, and caching efficiency. Build token logging into AI applications from day one -- without visibility into token consumption per workflow, it is impossible to optimize costs or attribute them to business functions. Set up cost monitoring alerts to catch unexpected consumption spikes before they result in a large unexpected bill.
Real-world examples
At home
Aisha built a personal AI writing helper using an API key. She did not realize that her very long system prompt was being sent with every single request, costing her 2,000 tokens per conversation even before she typed anything. When her monthly bill came to $85, she reviewed her token usage, rewrote her system prompt to be 80% shorter, and saw her bill drop to $18 the following month.
At work
The product team at a SaaS company had built an AI feature using GPT-4 and were surprised when the AI API bill for their first month of beta testing was $12,000 -- far above budget. An audit showed that the product was including the user's entire work history (averaging 50,000 tokens) in every API call. They introduced a relevance-based retrieval system that selected only the 2,000 most relevant tokens from history, reducing the bill to $800 per month with no measurable quality degradation.
Common confusions
- Tokens are not the same as words. A word like 'the' is one token; a technical term like 'supercalifragilistic' might be four tokens. Code and mathematical notation are particularly token-expensive because tokenizers are optimized for natural language prose. When estimating costs, use token counting tools (most providers offer tokenizer libraries) rather than word counting.
- Input tokens and output tokens are priced differently. Output tokens (the text the model generates) typically cost 3-5x more per token than input tokens (the text you send to the model). A long model response is more expensive than a long prompt. For applications where you need structured short outputs (classification labels, yes/no, extracted fields), limiting output tokens aggressively reduces costs significantly.
- API pricing changes frequently. Token prices for popular models have generally decreased significantly over time as providers achieve scale and efficiency. Cost estimates made six months ago may be significantly higher than current pricing. Check the provider's current pricing page before finalizing cost models, and build cost per model into your monitoring rather than assuming it is stable.
For analysts
In BA artefacts, token pricing generates cost estimation and monitoring requirements. When documenting requirements for an AI feature, include a token budget estimate: expected tokens per call (system prompt + context + user message + output), expected call volume per day, and resulting monthly cost estimate per model tier. Specify monitoring NFRs: 'The system must log input and output token counts per API call, report daily aggregates by workflow type, and alert when daily token spend exceeds 120% of the baseline estimate.' This makes AI API cost a managed, visible operating cost rather than a surprise.
History & origin
Token-based pricing emerged alongside the first commercial LLM APIs in the early 2020s. OpenAI established the pattern with GPT-3 pricing in 2020, charging per 1,000 tokens. As the market matured, providers began differentiating pricing between input and output tokens (output being typically 3-5x more expensive than input), between models at different capability levels, and between standard and batch pricing. Caching mechanisms (where repeated context is stored and not re-billed on subsequent calls) were introduced from 2024 to reduce costs for applications with large, repeated system prompts.