HomeAdvanced FeaturesVision — Claude Can See
intermediate12 min read· Module 6, Lesson 1

👁️Vision — Claude Can See

Send images to Claude and get intelligent analysis

Vision — Sending Images to Claude

Claude can see and understand images! You can send screenshots, diagrams, photos, and more.

Supported Formats

  • JPEG, PNG, GIF, WebP
  • Maximum: 8000x8000 pixels
  • Up to 20 images per message (claude.ai) or 100-600 per API request

Sending an Image by URL

JavaScript
const response = await client.messages.create({ model: "claude-sonnet-4-6", max_tokens: 1024, messages: [{ role: "user", content: [ { type: "image", source: { type: "url", url: "https://example.com/chart.png" } }, { type: "text", text: "What does this chart show?" } ] }] });

Sending a Base64 Image

JavaScript
import fs from "fs"; const imageData = fs.readFileSync("screenshot.png").toString("base64"); const response = await client.messages.create({ model: "claude-sonnet-4-6", max_tokens: 1024, messages: [{ role: "user", content: [ { type: "image", source: { type: "base64", media_type: "image/png", data: imageData } }, { type: "text", text: "Describe what you see in this image" } ] }] });

What Claude Can Do with Images

Use CaseExample Prompt
Describe"What's in this image?"
OCR"Read all the text in this screenshot"
Analyze charts"What trends does this graph show?"
Debug UI"What's wrong with this layout?"
Code from mockup"Write HTML/CSS that matches this design"
CompareSend 2 images: "What's different?"

Image Best Practices

  1. Resize large images — Claude rescales internally, so pre-resize to save tokens
  2. Use clear images — higher quality = better analysis
  3. Be specific — tell Claude what to look for
  4. Multiple images — send several for comparison tasks

Cost Tip

Images are converted to tokens. A typical 1000x1000 image uses ~1,600 tokens. Smaller images = lower cost.

Next up: Extended Thinking — making Claude think harder for complex problems.