Skip to content

Glossary: AI System Design

Token counting

Also written: count_tokens, messages.count_tokens, token counting endpoint

A free Anthropic API call (messages.count_tokens) that counts a request's input tokens without running the model; it showed the 4-characters-per-token rule was 26% low.

Where the book teaches it

Related terms

Fresh tokensBack-of-envelope estimate