---
title: "What are image tokens? How LLM APIs price image input"
description: "Image tokens are the input tokens a vision model counts for each image you send. How OpenAI and Anthropic calculate them from image size, and how to estimate cost."
url: https://broadrouter.com/glossary/image-tokens/
lang: en
updated: 2026-11-15
publisher: BroadRouter (a BroadNet site); API by BroadNet Inference, https://inference.broadnet.ai
---

# Image tokens

Updated 2026-11-15

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](https://broadrouter.com/tools/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](https://broadrouter.com/glossary/ocr/) of invoices or forms, test the smallest size that still reads correctly.
-   **Context.** Image tokens fill the [context window](https://broadrouter.com/glossary/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](https://broadrouter.com/models/deepseek-v4.1-flash/), [Qwen3.8 27B](https://broadrouter.com/models/qwen3.8-27b/) and [Gemma 4 VL 26B](https://broadrouter.com/models/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](https://broadrouter.com/guides/read-arabic-invoices-with-vision/) has a full example, and [cheapest vision LLM API](https://broadrouter.com/blog/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.

## See also

-   [Vision-language model](https://broadrouter.com/glossary/vision-language-model/) (term)
-   [Multimodal AI](https://broadrouter.com/glossary/multimodal/) (term)
-   [Input and output tokens](https://broadrouter.com/glossary/input-and-output-tokens/) (term)
-   [Token](https://broadrouter.com/glossary/token/) (term)
-   [Optical character recognition (OCR)](https://broadrouter.com/glossary/ocr/) (term)
-   [Context window](https://broadrouter.com/glossary/context-window/) (term)
-   [Read Arabic invoices and receipts with a vision model](https://broadrouter.com/guides/read-arabic-invoices-with-vision/) (guide)
-   [Cheapest vision LLM API: cost per image and per page, worked out](https://broadrouter.com/blog/cheapest-vision-llm-api/) (article)
-   [Extract invoice, receipt and form data to JSON with a vision LLM](https://broadrouter.com/blog/extract-data-from-documents-with-vision-llm/) (article)

Try it on your real workload. New accounts start with $5 of credit for Gemma and transcription. DeepSeek, GLM and Qwen3.8 need a top-up.

[Get started](https://inference.broadnet.ai/account/?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-image-tokens&utm_content=page-cta) ·

**Sources**

-   [OpenAI API docs, images and vision: calculating costs (checked 2026-11-15)](https://developers.openai.com/api/docs/guides/images-vision)
-   [Anthropic, Claude vision docs: resolution and token cost (checked 2026-11-15)](https://platform.claude.com/docs/en/build-with-claude/vision)
-   [BroadNet Inference API reference, chat with an image (checked 2026-11-15)](https://inference.broadnet.ai/docs?utm_source=broadrouter&utm_medium=referral&utm_campaign=glossary-image-tokens&utm_content=sources)
