← Blog

Claude API Vision: Image Input Support Explained

2026-10-22 · 5 min read · SubToAPI Team

Does the Claude API support image input?

Yes. Claude's API supports vision natively through the Messages API — you can send one or more images alongside text in a single request and Claude will describe, analyze, extract data from, or reason about the visual content. This works the same way as text prompts: images are passed as content blocks inside a message, and the model's response comes back as regular text (or structured tool output if you're using tool calling).

This article covers exactly how image input works, what formats and sizes are supported, common failure modes, and how to wire it up quickly — including through SubToAPI if you want a simplified HTTPS layer on top of your existing Claude access.

How image input works in the Messages API

Instead of a single text string, a message's content field becomes an array of content blocks. Each block has a type — either text or image. For images, you provide the data as base64-encoded bytes along with a media type.

{
  "model": "claude-opus-4",
  "max_tokens": 1024,
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "image",
          "source": {
            "type": "base64",
            "media_type": "image/png",
            "data": "iVBORw0KGgoAAAANSUhEUgAA..."
          }
        },
        {
          "type": "text",
          "text": "What's in this screenshot? List any errors visible."
        }
      ]
    }
  ]
}

Key points:

Supported image formats and limits

Claude accepts the common web image formats:

Practical limits to plan around:

Common use cases for Claude's vision support

A typical pattern is combining vision with tool use: Claude reads an image, extracts structured data, and calls a function with that data (e.g., create_invoice_record) rather than just returning prose. See /docs/tools for how tool calling integrates with any content type, images included.

Sending images through SubToAPI

If you're already using SubToAPI to turn your Claude access into a standard HTTPS API, image input works the same way — you just point requests at your sub_live_ key instead of managing provider credentials directly.

curl https://api.subtoapi.app/v1/messages \
  -H "Authorization: Bearer $SUBTOAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-opus-4",
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image",
            "source": {
              "type": "base64",
              "media_type": "image/jpeg",
              "data": "/9j/4AAQSkZJRg..."
            }
          },
          { "type": "text", "text": "Summarize the chart in this image." }
        ]
      }
    ]
  }'

This is identical in shape to the direct Messages API — SubToAPI doesn't add a different image format or require pre-processing. The benefit is that your application API key, usage metadata, and billing all live in one dashboard, which matters once you have multiple services or team members sending image requests. Full request/response shape is documented at /docs/messages, and /docs/quickstart walks through generating your first key.

For high-volume image pipelines (batch invoice scanning, screenshot QA in CI, etc.), streaming responses aren't usually necessary since image analysis tends to produce a single structured answer — but if you do want token-by-token output for longer descriptive responses, that's covered in /docs/streaming.

Practical tips for reliable vision results

Questions

Does Claude API vision support require a separate model or endpoint? No. Vision is built into the standard Claude models that support it — you send image content blocks through the normal /v1/messages endpoint alongside text.

Can I send an image by URL instead of base64? The standard approach is base64-encoded image data embedded directly in the request. If your images live remotely, download and encode them server-side before sending.

How many images can I include in one request? You can include multiple image blocks in a single message's content array. There's no fixed "one image per call" restriction, though total payload size and token cost increase with each added image.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →