What are tokens in an LLM?
99Visibility Research · Updated October 21, 2026 · 4 min read
Short answer
A token is the unit of text a large language model reads and writes, usually a word, part of a word, or a punctuation mark. Every model splits text into tokens before processing it. Token counts set how much text fits in one request (the context window) and how much an API call costs, because vendors price input and output per token.
Key takeaways
- A token is a chunk of text, not a word, and each model family splits text its own way.
- The context window is a token budget shared by your prompt, any retrieved pages, and the answer.
- API vendors bill per token, and web search on top of a model is often billed separately.
- You cannot control how an engine tokenizes or segments your page, so token tricks are not a visibility lever.
- When comparing AI answer tools, ask which model, whether search was on, and how many answers a run includes.
Definition
A token is the smallest unit of text a language model works with. Before a model reads anything, a tokenizer breaks the text into pieces. Common words often become one token. Rare words, names, and numbers often split into several. Spaces and punctuation get tokens too.
The model never sees letters or words directly. It sees a sequence of token IDs, predicts the next token, and repeats until the answer is done. So everything a model does, from reading a prompt to writing a reply, is measured in tokens.
Tokenization is model-specific. The same sentence can produce a different token count on two vendors' models, so token counts are not portable between them.
How tokens set context limits and cost
Two practical limits follow from tokens.
Context window
Every model accepts a fixed maximum number of tokens per request. That budget covers the system prompt, the user's question, any documents pulled in by web search, and the generated answer. When retrieval is on, fetched pages compete for that space. The engine decides which passages enter it, not the publisher.
Price
API vendors price models per million tokens, usually with separate rates for input and output. Search adds a second meter. Anthropic's web search tool documentation lists a charge per 1,000 searches on top of token costs. Google's Gemini API bills grounding with Google Search per search query on Gemini 3 and per prompt on older models.
So the cost of one AI answer depends on three things: tokens in, tokens out, and whether the call searched the web. Whether an API searches at all is a setting, covered in do AI model APIs search the web by default.
Why tokens matter for AI visibility
Tokens shape what AI visibility tools can afford to measure. Each prompt a tracker sends costs tokens on every engine it checks. More prompts, more engines, and search turned on all raise the bill. That is why tools differ so much in how many answers sit behind a score.
When you compare tools, ask three questions:
- Which model answered, and was web search on or off?
- How many answers does each score rest on?
- Are engines scored separately or blended into one number?
A small sample is a snapshot, not a trend. Our guide to LLM visibility tracking explains how to read results across models, and building a prompt set covers choosing questions worth the token spend.
Tokens also explain one hard limit. Inside the context window, position matters. The C-SEO Bench study found that moving a document higher in the model's context mattered far more than rewriting it. No publisher can set that position.
Common misconceptions
- "A token is a word." It often is not. Word-to-token ratios vary by language, vocabulary, and model.
- "Shorter pages fit better, so trim for tokens." Google's AI optimization guide says there is no ideal page length and rejects chunking content for AI. Segmentation happens inside the retrieval operator's own system.
- "Writing predictable prose wins citations." Research on model predictability (perplexity, a token-level measure) is emerging and measured on whole-page rewrites. It is not a usable lever.
- "Crawl limits are token limits." Googlebot's fetch ceiling is measured in bytes per URL, not tokens.
What holds up is access: making sure crawlers can fetch your content in the raw HTML. See what you can and can't influence for the full picture.
Frequently asked questions
How many words are in a token?
There is no fixed ratio. Each model family uses its own tokenizer, and the split depends on the language, the vocabulary, and how common each word is. Short common words often map to one token, while names, numbers, and code can take several. If cost matters, count tokens with the vendor's own tokenizer rather than estimating from word counts.
Do output tokens cost more than input tokens?
Vendors usually price input and output separately, and output is commonly the higher rate. Check the current pricing page for the exact model you call, since rates change with new releases. Remember that search fees can sit on top: some APIs charge per search or per grounded prompt in addition to tokens.
Does a bigger context window mean AI reads my whole site?
No. A larger window lets the engine hold more text in one request, but the engine still decides which pages and passages to retrieve for each query. Retrieval is per query and discretionary. Your part is making sure crawlers can reach and read your pages, including content that only appears after JavaScript runs.
Should I rewrite content to use fewer tokens?
There is no evidence that token-efficient writing earns AI citations. Google says there is no ideal page length and that you don't need to write a special way for generative AI search. Studies of citation-oriented rewrites found them largely ineffective or harmful. Write clearly for people and state specific facts plainly.
Sources
- Web search tool - Claude Platform Docs
- Grounding with Google Search | Gemini API | Google AI for Developers
- [2506.11097] C-SEO Bench: Does Conversational SEO Work?
- Google's Guide to Optimizing for Generative AI Features on Google Search
- [2509.14436] When Content is Goliath and Algorithm is David: The Style and Semantic Effects of Generative Search Engine
This page is AI-assisted. It was written from a verified evidence base and checked against our editorial policy. Engine behaviour changes often; facts are as of October 21, 2026.