Skip to content
What Is a Token in AI? What Tokens Cost, and the Counts From Three App Builds
Tools explained

What Is a Token in AI? What Tokens Cost, and the Counts From Three App Builds

Tokens are the small chunks of text an AI model reads and writes, and they set both your API bill and how fast you hit a plan's limits. What they cost on Claude and OpenAI, what Claude and Codex plans say about limits, and how many tokens three identical app builds used.

11 min read

0

A token is the small chunk of text an AI model reads and writes. It can be a whole word, part of a word, a single character or a byte. Your prompt, your files, the chat so far and the model's reply are all counted in tokens.

The token count sets what you pay when you use a model through its API, and it sets how fast you use up the limits on a Claude or ChatGPT plan. On Anthropic's API, Opus 5.5 costs $4 per million input tokens and $20 per million output tokens (checked November 6, 2026).

When Pat Simmons gave Opus 5.5, Fable 5.1 and GPT-6 Astra the same three app builds, Opus read 266.6 million input tokens and came to $106.93 at API prices. GPT-6 Astra read 39.5 million and came to $60.20. His post has the full breakdown of what each model spent in tokens on the same three builds.

How AI turns your words into tokens

Before a model reads your message, the text is encoded into a series of tokens for it to process, according to Anthropic's glossary. The part of the system that does the splitting is called a tokenizer.

Larger tokens let a model work more efficiently and are used when possible, while smaller tokens let it handle rare or brand-new words. Tokenizers also change between models: Anthropic says Claude 4.7 and later models use a newer one that turns the same text into about 30% more tokens than earlier Claude models did.

Everything in the conversation gets counted. OpenAI's pricing page lists "your prompt, files, chat history, tool results, and ChatGPT's response" as things that use tokens, and Anthropic's Claude Code help article says every turn sends the conversation so far, your project files and your new prompt to the model.

Tokens. Tokens are the smallest individual units of a language model, and can correspond to words, subwords, characters, or even bytes (in the case of Unicode). For Claude, the number of characters a token represents depends on the model and the language. Claude 4.7 and later models and Claude Mythos Preview use a newer tokenizer that produces approximately 30 percent more tokens for the same text than earlier models, on which a token represents approximately 3.5 English characters. To get exact counts, use token counting with the model you plan to use.
The "Tokens" entry in Anthropic's glossary, with the 3.5-characters figure and the note on Claude 4.7's newer tokenizer. Captured November 6, 2026.

How much text is 100 tokens?

On earlier Claude models, 100 tokens is about 350 characters of English text, going by Anthropic's figure of about 3.5 English characters per token. Claude 4.7 and later models make about 30% more tokens from the same text, so on those models 100 tokens holds less text.

The figure also changes with the language. For an exact number, Anthropic points to token counting with the model you plan to use, which counts a message's tokens before you send it. It's free to use, and Anthropic calls the result an estimate that can differ from the final count by a small amount. OpenAI has its own token counting API for its models.

Input, output and cached tokens: what an API counts

An API bill counts three kinds of tokens. Input tokens are everything sent to the model: your prompt, files, earlier messages and tool results. Output tokens are what the model writes back, and they cost more.

Cached tokens are input the model has already been sent earlier in the same session. With prompt caching, turns after the first are "billed at the much cheaper cache-read rate," according to Anthropic's Claude Code help article. Opus 5.5 charges $4 per million fresh input tokens and $0.20 per million cache reads, one twentieth of the price. Saving tokens to the cache in the first place (a cache write) costs $5 per million, a little more than plain input.

In Pat's builds, cache reads made up most of the count. In the cost breakdowns the three models wrote for his Moby Dick build, cache reads were the biggest line by token count for both Claude models.

API-equivalent cost of this build session: about $42. Uncached input 2,732, $10.00, $0.03. Cache writes (1-hour TTL, 2x input) 1,035,366, $20.00, $20.71. Cache reads 32,906,196, $0.25, $8.23. Output (includes thinking) 264,405, $50.00, $13.22. Total $42.18. $6.20 for the build, or $8.16 including deployment. Input (uncached) 298, $4.00, $0.00. Output (thinking included) 426,826, $20.00, $8.54. Cache reads 69,788,489, $0.20, $13.96. Cache writes (1-hour) 1,840,724, $8.00, $14.73. Total $37.22.
Each model's own cost math for the Moby Dick build: Fable 5.1 (left) totals $42.18 with 32,906,196 cache-read tokens, GPT-6 Astra (middle) reports $8.16 including deployment, and Opus 5.5 (right, top table) totals $37.22 with 69,788,489 cache-read tokens. From Pat's build-off video at 9:42.

Effort settings change the count too. Anthropic's usage-limits article says thinking is always on for Opus 5.5 and Sonnet 5.5, and that "higher effort uses more tokens."

How much do AI tokens cost?

