Anthropic describes the Claude API on Google's platform as nearly identical to the first-party Messages API, with exactly two structural differences. Both live at the request envelope, and both trip up anyone porting raw HTTP code from another platform. Once you internalize them, everything inside the JSON body works the way you already know.
Difference 1: the model lives in the URL
On the Claude API you pass "model": "claude-opus-4-8" in the request body. On Vertex, the model is part of the endpoint path, and the body has no model field. The non-streaming URL shape is:
POST https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT_ID
/locations/LOCATION/publishers/anthropic/models/MODEL:rawPredict
For streaming, the same URL takes the :streamRawPredict suffix instead of :rawPredict, and responses arrive as standard server-sent events (SSE) — the same event grammar as the first-party API. The verbs are Vertex's generic "send raw payload to a partner model" operations; "raw" here means Vertex passes your Anthropic-format JSON through rather than translating it into a Google request schema. Model IDs are bare Anthropic-style names (claude-opus-4-8, claude-sonnet-5) — the anthropic. prefix is a Bedrock convention and doesn't apply here, though some older models use an @date form such as claude-haiku-4-5@20251001.
Difference 2: anthropic_version goes in the body
Direct Claude API calls send an anthropic-version: 2023-06-01 HTTP header. On Vertex there is no such header; instead the request body must carry "anthropic_version": "vertex-2023-10-16" — that exact string, an underscore key with a Vertex-specific value. Sending the 1P header value, or putting the field in a header, is the most common cause of rejected first requests when hand-rolling HTTP against Vertex.
The URL's other moving part: LOCATION
The LOCATION placeholder appears twice (host and path) and selects among three endpoint types. The global endpoint uses host aiplatform.googleapis.com with location global and routes dynamically for maximum availability. Multi-region endpoints (us, eu) keep data residency within a geography using hosts like aiplatform.us.rep.googleapis.com. Regional endpoints (e.g. us-east5) guarantee a specific region. Regional and multi-region carry a 10% pricing premium over global for Sonnet 4.5 and later models, and provisioned throughput requires regional endpoints. Auth is Google-standard: Application Default Credentials, with curl examples using Authorization: Bearer $(gcloud auth print-access-token).
Or skip all of it with the SDK
The AnthropicVertex client assembles the URL, places anthropic_version, and picks the right verb for you:
from anthropic import AnthropicVertex
client = AnthropicVertex(project_id="my-project", region="global")
with client.messages.stream(
model="claude-opus-4-8",
max_tokens=1024,
messages=[{"role": "user", "content": "Summarize this contract."}],
) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
Install with pip install -U google-cloud-aiplatform "anthropic[vertex]". The region parameter accepts "global", "us"/"eu", or a specific region like "us-east5". One small fingerprint worth knowing for log correlation: response message IDs from Vertex carry a msg_vrtx_ prefix, so you can tell at a glance which platform served a stored response.
Two request-shaping limits to remember when streaming large inputs: Vertex caps request payloads at 30 MB, and images at 5 MB each with up to 100 per request. Messages must alternate user/assistant roles with a user message first.
Small behavioral differences inside the body
A few in-body behaviors are documented specifically for this platform and are worth checking against your prompt library. Google's docs note that if the final message uses the assistant role, the response continues immediately from that content — the prefill pattern — though remember that the newest model generations reject prefill at the model layer regardless of platform, so treat this as relevant only for older models. Extended thinking in manual mode is configured with a thinking object whose budget_tokens must be at least 1,024 and less than max_tokens. And because Vertex passes your Anthropic-format JSON through, everything else — tool definitions, prompt caching markers, stop sequences — uses the standard Messages API shapes with no Google-specific translation.
Where to go next
New to the platform? Start with your first API call on Vertex AI. For the event stream you'll be parsing, see streaming event types and server-sent events explained.