Learn

GuideAI & agentsCompanion to Context and memory

AI tokens: what a bot is counting

An AI token is a unit an AI model processes. For text, a token can represent a word, part of a word, a character, or another piece of text. Splitting text into these units is called tokenization. One word does not reliably equal one token. [1]

You do not need to count tokens while writing every request. Understanding them helps explain why a short question can still involve a large amount of processing.

Your visible message is only one ingredient

Suppose you ask a bot: “Write a reminder for Saturday.”

The application might also supply your writing preferences, the event note, earlier conversation, and descriptions of available tools. If the bot searches files, retrieved passages may become input for another step. The visible request is only part of the information involved. [2][5]

The reminder it generates is output. An agent performing several steps can make several model requests, each with its own inputs and outputs.

The visible request may be combined with conversation, instructions, retrieved material, and tool descriptions as input. The generated reminder is output.

Swipe sideways to see the whole diagram, or open it full size.

More than the message you type. Token usage can involve more than the message you typed. This diagram does not measure any particular request or plan allowance.

Figure explanation: Five possible inputs are grouped together: current request, relevant conversation, instructions and preferences, a retrieved event note, and available tool descriptions. This group supplies the model request. The generated reminder is its output. The diagram is a simplified text example and does not show all possible usage categories. What is included and counted depends on the model and application.

Sources

  1. Google, Understand and count tokens, checked September 25, 2026. Supports tokenization, input/output counting, and provider-specific counting of different input types. No Gemini limits, prices, or text-to-token ratios are applied to Grok Bot.
  2. OpenAI, Conversation state, checked September 25, 2026. Supports context/output limits and the inclusion of earlier conversation in model requests. The event example and advice are original.
  3. IETF, RFC 6749, section 1.4: Access Token, published October 2012; checked September 25, 2026. Used for the meaning of access token, not implementation advice.
  4. Design Tokens Community Group, Design Tokens Format Module, checked September 25, 2026. Supports the distinct design meaning of token.
  5. Anthropic, Token counting, checked September 25, 2026. Supports including messages, system information, and tools when counting a request.

Cookie preferences