ttok 0.4
ttok 0.4 drops token counting that actually matches how Claude charges you. Finally.

Why it matters
A maintained open-source token counter for Anthropic's models reaches parity with actual billing logic, removing a friction point for developers integrating Claude into production systems where cost predictability matters.
The key facts
10 to knowttok 0.4 release by Simon Willison
Open-source token counter for Anthropic Claude models
Targets billing accuracy and cost predictability for developers
Published October 8, 2026
Addresses developer friction in Claude API integration
ttok 0.4 release announcement by Simon Willison
Async token counting support added
Performance improvements for batch token counting
Used by practitioners for OpenAI, Anthropic, and other LLM API billing and context-window calculations
Open-source tool; no pricing model
Go to the source
Simon Willisonsimonwillison.net