Claude API Vision: Image Analysis Guide for Developers
Claude's API supports multimodal input, meaning you can send images alongside text and get back structured descriptions, extracted data, classifications, or answers to questions about what's in the picture. This is handled through the same messages endpoint used for text — you just add an image content block — and it works for photos, screenshots, charts, diagrams, and scanned documents.
If you're looking for how to actually call this feature, the short version is: encode your image as base64 (or reference a URL depending on your setup), include it as a content block of type image inside a user message, and pair it with a text prompt describing what you want Claude to do with it. The rest of this guide walks through the request format, real use cases, and the practical limits you need to know before shipping this to production.
How Image Input Works in the Claude API
A multimodal request is a standard messages call where the content array mixes text and image blocks instead of a plain string. A minimal request looks like this:
curl https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": [
{
"type": "image",
"source": {
"type": "base64",
"media_type": "image/png",
"data": "<base64-encoded-image>"
}
},
{
"type": "text",
"text": "Describe what is happening in this image and list any text visible in it."
}
]
}
]
}'
Claude returns a normal text response — there's no separate "vision model." The same model you use for chat, summarization, or tool use can also reason about images in the same conversation, which means you can ask follow-up questions about an image you sent three turns earlier, as long as it's still in the message history.
Supported formats include JPEG, PNG, GIF, and WebP. You can include multiple images in a single message, which is useful for comparison tasks ("which of these two screenshots shows the error state?") or multi-page document analysis.
Practical Use Cases for Image Analysis
Document and form extraction. Send a scanned invoice or receipt and ask Claude to return structured JSON with vendor name, line items, and totals. This works well for PDFs converted to images, ID verification flows, and expense automation.
UI and screenshot QA. Teams building visual regression tools send before/after screenshots and ask Claude to flag layout differences, broken elements, or accessibility issues like low-contrast text.
Chart and diagram interpretation. Claude can read axis labels, estimate trend direction, and summarize what a chart shows — useful for automating report generation from dashboards that don't expose underlying data.
Content moderation and tagging. Classify images against a set of categories, detect brand logos, or generate alt text at scale for accessibility compliance.
Visual search and product matching. Describe a product photo in enough detail to match it against a catalog, or extract attributes like color, material, and style for e-commerce metadata.
In all of these cases, the quality of the output depends heavily on prompt specificity. "Describe this image" gives you a generic caption. "List every line item on this receipt with quantity and price, return as JSON" gives you something you can actually parse downstream.
Limits and Things to Watch For
Image size and token cost both matter. Larger images consume more input tokens, and Claude resizes very large images internally before processing — so there's little benefit to sending a 10MB photo when a 1-2MB version carries the same information. For most analysis tasks, resizing to a max dimension of around 1500px before upload reduces payload size without losing accuracy.
Claude doesn't do pixel-level object detection with bounding boxes the way specialized computer vision models do. It's strong at describing, reading text, and reasoning about content, but if you need precise coordinates for object localization, pair it with a dedicated CV model and use Claude for the semantic layer on top.
Text in images (OCR-style tasks) generally works well for printed text and reasonably well for clear handwriting, but degrades with low-resolution scans, heavy skew, or dense small fonts. Test against your actual document samples rather than assuming it will work from a spec sheet.
Wrapping This Into a Production API
If you're building image analysis into a product, you'll eventually need more than a raw API key — usage tracking per feature, rate limits, streaming for longer analysis responses, and a way to let your frontend team or external customers call the endpoint without touching your main credentials.
SubToAPI sits on top of your existing Claude access and gives you that layer: generate scoped sub_live_... keys per project or customer, get usage metadata on every request so you can see exactly how many image-analysis calls are costing what, and reuse the same key structure across tools, streaming, and plain messages calls. The request format for image inputs is the same /v1/messages structure as the Claude API — see the messages docs for the content block syntax — so moving an existing vision integration over doesn't require rewriting your prompts, just swapping the endpoint and auth header.
Plans start at €9/month for solo use, with team seats at €19 and scale seats at €49, and every plan includes a free trial — see /pricing for details or start with the quickstart guide.
Questions
Does the Claude API support analyzing multiple images in one request? Yes. You can include several image blocks in a single message's content array, which works well for side-by-side comparisons or multi-page document review in one call.
What image formats does Claude's vision input accept? JPEG, PNG, GIF, and WebP are supported. Base64-encoded data is the standard way to pass images in the API request body.
Can Claude read text inside images like scanned documents? Yes, it handles OCR-style tasks reasonably well on printed and clear handwritten text, though accuracy drops with low-resolution or heavily skewed scans — test with your real samples first.