How does it read a picture?
Vision: images as tokens · Builder · 5 min · tokens, llm · after Tokens
A vision model cuts an image into small squares (patches or tiles) and reads each as a token. Bigger images cost more tokens up to a size cap; past it the image is shrunk, which can blur small text.
1 Guess first
2 Look
A picture, in tokens
1 / 4RECEIPT2 × coffee ........ $7.00tax ............... $0.56280 × 168 px → ⌈280/28⌉ × ⌈168/28⌉ = 10 × 6 = 60 tokens
rule: Anthropic vision docs, 28×28 px patches (checked 2026-10-21) · sample picture illustrative
The model cuts the picture into small squares. Each square becomes one token.
An image is a grid of patch tokens: more pixels means more tokens until a size cap, and past the cap the image is shrunk, small text included.
A patch is a small square of pixels the model reads as one token: 28 pixels across at Anthropic, 32 at OpenAI, 768-pixel tiles at Gemini. Each vendor caps the size, then shrinks bigger images. That is why a photo can cost a thousand tokens or more, and why tiny text in a huge screenshot comes back wrong.
4 You are the model
You are the model’s eyes (Anthropic, standard tier). Count the 28-pixel squares for each image and pick its token count.
image 1 of 4 · Anthropic, standard tier: 28 px patches, long edge ≤ 1568 px
How many tokens is a 280 × 280 px image?
Anthropic vision docs (checked 2026-10-21)
You are the model’s eyes: count the 28-pixel squares.5 Check
6 Say it back
7 Mission · 5 min
With a free Gemini API key, count the tokens of a small screenshot and of a large photo (count_tokens, Gemini docs “Understand and count tokens”). Then ask Gemini 3.8 Flash to read the smallest text in the large photo, then in a crop of just that corner, and compare.
Three quick ones
Drawn at random from this lesson's pool; different next time.
Done?
Go deeper
Sources
- https://platform.claude.com/docs/en/build-with-claude/vision (checked 2026-10-21): 28×28-pixel patches, ⌈width/28⌉ × ⌈height/28⌉ visual tokens; standard tier max long edge 1568 px and 1568 tokens; high-resolution tier (Claude 4.7 and later) 2576 px and 4784 tokens; table 200×200 → 64, 1000×1000 → 1296, 1092×1092 → 1521, 1920×1080 → 1456×819, 1560 (standard) or not resized, 2691 (high-res); 3840×2160 → 2576×1449, 4784 (high-res); resizing “might, for example, make text less legible”
- https://ai.google.dev/gemini-api/docs/image-understanding (updated 2026-09-23, checked 2026-10-21): 258 tokens if both dimensions ≤ 384 px; larger images tiled into 768×768 tiles of 258 tokens; 960×540 → 6 tiles
- https://ai.google.dev/gemini-api/docs/tokens (updated 2026-10-13, checked 2026-10-21): count_tokens with an image
- https://developers.openai.com/api/docs/guides/images-vision (checked 2026-10-21; no update date): 32px patches × model multiplier; gpt-6-astra, detail high: 1024×1024 → 1229 tokens
- https://ai.google.dev/gemini-api/docs/pricing (updated 2026-10-19, checked 2026-10-21): Gemini 3.8 Flash input free of charge on the free tier
- Arithmetic on the vendors’ rules is labelled in the picture (60, 1,369, 1,548 tokens; the 0.392 shrink); the sample receipt, screenshot and text sizes are illustrative
Published Oct 21, 2026 · updated Oct 21, 2026