API prices are quoted per million tokens, and on every model in the table below a million output tokens costs five times as much as a million input tokens. Prices come from Anthropic's pricing page and OpenAI's API pricing page, both checked November 6, 2026.

ModelInput (per 1M tokens)Output (per 1M tokens)Cached input or cache read (per 1M tokens)
Claude Fable 5.1$10$50$0.25
Claude Opus 5.5$4$20$0.20
Claude Sonnet 5.5$2$10$0.10
Claude Haiku 5.5$0.10 (prompts up to 100K tokens), $0.50 (longer)$0.50 (up to 100K), $2.50 (longer)$0.01 (up to 100K), $0.05 (longer)
GPT-6 Astra$10$50$1.00
GPT-6.1 Sol$2$10$0.10
GPT-6.1 Terra$1$5$0.05
GPT-6 Luna$0.10$0.50$0.01

OpenAI's prices are its standard-speed rates for prompts up to 272,000 input tokens; the page lists separate rates for longer prompts. Both companies list batch prices at half the standard rate (OpenAI's batch pricing, Anthropic's batch pricing), and Anthropic charges twice the standard price for fast mode on Opus 5.5.

Fable 5.1. Next generation intelligence for long-running agents. Prompt caching: Read $0.25 / MTok, Write $12.50 / MTok. Input $10 / MTok. Output $50 / MTok. Opus 5.5. Daily driver for agentic coding and enterprise work. Prompt caching: Read $0.20 / MTok, Write $5 / MTok. Input $4 / MTok. Output $20 / MTok. Sonnet 5.5. High-performance model for coding and agents. Prompt caching: Read $0.10 / MTok, Write $2.50 / MTok. Input $2 / MTok. Output $10 / MTok. Haiku 5.5. Fastest, most cost-efficient model. Input: Prompts ≤ 100K tokens $0.10 / MTok, Prompts > 100K tokens $0.50 / MTok. Output: Prompts ≤ 100K tokens $0.50 / MTok, Prompts > 100K tokens $2.50 / MTok. Save 50% with batch processing.
Anthropic's API prices for its four current models, in dollars per million tokens (MTok), on the API tab of claude.com/pricing. Captured November 6, 2026.

Claude and ChatGPT subscriptions don't bill you per token. OpenAI's Codex pricing page says "API token prices are separate from subscription usage; don't use them to estimate included tasks." On Claude's paid plans, usage credits let you keep working at standard API rates after you hit a limit.

What three app builds cost in tokens

The same job can take very different token counts on different models. Pat gave Opus 5.5, Fable 5.1 and GPT-6 Astra identical prompts for three builds: scenes from Moby Dick drawn entirely in code, a 20-second launch film with every sound made in code, and a 3D skateboarding game. Opus and Fable ran in Claude Code and Astra ran in Codex, all on high effort.

Each model worked out its own cost from its session logs at API list prices. The builds ran on subscriptions, so these are API-equivalent costs.

ModelInput tokensOutput tokensCost at API pricesBuild time
Opus 5.5266.6M1.1M$106.93266 min
Fable 5.162.9M524k$90.99143 min
GPT-6 Astra39.5M238k$60.20102 min

Totals for all three builds, measured by Pat Simmons in September 2026, from his build-costs post.

Price per token can outweigh the count. On the Moby Dick build, Fable 5.1 read 32.2 million input tokens, less than half of Opus 5.5's 69.2 million, and still cost more: $42.18 against $37.22. Fable's per-token prices are two and a half times Opus's, $10 per million input tokens against $4 and $50 per million output tokens against $20.

Long sessions pile up input tokens. On the skateboarding game, Opus ran for more than two hours and read 171.3 million input tokens, and the post says most of them were spent "re-reading its own growing session," which is how it got to $58.05.

Unattended runs go much further. Pat's three GPT-6 Astra builds in Blender, the 3D modeling app, used $1,771.61 in tokens over 54 hours of Blender builds, and cache reads made up 1.19 billion of the 1.22 billion input-side tokens. All three ran on a $200-a-month plan, so no invoice for that amount exists. "I hit my usage limit halfway through this build," Pat wrote about the second one, a model of his own studio. "It is the only one of the three where that happened."

How many tokens do you get with Claude Pro or Max?

Anthropic publishes no token number, and no message number, for any Claude plan. The FAQ on its pricing page says "there's no fixed message count," because how much you can do depends on the length and complexity of your chats, the model you choose and the features you use.

Anthropic does say how the plans compare to each other:

PlanPriceUsage, in Anthropic's words
Free$0"Limited usage every 5 hours and every week"
Pro$20 a month, or $17 a month billed yearly ($200 up front)"at least 5x more usage per 5-hour session than Free"
Max$100 a month"5x Pro usage every 5 hours and every week"
Ultra$200 a month"10x Pro usage every week," and no 5-hour limit for verified accounts

From claude.com/pricing, checked November 6, 2026. US prices before tax.

