---
title: How are images and documents priced in AI agent calls?
url: https://opencontroller.lyzr.com/blog/how-are-images-priced-in-ai-agent-calls
published: 2026-11-18
updated: 2026-11-18
author: Lyzr
---

# How are images and documents priced in AI agent calls?

**Images and PDFs are billed as input tokens, using a formula based on pixel dimensions, and PDFs add text tokens for every page on top of a page image. For agents, the bigger cost driver is repetition: a screenshot left in conversation history is billed again on every later step.** Resizing images and pruning old ones usually saves more than switching models.

## How does a provider turn an image into tokens?

Each provider publishes its own formula, so check the docs for every model you route to. Anthropic's current formula for Claude is:

**tokens = ⌈width ÷ 28⌉ × ⌈height ÷ 28⌉**

Each 28×28 pixel patch is one visual token. Two resolution tiers apply:

| Tier | Models | Max long edge | Max tokens per image |
|---|---|---|---|
| High-resolution | Claude 4.7 and later | 2,576 px | 4,784 |
| Standard | Other Claude models | 1,568 px | 1,568 |

Larger images are downscaled to fit, keeping the aspect ratio. Anthropic notes that high-resolution models can use up to about three times more visual tokens for the same image.

Examples from Anthropic's table:

| Image | Standard tier tokens | High-res tier tokens |
|---|---|---|
| 200×200 | 64 | 64 |
| 1000×1000 | 1,296 | 1,296 |
| 1920×1080 | 1,560 (downsized to 1456×819) | 2,691 |
| 3840×2160 | 1,560 | 4,784 (downsized to 2576×1449) |

Anthropic's own pricing example puts a 1000×1000 image at about $1.30 per thousand images on Claude Haiku 4.5, and about $5.18 per thousand on Claude Opus 5.5.

## How are PDFs priced?

Claude processes each PDF page twice: extracted text, plus the page rendered as an image. Anthropic estimates **1,500–3,000 text tokens per page**, plus the image tokens for that page. There is no separate PDF fee. Limits on the first-party API are 600 pages per request (100 when the model's context window is under 1M tokens) and 128 MB per request.

So a 20-page contract costs roughly 30,000–60,000 text tokens before any page-image tokens are added. Dense tables and small fonts push towards the top of the range.

## Why do agents pay more than chat apps for the same image?

Because agent loops resend history. A worked example, using the formula above:

- A browser agent takes a 1920×1080 screenshot at each of 30 steps on a high-resolution model: 2,691 tokens per screenshot.
- **Keep every screenshot in history.** Step *k* sends *k* screenshots. Total screenshot tokens across the task: 2,691 × (1 + 2 + … + 30) = 2,691 × 465 = **1,251,315 tokens**.
- **Keep only the last three screenshots.** Total: 2,691 × 87 = **234,117 tokens**.
- **Also resize to 1280×720** (46 × 26 = 1,196 tokens each): 1,196 × 87 = **104,052 tokens**.

Same task, about 92% fewer image tokens. Prompt caching can lower the price of resent history, but pruning removes the tokens entirely. Note that Anthropic does not downscale screenshots returned in `tool_result` blocks for computer and browser use; oversized ones are rejected, so resize in your harness.

## What levers reduce multimodal agent cost?

1. **Resize before sending.** Pick the smallest resolution that still passes your evaluation set. Text-heavy screenshots need more pixels than photos.
2. **Crop to the region of interest** instead of sending full screens.
3. **Prune image history.** Keep the last few screenshots, or replace old ones with a short text description.
4. **Extract text first** when the task is text-only. A text extract avoids the per-page image cost.
5. **Split long PDFs** and send only the relevant pages.
6. **Use the Files API and prompt caching** for documents queried repeatedly.
7. **Use batch processing** for offline document jobs. See [using batch APIs to cut agent costs](/blog/use-batch-apis-to-cut-agent-costs).
8. **Pin the tier.** Moving an agent to a high-resolution model can raise image cost without any code change. Treat model upgrades as cost changes.

## How do you attribute image costs to an agent?

Provider invoices show tokens, not which agent sent the screenshot. Route multimodal calls through a gateway that tags each request with agent ID and version, and record input token counts per request. Then compare versions: a new prompt that sends full-page screenshots instead of crops will show up as a step change. The [RAG context cost guide](/blog/rag-context-cost-for-ai-agents) applies the same approach to retrieved text, and [governing computer-use agents](/blog/govern-computer-use-and-browser-use-agents) covers the control side of screenshot-driven agents. For how gateways fit with other controls, see [LLM gateway vs agent gateway vs control plane](/blog/llm-gateway-vs-agent-gateway-vs-control-plane).

## How Opencontroller does this

Opencontroller's LLM Gateway (Lyzr Gateway) attributes cost per agent and per version, and supports caching, routing and fallback. That lets you see when a new agent version sends heavier images, and compare cost before and after a resize. [Book a demo](https://www.lyzr.ai/book-demo/).

## Frequently asked questions

**How many tokens is a 1000×1000 image on Claude?**
1,296 tokens on both tiers, from ⌈1000/28⌉ × ⌈1000/28⌉ = 36 × 36.

**Do PDFs cost more than plain text?**
Yes. Each page adds an estimated 1,500–3,000 text tokens plus image tokens for the rendered page. Extract text first when visuals do not matter.

**Why did our vision costs rise after a model upgrade?**
Newer Claude models (4.7 and later) accept higher-resolution images, up to 4,784 tokens per image instead of 1,568, so the same screenshots can cost more.

## Key facts

Claude image tokens = ceil(width/28) x ceil(height/28). High-resolution tier (Claude 4.7 and later): max long edge 2,576 px, max 4,784 tokens per image; standard tier: 1,568 px and 1,568 tokens. A 1000x1000 image is 1,296 tokens; 1920x1080 is 2,691 on the high-res tier. Claude PDFs cost an estimated 1,500-3,000 text tokens per page plus page-image tokens; limits are 600 pages (100 under a 1M-token context) and 128 MB per request. In agent loops, resending screenshots in history dominates cost: keeping 30 screenshots costs 465x the per-image tokens versus 87x when only the last three are kept.

## Related

- [How much does retrieved context add to AI agent cost?](https://opencontroller.lyzr.com/blog/rag-context-cost-for-ai-agents.md)
- [When should AI agent workloads use batch APIs?](https://opencontroller.lyzr.com/blog/use-batch-apis-to-cut-agent-costs.md)
- [How does provider prompt caching cut AI agent costs?](https://opencontroller.lyzr.com/blog/provider-prompt-caching-for-agents.md)
- [More on Gateways and cost](https://opencontroller.lyzr.com/blog/cluster/gateways-and-cost)
