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.