TokenRate
Guide · Fundamentals3 min read

What Are AI Tokens? A Practical Guide for API Users

Understand token units, why word counts vary, and where token counts appear in a real API bill.

By TokenRate · Published · Updated

TL;DR

A token is a chunk of text processed by a model, not necessarily a word. Tokenization varies by model and language. For billing, use the provider's measured input and output counts whenever possible.

A token is a model unit

A tokenizer splits text into units that can be words, word fragments, punctuation or spaces depending on the model. “Unbelievable” may become multiple tokens while a common short word may be one. Code, numbers and languages other than English often produce a different ratio from English prose.

Why estimates differ

A words-to-tokens estimate is useful before a request, but it is never a substitute for measured usage. Providers use their own tokenizers and may account for message structure, system instructions, images or tool definitions differently. A one-thousand-word English draft is often several hundred more tokens than its word count, but the exact number depends on content and model.

Input and output have separate roles

Input tokens include what you send, including repeated history. Output tokens cover what the model generates; reasoning models may count additional internal work as output. The API usage object is the best source for these counts. Convert your observed token counts to dollars with the model's rates.

A simple measurement workflow

Save a representative set of requests. Record model ID, input tokens, output tokens and any cached usage reported. Calculate cost per request and compare it with your provider dashboard. When counts disagree, check whether the response included tool use, images, reasoning or a service tier you left out.

Primary sources

Frequently Asked Questions

Is one token one word?

No. A word can be one or several tokens, and punctuation and spaces may count too.

Can I use the same token estimate for every model?

No. Tokenizers and accounting rules differ. Use the target model's token counter or actual API usage.

Try the TokenRate Calculator

Use the TokenRate tools to calculate cost from your own usage and the current model rates.

Open Calculator →