Google Vertex AI in Practice

Sending Images to Claude via Vertex AI

Claude's vision capability works on Vertex AI, but the delivery mechanics differ from what Google-native model users expect: you send image bytes inline, not a Cloud Storage link.

Claude 3P 101 · Updated July 2026 · Unofficial guide

Vision — sending Claude an image alongside text and asking it to read, describe, or extract from it — is generally available for Claude models on Google Vertex AI, and it powers some of the highest-value enterprise use cases: invoice extraction, form processing, screenshot triage, and document review. The mechanics, though, have one platform-specific wrinkle that catches teams coming from Google's own models.

Inline base64 is the documented path

With Claude on Vertex AI, you embed the image directly in the request as a base64-encoded content block. Base64 is simply a way of writing binary bytes as text so they can travel inside a JSON payload. The AnthropicVertex client takes the same message shape as Anthropic's first-party API:

import base64
from anthropic import AnthropicVertex

client = AnthropicVertex(project_id="my-project", region="global")
img = base64.standard_b64encode(open("invoice.png", "rb").read()).decode()

msg = client.messages.create(
    model="claude-sonnet-5", max_tokens=1024,
    messages=[{"role": "user", "content": [
        {"type": "image", "source": {"type": "base64",
         "media_type": "image/png", "data": img}},
        {"type": "text", "text": "Extract the vendor, date, and total."}]}])
print(msg.content[0].text)

What about Cloud Storage URIs?

Teams used to Google's native models often expect to pass a gs:// URI and let the platform fetch the file. For Claude's online (real-time) requests, that shortcut is not available: Anthropic's platform documentation lists URL-based input sources and the Files API as unsupported on Vertex AI. In practice that means your application reads the object from Cloud Storage itself, base64-encodes the bytes, and sends them inline. The place Cloud Storage does appear as a first-class input is Google's own batch prediction feature for Claude, which takes JSONL input from Cloud Storage or a BigQuery table for asynchronous jobs — a different mechanism from the online API, covered in the batch workaround article.

Rule of thumb: online request → download and inline the bytes yourself; large offline image pipelines → consider Vertex batch prediction with Cloud Storage input at 50% of on-demand token pricing.

Limits to design around

LimitValue on Vertex AI
Maximum size per image file5 MB
Maximum images per request100
Maximum total request payload30 MB

Note the interaction between the last two rows: base64 inflates file size by roughly a third, so a hundred moderately sized images will hit the 30 MB payload ceiling long before the per-image or per-count limits. If you are batching many photos into one request, resize and compress first. Common web formats such as PNG and JPEG are the safe choice; for the current definitive format list, check the official documentation. PDF input is also generally available on Vertex if your "image" is really a scanned document.

Cost implications

Images are billed as input tokens — the model "reads" a tokenized representation of each image, and larger images consume more tokens. Every image also counts toward the model's context window alongside your text, tool definitions, and output. Two practical consequences: first, downscaling images to the smallest size that preserves the details you need is a direct cost lever; second, a many-image request on a 200k-context model like Haiku 4.5 can crowd out room for the response. There is no per-image surcharge documented on Google's Claude pricing beyond token costs, but token counts vary with image dimensions, so measure a representative sample with the token counting API (supported on Vertex) before projecting costs.

Getting reliable answers out of images

Delivery mechanics aside, a few prompting habits determine whether vision workloads are production-grade or demo-grade. Put the image content block before the text instruction, as in the sample above, and be explicit about what to extract and in what format — pairing vision with structured outputs (generally available for Claude on Vertex) turns "read this invoice" into a schema-validated record your pipeline can trust. When a request carries several images, refer to them by position ("in the second image…") so the model and your reviewers are talking about the same thing. And keep a human-review lane for low-confidence cases: scanned documents arrive skewed, stamped, and coffee-stained, and asking Claude to flag unreadable fields explicitly is cheaper than silently ingesting wrong totals.

Where to go next

For end-to-end pipelines built on vision, see Document Processing: Contracts, Invoices, and Forms. If your payloads are bumping the 30 MB ceiling, Handling Large Payloads and Long Context Windows on Vertex AI is the companion piece.

Sources