AIPricingLabGlossary
Glossary

Tokens

The unit of input and output for large language models - roughly 0.75 of a word in English. LLM providers price by tokens; metering AI apps usually does too.

Last updated: 2026-05-10

Definition

Tokens are not characters and not words - they are subword pieces produced by a tokenizer. "Hello, world!" is about 3 tokens; "I am building an AI product" is about 7. Different models tokenize differently. For OpenAI, use tiktoken to count locally; for Anthropic, use their tokenizer endpoint. AIPricingLab supports tokens as a first-class unit on limit groups.

Example

Charging a user 0.5 cents per 1k input tokens + 1.5 cents per 1k output tokens, marked up from your provider cost.

Related terms