BroadRouter
Get started

Image tokens

Updated

Image tokens are the input tokens a vision language model uses to represent an image in a prompt. Providers compute them from the image's size, usually by splitting it into fixed-size patches or tiles after resizing, and bill them like text input tokens, so larger images cost more.

Also called: image token cost, vision tokens, image input tokens

A model cannot read pixels directly. It reads an image as a run of tokens, and on most APIs you pay for each of them.

How it works

Providers cut the image into small squares and count them, after resizing it to fit their limits. The rules differ.

Anthropic. Claude’s docs say each 28×28-pixel patch is one “visual token”, so an image costs ⌈width / 28⌉ × ⌈height / 28⌉ tokens. Images over a maximum long edge or token count are downscaled. On the standard tier the cap is 1,568 px and 1,568 tokens; on the high-resolution tier (Claude 4.7 and later) it is 2,576 px and 4,784 tokens.

Image Standard tier High-resolution tier
200×200 64 64
1000×1000 1,296 1,296
1920×1080 1,560 (resized to 1456×819) 2,691

OpenAI. Newer models count 32-pixel patches, ceil(width/32) × ceil(height/32), apply a per-model patch budget, then multiply by a model factor. OpenAI’s worked example for one model: a 1024×1024 image is 1,024 patches, and 1,024 × 1.2 rounds up to 1,229 tokens. Older models such as GPT-4o use 512-pixel tiles: a base of 85 tokens plus 170 per tile, or only the base tokens at detail: low.

So the same photo can cost very different token counts on different models. Use the image token calculator to compare.

Why it matters

  • Cost. A 1000×1000 image is 1,296 tokens on Claude by Anthropic’s table. At scale, resizing images before you send them can cut input cost noticeably.
  • Accuracy trade-off. Shrinking an image saves tokens but can make small print unreadable. For OCR of invoices or forms, test the smallest size that still reads correctly.
  • Context. Image tokens fill the context window like text. In a multi-turn chat, every resent image is billed again.

On BroadNet Inference

Image input works on DeepSeek V4.1 Flash, Qwen3.8 27B and Gemma 4 VL 26B, sent as a base64 data: URL in the message content. BroadNet’s API reference says: “On a pay-as-you-go key an image counts as input tokens at the model’s input price, and a larger image uses more tokens. On a plan, images are part of the plan’s unlimited use.” For example, Gemma 4 VL 26B image tokens are billed at $0.10 per 1M input tokens. BroadNet does not publish a per-image token formula, so read usage.prompt_tokens in the response to see what an image cost. The Arabic invoice guide has a full example, and cheapest vision LLM API compares prices.

Questions

Does a bigger image always cost more?

Up to a limit. OpenAI and Anthropic both document downscaling images above a maximum size, so the token count stops rising past that point. Below it, more pixels mean more patches and more tokens.

Do image tokens count toward the context window?

Yes. They are input tokens, so many large images in one request can use up the context window and raise the cost of every later turn that resends them.

Is there an image token calculator?

Yes. Our image token calculator applies each provider's published rule to your image dimensions and shows the token count.

Read as MarkdownAsk ChatGPTAsk ClaudeAsk Perplexity