Claude Sonnet 5 Vision Token Cost
Sending images to Claude Sonnet 5? Anthropic counts image tokens with its own formula — this page computes exactly how many an image costs, and whether Claude Sonnet 5 is the cheapest for your resolution.
For teams sending images to vision LLMs — computes how many input tokens an image actually costs on each provider (their formulas differ 2-4×) and which is cheapest for your exact resolution, not a guess from the $/M sheet.
Model prices from OpenRouter · updated 2026-07-13
01Your image & model
$2/M input · counts image tokens as ⌈w/28⌉ × ⌈h/28⌉ patches
02 Same image, different bill
This image costs 10.9× the cheapest option — 1,369 tokens vs 2,519 on GPT-4.1 nano.
Token spread for this image: 675–2,519 (3.7×) across the 11 models below — ranked by image-token cost.
Related cost calculators
Tokenization formulas hand-verified against official docs (checked 2026-07-13), re-audited quarterly: OpenAI images & vision · Claude vision · Gemini image understanding. Per-token prices from OpenRouter, snapshot 2026-07-13, synced daily. Anchored to each provider's own worked examples. All math runs in your browser.
How the math works
A price sheet lists $2/M input tokens for Claude Sonnet 5, but an image isn't one token — it's 1,369 of them here (⌈w/28⌉ × ⌈h/28⌉ patches). At a 1,024×1,024 image that's $0.002738 just for the picture, 87% of your input on this page's workload.
The catch: every provider counts image tokens differently. Anthropic counts 28×28-pixel patches — so the same 1,024×1,024 image ranges from 675 to 2,519 tokens (3.7×) across the models here. Cheapest per image isn't whoever has the lowest $/M; it's tokenization × price together.
Same baseline, image against image: at 1,024×1,024, the picture alone costs $0.002738 on Claude Sonnet 5 (tokens × its input price). The cheapest to send this image is GPT-4.1 nano at $0.000252 (2,519 tokens). Claude Sonnet 5 costs 10.9× that — and note the cheapest isn't the one with the fewest tokens, it's tokenization × price together. Add your 200-token prompt and 300-token output and the full call is $0.006138, $614/month at 100,000 images.
Watch the resolution cliffs: because tokens are counted in tiles or patches, nudging an image one pixel across a boundary can jump the count by a whole row of tiles. Sending images at the smallest resolution your task tolerates (or at OpenAI "low detail" for a flat base tokens) is the cheapest lever — often bigger than switching models.
Tokenization formulas hand-verified against each provider's official docs (checked 2026-07-13), re-audited quarterly; per-token prices sync daily from OpenRouter (updated 2026-07-13). Providers occasionally revise the constants — treat the token counts as the documented standard, not a per-byte guarantee. All math runs client-side with tested code.
Frequently asked questions
How many tokens does a 1,024×1,024 image cost on Claude Sonnet 5?
1,369 input tokens (⌈w/28⌉ × ⌈h/28⌉ patches) — $0.002738 at Claude Sonnet 5's $2/M input rate. That's before any text prompt or output. Tune the resolution to see how the count changes.
Why does the same image cost different amounts on different models?
Because each provider tokenizes images with its own formula. The same 1,024×1,024 image is 675–2,519 tokens (3.7×) across the models here, and each has its own per-token price on top. The cheapest per image is the combination, not the lowest advertised $/M.
Is Claude Sonnet 5 the cheapest for this image?
No — GPT-4.1 nano is cheaper for a 1,024×1,024 image ($0.000252 vs $0.002738 for the picture, 10.9× less). Interestingly the cheapest often isn't the one with the fewest tokens — a low per-token price can beat a tighter tokenizer.
What's the cheapest way to cut image-token cost?
Send the smallest resolution your task tolerates — tokens scale with tiles/patches, so halving each dimension roughly quarters the count. On OpenAI models, "low detail" bills a flat base regardless of size. Switching to a cheaper-tokenizing or cheaper-priced model helps too, but resolution is usually the bigger lever.
Are these token counts current?
The formulas are hand-verified against each provider's official vision docs (checked 2026-07-13) and re-audited quarterly — they're not in the daily price sync. Per-token prices do sync daily from OpenRouter. All math runs client-side with tested code, anchored to each provider's own worked examples.
Should I care about this for Claude Sonnet 5 image input?
Yes — at 1,024×1,024, the image is 87% of your input tokens, so it dominates the bill. Resolution and model choice move real money here.