---
title: "Token"
type: "glossary term"
url: "https://aifordevs.org/glossary#token"
markdown: "https://aifordevs.org/glossary/token.md"
publisher: "AI for Devs"
license: "https://aifordevs.org/reuse"
attribution: "Credit AI for Devs and link to https://aifordevs.org/glossary#token"
---

# Token

A token is the unit of text a model takes in and generates: a word, part of a word, a symbol, or a byte sequence, depending on the tokenizer. Context limits, speed, and API prices are all counted in tokens.

Token counts differ by model, so use the provider's counting tool for anything that affects cost. Google says a Gemini token is about 4 characters. Anthropic says about 3.5 English characters on earlier Claude models, and that Claude 4.7 and later produce about 30% more tokens for the same text.

## Example

Text that took 1,000 tokens on an earlier Claude model takes about 1,300 on Claude 4.7 or later, so budget for the difference when you migrate.

## Source

[Anthropic docs: Glossary](https://platform.claude.com/docs/en/about-claude/glossary)

## Related terms

- [Tokenizer](https://aifordevs.org/glossary#tokenizer)
- [Context window](https://aifordevs.org/glossary#context-window)
- [Temperature](https://aifordevs.org/glossary#temperature)
- [Reasoning model](https://aifordevs.org/glossary#reasoning-model)

## Read the article

[Claude API pricing: caching, batch, and real bills](https://aifordevs.org/articles/claude-api-pricing)

## Cite this term

AI for Devs. "Token." https://aifordevs.org/glossary#token

- Page: https://aifordevs.org/glossary#token
- Markdown: https://aifordevs.org/glossary/token.md
- Reuse: Quote or summarize with a link to this page. Terms: https://aifordevs.org/reuse
- Publisher: AI for Devs