The five-hour window starts when you send your first message and resets in full five hours later. Weekly limits reset at a fixed time assigned to your account, according to Anthropic's help article on usage limits. Chats, Claude Code and the desktop app all draw from the same pool, and Settings > Usage shows how much you've used.

Fable is included on Max and Ultra for up to half your weekly limit, and on Pro it's paid for with usage credits. Our guide covers what Claude's Free, Pro, Max and Ultra plans include, plan by plan.

The token figure Anthropic does publish for its apps is the size of the context window, the amount of text Claude can look back on in a single chat. On paid plans the newest models support up to 1 million tokens and others 500,000 or 200,000, per the same help article, with part of the window kept free for Claude's reply.

Token limits in Claude Code and Codex

Claude Code doesn't get its own token allowance on Pro, Max or Ultra. Anthropic's pricing FAQ says it's included in all paid plans and "shares the same usage limits as the rest of your plan," so your work in the terminal and your chats use one pool.

Long sessions use that pool fastest. Anthropic's Claude Code help article says every turn resends the whole conversation so far, and that the conversation is the part that grows fastest. It suggests /clear to start fresh when you switch tasks and /compact to shrink a long session into a short summary.

Picking an old session back up costs something too. Resuming a Claude Code session can use a sizable share of your limits on its own, as we covered in how Claude's usage limits catch you mid-project.

If you sign in to Claude Code with an API key instead of a plan, it bills per token with no hard stop, and the /cost command shows the session's token and dollar spend.

OpenAI describes Codex usage in estimated messages per five hours, with ranges that change with the model and the task. On Plus and standard Business, OpenAI's Codex pricing page estimates 15 to 160 local messages every five hours with GPT-6.1 Sol, 5 to 45 with GPT-6 Astra and 350 to 3,000 with GPT-6 Luna. Weekly limits may also apply, and Pro plans currently have no five-hour limit.

Once you're past the included usage, Codex runs on credits, which OpenAI describes as "the unit used to pay for eligible usage on credit-based plans." GPT-6.1 Sol costs 50 credits per million input tokens and 250 per million output tokens, and GPT-6 Astra costs 250 and 1,250. Fast mode uses your included allowance 2.5 times as fast, and Ultrafast 8 times. Our breakdown of Codex limits and credits on each ChatGPT plan has the full rate card.

Three terms that come up next to tokens

Context window

The context window is the amount of text a model can look back on while it writes, its "working memory," which Anthropic's glossary separates from the data the model was trained on. It's measured in tokens.

Time to first token (TTFT)

Time to first token is how long a model takes to produce the first token of its reply after it gets your prompt. Anthropic's glossary lists model size, hardware, network conditions and the complexity of the prompt as things that affect it.

Credits

Credits are what OpenAI charges against once a ChatGPT or Codex plan's included usage runs out. Its pricing page sets a credit price for every million tokens each model reads and writes, so tokens still decide how fast credits go.

Questions people ask about AI tokens

Is a token the same as a word?

A token can be a whole word, and it can also be part of a word, a character or a byte, according to Anthropic's glossary. How many characters a token holds depends on the model and the language.

How many tokens does Claude Pro give you per day?

Anthropic doesn't publish a daily or weekly token number for Pro. Pro has a limit that resets every five hours and a weekly limit, and Anthropic's pricing FAQ says it gives at least five times the usage of the Free plan per five-hour session.

How many tokens do you get with Claude Max?

Anthropic gives no token number for Max either. Max costs $100 a month and gives five times Pro's usage every five hours and every week. Ultra, at $200, gives ten times Pro's weekly usage, according to Anthropic's pricing page.

Does Claude Code have a token limit on the Pro plan?

It has the same limits as the rest of your Pro plan, shared with your chats, and Anthropic publishes no separate token cap for it. With an API key instead of a plan, Claude Code bills per token and doesn't stop.

What is the token limit in Codex?

OpenAI publishes no fixed token limit for Codex. It estimates messages per five hours, and weekly limits may also apply. On Plus, its Codex pricing page estimates 15 to 160 local messages every five hours with GPT-6.1 Sol. After that, credits are charged per million tokens.

How can I see how many tokens I've used?

In Claude, Settings > Usage shows your current session and your next weekly reset. In Claude Code, /context shows what's loaded into the conversation and /cost shows token and dollar spend when you pay through the API. In the Codex CLI, /status shows your remaining limits.

Why do long chats use up limits faster?

In Claude Code, every new message sends the earlier ones along with it, so each turn in a long session carries more tokens than the last, per Anthropic's Claude Code help article. Anthropic's help center also says long conversations that trigger automatic context management "consume more of your usage limit."

Sources

What did you think of this post?

Comments

Sign in to join the conversation.

You might also like.

Articles, builds, skills and tools on the same idea.
More At Work

AI FOR MORTALS.

Your daily AI edge that will make everyone wonder how you do it all.

Every weekday, the practical AI updates that matter, and exactly what to do with them.

The latest in AI, in plain English. Free, every weekday.