---
title: "What is a token in AI?"
description: "Tokens in AI are the fundamental unit of text in modern models. Here's everything you need to know about how it works. Plus, how to use your AI tokens wisely."
image: "https://images.ctfassets.net/lzny33ho1g45/3MiAP1D4w9v2bYxCwyszeV/2d1b210c0447c18827878be686a92159/AI_by_Zapier.jpg"
---

# What is a token in AI?

Tokens in AI are the fundamental unit of text in modern models. Here's everything you need to know about how it works. Plus, how to use your AI tokens wisely.

Understanding what tokens in AI are matters more now than it did even a year ago. Tokens have gone from a background technical detail to the primary usage limit and billing unit for top AI models. 

If you've ever hit your usage limit with Claude Code, you've hit a token limit. If you've ever wondered why switching to a reasoning model burned through your quota faster, that's tokens, too. How AI models read your input, generate a response, think through hard problems, and rack up costs—it all comes back to tokens. Here's everything you need to know. 

**Table of contents**: 

- [What are tokens in AI?](#what-are-tokens)
- [How tokenization works](#how-tokenization-works)
- [How do LLMs generate text?](#how-llms-generate-text)
- [What is a context window?](#context-window)
- [What are reasoning models—and why do they use more tokens?](#reasoning-models)
- [Token limits and AI costs: what changed?](#token-limits)
- [The token economy isn't going anywhere](#token-economy)
- [Use Zapier to spend your tokens wisely](#zapier)

## What are tokens in AI?

Tokens in AI are the fundamental unit of text in modern [AI models](https://zapier.com/blog/types-of-ai-models/). When you type a prompt into [ChatGPT](https://zapier.com/blog/how-to-use-chatgpt/) or [Claude Code](https://zapier.com/blog/claude-code/), it doesn't see words or sentences—it sees a string of tokens, and that's how it responds as well. There's no universal conversion from tokens to characters, but a common guideline is that one token equals approximately four characters, though it can vary substantially. Some tokens are single characters; others are whole words. 

## How tokenization works

Every [large language model (LLM)](https://zapier.com/blog/best-llm/) has a tokenizer that splits text into tokens: the small chunks an AI model reads and generates. Each token has a unique ID, and every model (or AI company) has its own approach to tokenization. 

[OpenAI's tokenizer](https://platform.openai.com/tokenizer) is public and a handy tool for seeing all this in action.

Common words like "the" or "and" each have their own token, while longer and less common words—like "tokenmaxxing"—get split into multiple tokens. A long URL like `https://www.harryguinness.com/blog/new-site-announcement` is 14 tokens. Spaces, emoji, and special characters also count: "and" and " and" (with a leading space) look nearly identical, but tokenizers treat whitespace as part of the token, so they count as two distinct tokens, not one. This is especially important for computer code, which is inherently verbose.

Tokens all come from a model's training data. The more common the pattern, the more likely it is to be represented by a single token. That's why English is generally more efficiently tokenized than other languages—more training data is in English than other languages—though some models have taken steps to prioritize Chinese, Spanish, French, and other widely spoken languages in their training data. 

Text isn't the only thing that gets tokenized. Images, audio, and other media are also converted to tokens for AI models. The mechanism is different, but the principle holds: larger, more complex files take more tokens than smaller, simpler ones.

## How do LLMs generate text?

[LLMs generate text by predicting the next token in a sequence](https://zapier.com/blog/llm-vs-generative-ai/), one at a time, until the response is complete. It amazes me every time I write it, but that's really all it is. 

Give it the prompt "once upon a time in a land far far..." and it's going to suggest something very close to "away" as the next token. To continue the story, it keeps predicting the next token, and the next, and the next, until it's done. All the code creating, email writing, and deep research is built on top of this simple idea.

Of course, all the training, guardrails, [agent harnesses](https://zapier.com/blog/agent-harness/), and tools built on top of modern AI models aren't irrelevant. They're what turn a text prediction engine into a powerful AI model capable of real work. But the token-by-token generation is why AI models distinguish between input tokens (what they read) and output tokens (what they generate). Generating output takes a lot more work than reading input, which is why output tokens cost more—whether you're paying per token on an [API](https://zapier.com/blog/what-is-an-api/) or burning through a monthly usage limit.

## What is a context window?

All those tokens—your [AI prompt](https://zapier.com/blog/ai-prompt/), the conversation history, any files or instructions you've added, and the model's response—have to fit somewhere. That's the [context window](https://zapier.com/blog/context-window/): the maximum number of tokens a model can process in one go.

Early models like OpenAI's GPT-3.5 had a context window of 4,096 tokens, which is why they kept forgetting things mid-conversation. Current frontier models like [Claude Fable 5](https://zapier.com/blog/claude-ai/) and [GPT-5.5](https://zapier.com/blog/openai-models/) typically offer 1 million tokens or more—enough to hold a very long conversation, a large codebase, or a full-length document.

For most chatbot tasks, the context window won't be a problem. But for coding and [agentic tasks](https://zapier.com/blog/agentic-ai/), it's a limit that needs managing. As you approach the context limit, most agents automatically summarize the conversation up until that point and carry that summary forward, so you're not abruptly cut off. But the model is working from a digest rather than the full exchange, which means specific details can get lost.

## What are reasoning models—and why do they use more tokens?

One thing that eats through context faster than most people expect is reasoning. [AI reasoning models](https://zapier.com/blog/ai-reasoning/) generate a [Chain of Thought (CoT)](https://zapier.com/blog/chain-of-thought-prompting/) before responding to your prompt—working through different ideas to arrive at a better answer, rather than just responding with the first thing they generate. That thinking process is particularly important for coding and agentic tasks, where a model that just "wings it" wouldn't get very far.

The catch is that all that thinking uses tokens. You can often see a summary or preview of the reasoning process in tools like ChatGPT and Claude Code, but what you're seeing is a truncated version. The model is generating a long internal description of how it's approaching the task before it ever starts on your actual response.

With most models, you can influence how much reasoning they do (and in turn, how many tokens they use). Turn it off, and the model responds instantly. Crank it up to maximum, and it might use tens of thousands of tokens just working through the problem before it writes a single word of its answer.

## Token limits and AI costs: what changed?

Tokens are how AI models meter usage. And over the past year, there's been one massive change in the AI ecosystem that's caused a lot of knock-on effects: AI coding models have gotten scary good. 

While APIs have always used per-token billing, enterprise plans with OpenAI and Anthropic have transitioned from fixed pricing to per-token pricing. All of a sudden, developers at major companies were [racking up thousands of dollars in AI spend every month](https://www.nytimes.com/2026/06/18/technology/ai-token-minimizing.html).

Token costs are especially high when using frontier reasoning models on big coding tasks. Everything counts: the context the model reads, the reasoning it does before it responds, and the code it writes as output. While $5 per million tokens might not sound like much, those three categories stack up fast, and [AI coding tools](https://zapier.com/blog/ai-coding-tools/) can burn through millions of tokens in a single session.

For solo users, tokens are still relevant. They're the metric by which your daily and weekly usage is calculated. Use Fable 5, and you can blow through your whole Claude Code Pro usage in a few short sessions. 

Once you understand what's actually eating through your tokens (context, reasoning, and output all adding up at once), the usage limits start to make a lot more sense. And if you're still blowing through them, at least now you know why.

## The token economy isn't going anywhere

For a brief period in early 2026, [tokenmaxxing](https://zapier.com/blog/tokenmaxxing/) was a thing. Some companies had leaderboards for how many tokens their engineers were using, while others took to X to brag. The more tokens someone was using, the more productive they were assumed to be. (Yes, this is as stupid as it sounds.) Rising AI prices and usage limits have [put a stop to that](https://techcrunch.com/2026/06/24/companies-are-scrambling-to-stop-employees-from-maxing-out-ai-budgets-with-small-tasks/)—though people then overcompensated and moved into an era of "tokenminning": taking steps to manage your context and model choice to be more efficient. 

Tokens aren't going away. [Anthropic and OpenAI are now making billions](https://www.nytimes.com/2026/05/29/business/dealbook/anthropic-ai-openai.html) off per-token pricing, with Anthropic looking set to turn a profit soon. AI coding agents are a real, growing business, and token usage is how they get paid. 

It's fairly safe to say we'll be managing token spend for the next few years, especially if you're reaching for frontier reasoning models every time you open Claude Code. 

## Use Zapier to spend your tokens wisely

One of the most [effective ways to keep token spend under control](https://zapier.com/blog/minimize-ai-spend/) is by [combining AI steps with deterministic automation](https://zapier.com/blog/deterministic-ai/). This way, you're using AI only where you need it—for example, classifying leads or analyzing data—and not for the tasks that don't require it. That's exactly what [Zapier](https://zapier.com/) is built for. 

Zapier securely connects  and AI tools, with [governance controls](https://zapier.com/blog/february-2026-product-updates/) that let you decide which models your workflows use, what data gets passed to them, and how outputs get routed. Rather than sending every task through a frontier reasoning model by default, you can build workflows that match the job to the right model: lightweight tasks to a faster, cheaper model; complex ones to a reasoning model when it's actually warranted. The outputs go somewhere useful, and the whole workflow runs without you babysitting it.

 **Related reading**:

- [The best AI governance tools](https://zapier.com/blog/ai-governance-tools/)
- [What is context engineering?](https://zapier.com/blog/context-engineering/)
- [What is agentic RAG?](https://zapier.com/blog/agentic-rag)
- [AI spending: a third of employees don't know AI costs anything at all](https://zapier.com/blog/ai-spending/)