Claude Vision — Unexpected Token Consumption
Your bill is higher than expected because images cost 1000-5000+ tokens each depending on dimensions. Not a bug — vision is expensive. Approximate formula: tokens ≈ (width × height) / 750. Downscale before sending to slash cost 3-10x with minimal accuracy loss.
Resize images to 1092×1092 max before uploading. This drops cost from ~5000 tokens (large image) to ~1600 tokens with negligible accuracy loss for most tasks. For OCR of dense text, 1568px longest edge is sweet spot. Use prompt caching when sending the same image across multiple queries.
The "Symptom" You're Seeing
My bill for 10,000 vision requests is $150 higher than expected → Each image consumed ~2000 tokens more than my estimate Anthropic console shows 8,500 input tokens for a simple prompt → Prompt was 50 tokens; image was 8,450 tokens (large photo) PDF processing cost 10x more than plain text → PDF pages tokenize like images: 1500-3000 tokens per page I sent identical images 100 times, was billed 100x → Prompt caching not enabled; each was full-price Vision seems way more expensive than text → Yes — vision tokens are billed at input rate, but images generate many tokens
Image Token Math (Claude Sonnet 4.5)
Approximate formula: image_tokens ≈ ceil((width × height) / 750)
| Image Size | Tokens | Input Cost | Notes |
|---|---|---|---|
| 200 × 200 (icon) | ~55 | $0.00016 | Minimal |
| 512 × 512 (thumbnail) | ~350 | $0.00105 | Recognizes UI, simple scenes |
| 768 × 768 (small) | ~790 | $0.00237 | Good for most tasks |
| 1092 × 1092 (SWEET SPOT) | ~1590 | $0.00477 | Best cost/accuracy ratio |
| 1568 × 1568 (OCR-friendly) | ~3280 | $0.00984 | Best for text-heavy content |
| 2000 × 2000 | ~5335 | $0.01601 | Diminishing returns above this |
| 4000 × 4000 (huge) | ~21335 | $0.06400 | Waste for most use cases |
| 8000 × 8000 (max) | ~85335 | $0.25600 | Rarely needed |
Cost figures assume $3/million input tokens (Sonnet 4.5). Opus 4.6 is 5× more expensive; Haiku 4.5 is 3.75× cheaper.
Where Cost Surprises Come From
Fixes That Work (Tested Nov 2026)
1Estimate Cost Before Every Call
2Downscale Aggressively for Cost
3Cache Images That Repeat
Cache write costs 25% extra ($3.75/M vs $3.00/M input). Cache read costs 90% less ($0.30/M vs $3.00/M). Break-even: after 2 uses, you save. 10 uses of the same image = 87% total savings vs re-sending each time.
Preventing This Error Going Forward
- Estimate cost before every batch. Log estimate vs actual for calibration.
- Set per-image token budget alerts. If avg per image > 3000, investigate.
- Downscale by default. Ship with 1092px max, override for OCR tasks only.
- Cache repeated images. Especially for interactive analysis (chat over document).
- Prefer Haiku for volume vision tasks. Same tokens, 3.75× cheaper.
- Audit monthly. Break down image tokens vs text tokens vs cached in dashboards.
Researcher · AI Error Hub
Frequently Asked Questions
It's an approximation. Actual tokens depend on tile boundaries and Claude's internal image encoding. Real numbers can vary ±15% from the formula. Use it for budgeting, verify with real usage data.
Input rate. Image tokens are counted as input tokens. They appear in usage.input_tokens alongside prompt tokens. There's no separate "vision fee" — just token count × input price.
Same token count for the same image, but Haiku's input rate is $0.80/M vs Sonnet's $3.00/M. So Haiku is 3.75× cheaper for vision. Great for high-volume, less complex vision tasks.
Use the Token Counting API (client.messages.count_tokens) — it returns exact input tokens including image content. Free to call. Perfect for pre-flight cost validation.
Yes. All input tokens (prompt + image + tools + cache) count against the 200K context window. A single 8000×8000 image can eat 40% of your context. Downscaling saves both cost and context.
Related Errors
Optimize Every Vision Call
Weekly deep dives on cost optimization, resize strategies, and Claude vision patterns. 12,000+ developers subscribe.
Subscribe Free →