- In short
- Vision and multimodal inputs send images and PDFs to Claude as message blocks that consume context budget before any prompt text is read. Claude views an image in patches, so a common approximation is one visual token per 28x28-pixel block and a cost of roughly ceil(width/28) x ceil(height/28), with oversized images downscaled first. An image block and a PDF document block share three source options - inline base64, a URL reference, or a Files API file_id - and the right choice depends on whether the asset is one-off or reused.
Why a picture costs tokens before Claude reads a word
A multimodal request puts an image or a PDF into the same message that carries your prompt, and the Claude Certified Developer - Foundations (CCDV-F) exam treats using that capability well as an apply-level skill. The first thing to internalise is that a visual input is not free context. It consumes budget in the Messages API request and response cycle before Claude reads a single word of your instructions, so the token cost of the pixels has to be calculated at design time, against production-scale inputs, not discovered at scale.
The mechanic behind the cost is that Claude views an image in patches rather than as an opaque blob. A common approximation is one visual token per 28x28-pixel block, which makes the cost of an image roughly ceil(width / 28) x ceil(height / 28). A 1120x1120 image is about 40x40 patches, or on the order of 1,600 visual tokens, and that is spent every time the image is sent. Images above a per-model pixel limit are downscaled before Claude reads them, so the practical lever you control is resizing: a large source image resized down up front costs far fewer tokens for the same analysis, and deciding that resize step in advance is what keeps a pipeline inside its context and cost budget.
- Vision and multimodal inputs
- Sending images and PDFs to Claude as message blocks that consume context budget before any prompt text is read. Claude views an image in patches (about one visual token per 28x28-pixel block), oversized images are downscaled first, and an image block or a PDF document block can source its data from inline base64, a URL, or a Files API file_id.
Three ways to attach an image or a PDF
An image block and a PDF document block share the same three source options, and choosing between them is the design decision this knowledge point rewards. Inline base64 embeds the raw bytes directly in the request: simple, self-contained, and right for a one-off image you will send once. A URL reference points Claude at an image hosted elsewhere so you never embed the bytes at all. The Files API is the third option: you upload the asset once, receive a file_id, and reference that id from every request that needs it.
The rule of thumb is reuse. An asset used a single time is fine inline. An asset reused across many requests belongs in the Files API, because uploading once and referencing by file_id avoids re-sending the same bytes on every call, which saves bandwidth and keeps the request payload small. This is the same economy-of-repetition thinking behind prompt caching: pay to stage a stable, reused input once rather than re-transmitting it each time.
PDFs are documents, not images
The single sharpest structural trap is treating a PDF like an image. A PDF is sent as a document block with media_type application/pdf, not as an image block. It still accepts the same three sources - inline base64, a URL, or a Files API file_id - but the block type is different, and getting it wrong produces a malformed request rather than a working analysis. When Claude processes a PDF it works over both the page images and the extracted text, which is why a multi-page document can consume a substantial slice of the context window and why the same cost-at-design-time discipline applies.
The prompting itself does not change because the input is visual. The same techniques you use on text apply to visual analysis, with one addition worth stating explicitly in the prompt: how to handle image-specific ambiguity such as overlapping objects, occlusion, or unreadable regions. Telling Claude what to do when part of the image is unclear - flag it, describe the uncertainty, avoid guessing - produces more reliable output than leaving that judgement implicit.
What the CCDV-F exam trips candidates on
Three traps recur, and all three are about treating a visual input carelessly. The first is ignoring image token cost until a pipeline blows past the context limit at scale. A scenario shows a system that works on a test image and then fails or grows expensive in production because full-resolution images consume far more budget than anyone measured. The credited fix is usually a resize step decided up front, because the cost was predictable from the patch approximation all along.
The second is re-sending the same large image inline on every request instead of uploading it once to the Files API. When one reference image or document is reused across many calls, embedding its bytes each time wastes bandwidth and bloats every request; the fix is a single Files API upload referenced by file_id. The third is the structural one: assuming a PDF uses an image block when it uses a document block with media_type application/pdf. Keep those three straight - budget the cost, reuse via the Files API, and use the right block type - and the multimodal questions become mechanical.
Worked example
A team ships an invoice-processing pipeline that sends each scanned invoice plus a fixed 2-page instructions PDF to Claude. In testing on small images it works; in production, at 5,000 full-resolution scans a day, requests intermittently exceed the context limit and cost triples. What went wrong and how should it be redesigned?
Two design decisions were skipped, and both trace back to treating visual inputs as free. The full-resolution scans were sent at their native size, so each one spent far more visual tokens than needed. From the patch approximation, a scan resized down to the resolution actually required for reading the text costs a fraction of the tokens while losing nothing the task needs. Deciding that resize step up front, sized against the largest scans in production, keeps every request inside the context budget and brings the per-call cost back down.
The second decision is the fixed instructions PDF. It is identical on every one of the 5,000 daily requests, yet the pipeline re-sends its bytes inline each time as a document block. Uploading it once to the Files API and referencing it by file_id means the reused document is staged a single time instead of re-transmitted 5,000 times a day. And the PDF must be sent as a document block with media_type application/pdf, not shoehorned into an image block. Together the two fixes - resize the variable scans, stage the fixed PDF in the Files API - address both the context overflow and the cost, because both problems came from unbudgeted, re-sent visual data rather than from the model.
Common misreadings to avoid
Misconception
Text prompt tokens are what fill the context window; the attached image is handled separately and does not really count.
What's actually true
Misconception
A PDF is just a visual file, so you send it in an image block like any picture.
What's actually true
How this shows up on the exam
Domain 2 questions on this knowledge point are applied and cost-aware. A common shape describes a multimodal pipeline that works in testing and then overruns the context limit or the budget in production; the reliable diagnosis is unbudgeted visual token cost, and the fix is resizing up front, reasoned from the 28x28 patch approximation. Another shape describes a reused image or document re-sent inline on every call, where the fix is a single Files API upload referenced by file_id. A third simply tests whether you know a PDF uses a document block, not an image block.
This knowledge point applies the Messages API request and response cycle to visual inputs, and it sits alongside the other Claude API mechanics: streaming responses for lower perceived latency, prompt caching mechanics for reusing a stable prefix, and invoking Claude through third-party vendors when the deployment surface is chosen by the customer. Reason from token cost, reuse, and block type, and the multimodal questions reward you every time.
A support tool sends a customer's uploaded screenshot plus the same fixed 3-page product manual (a PDF) to Claude on every request. It works in a demo but overruns the context window under real load, and costs are climbing. Which redesign best addresses both problems?
People also ask
How many tokens does an image cost in Claude?
How do you send a PDF to Claude?
When should you use the Files API instead of inline base64?
Watch and learn
Official Anthropic Academy lessons first, then hand-picked walkthroughs. Videos load only when you press play.
No videos curated for this concept yet
We are still curating the best official and community videos for this topic.
Official prep for this domain
Anthropic's own free prep modules for this part of the syllabus, on the official prep course. Free with an Anthropic Academy sign-in.
References & primary sources
Master this concept with Archie
Practice it inside an adaptive study session. Archie, your Socratic AI tutor, tracks your mastery with Bayesian Knowledge Tracing and schedules the perfect next review.