News

Claude Opus 4.7 Tokenization Costs Analyzed: New Model Potentially 40% More Expensive

Claude Opus 4.7 Tokenization Costs Analyzed: New Model Potentially 40% More Expensive

A developer has upgraded their Claude Token Counter tool, adding the capability to run the same token count against different models for comparison. The tool now includes options for all four notable current models: Opus 4.7, Opus 4.6, Sonnet 4.6, and Haiku 4.5.

It was observed that Claude Opus 4.7 is the first model to feature a changed tokenizer. Anthropic's announcement for Opus 4.7 indicated that the updated tokenizer improves how the model processes text, though the same input can map to more tokens—roughly 1.0–1.35x, depending on content type.

When pasting the Opus 4.7 system prompt into the token counting tool, it was found that the Opus 4.7 tokenizer utilized 1.46 times the number of tokens compared to Opus 4.6. Despite Opus 4.7 maintaining the same pricing as Opus 4.6 ($5 per million input tokens, $25 per million output tokens), this token inflation implies an expected cost increase of approximately 40%.

The token counter tool also accepts images. Opus 4.7 features improved image support, capable of handling images up to 2,576 pixels on the long edge (approximately 3.75 megapixels), more than three times the capacity of prior Claude models. An experiment with a 3456x2234 pixel, 3.7MB PNG image showed a significant 3.01x increase in token counts for Opus 4.7 compared to Opus 4.6.

However, subsequent updates clarified that the substantial increase for images is primarily due to Opus 4.7's ability to handle higher resolutions. A test with a smaller 682x318 pixel image showed almost identical token counts for Opus 4.7 (314 tokens) and Opus 4.6 (310 tokens), implying comparable costs for low-resolution images. Furthermore, a 15MB, 30-page text-heavy PDF resulted in Opus 4.7 reporting 60,934 tokens versus 56,482 for 4.6, a 1.08x multiplier, significantly lower than the multiplier observed for raw text.

↗ Read original source