One read of Claude Developer Platformapi-20261023T000722Z
139 pages moved out of 812 read.
What this read moved
26-50 of 139, page 2 of 6This capture is too large to show at once. Changes 26-50 of 139 are below, significant first; the rest are on the following screens.
api/service-tiers Changed · +9 / -9 lines
build-with-claude/batch-processing Changed · +150 / -149 lines
build-with-claude/citations Changed · +46 / -18 lines
build-with-claude/claude-in-amazon-bedrock Changed · +4 / -4 lines
build-with-claude/claude-models-on-google-cloud/anthropic-managed New page · 847 lines, new page
## Set up your account ### Troubleshooting account setup ## Manage access ### IAM roles ### Using the Claude Console ### Workspaces ## Before making API calls ### Find your workspace ID ### Install an SDK ## Making requests ### API model IDs ## Project, location, and workspace resolution ## Authentication ### Credential precedence ## Feature support ### Claude Managed Agents ### Features not supported ### Context window ## Billing, rate limits, and logging ### Rate limits ### Billing ### Data retention ### Monitoring and logging #### Request IDs ## Moving from an existing Anthropic organization ## Migrating from Claude Models on Google Cloud (Google managed) ## Next steps
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Claude Models on Google Cloud (Anthropic managed)
url: https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed
description: Claude Models on Google Cloud (Anthropic managed) is the Claude API, run by Anthropic and reached through your Google Cloud project.
---
Google Cloud handles access and billing for Claude Models on Google Cloud (Anthropic managed). To compare the two Google Cloud offerings, or to check which one you use, see [Claude Models on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview).
## Set up your account
To set up your account for Claude Models on Google Cloud (Anthropic managed), you need the following:
* Permission to purchase in Google Cloud Marketplace on your billing account
* Permission to enable services on the project
* An [IAM role that lets you open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console), which you need for step 4
These steps create a new Anthropic organization for your Google Cloud project. It's separate from any Anthropic organization your company already has. That includes a Claude Enterprise organization. To move from an existing organization, see [Moving from an existing Anthropic organization](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#moving-from-an-existing-anthropic-organization).
If you have an existing discount, contact your Anthropic or Google Cloud account representative before you start these steps. Discounts can't be applied to past usage.
<Steps>
<Step title="Subscribe in Marketplace">
1. Open [Google Cloud Marketplace](https://console.cloud.google.com/marketplace) and find the **Claude Models on Google Cloud (Anthropic managed)** listing.
2. Click **Subscribe** and complete the purchase flow.
3. Return to the listing and click **Manage on Console**. This opens the Claude page in the Google Cloud console.
To return to the Claude page later, select your project in the Google Cloud console. Then go to **Agent Platform > Models > Claude Platform** and select **Anthropic managed**.
</Step>
<Step title="Enable the services">
Enable two services on every project that calls Claude Models on Google Cloud (Anthropic managed):
* `claude.googleapis.com` serves the API for Claude Models on Google Cloud (Anthropic managed). This service also defines the IAM permissions. Calls fail without it.
* `anthropic-managed-claude.cloudpartnerservices.goog` is the Marketplace service that attributes the project's usage to your subscription.
```bash CLI
gcloud services enable claude.googleapis.com \
anthropic-managed-claude.cloudpartnerservices.goog \
--project=my-project-id
```
Replace `my-project-id` with your project ID.
You can also enable both from the Claude page or from **APIs & Services**. Enabling is a one-time step for each project. To check that both services are enabled, run `gcloud services list --enabled --project=my-project-id` and look for both names.
</Step>
<Step title="Set up your Anthropic organization">
1. On the Claude page, click **Activate**.
2. In the Anthropic setup flow, enter a contact email address.
3. Open the setup link sent to that address.
4. Fill in the organization's name, entity type, country, and intended use.
5. Accept Anthropic's Commercial Terms of Service and Usage Policy.
The contact address is used only for setup and service notices. For how people open the Claude Console after setup, see [Using the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
</Step>
<Step title="Open the Claude Console">
When your Anthropic organization is active, the button on the Claude page changes to **Open Claude Console**. Click it. Google Cloud checks your IAM access. Then it redirects your browser to `platform.claude.com`. You're signed in to the new organization.
While you're in the Claude Console, [find your workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id) and copy it. Everyone who calls Claude Models on Google Cloud (Anthropic managed) needs it. Pass it on to your developers.
</Step>
</Steps>
To add another project, repeat these steps in that project, starting from step 2.
### Troubleshooting account setup
If you run into one of the following problems while you set up Claude Models on Google Cloud (Anthropic managed), apply its fix:
* **`gcloud services enable` can't find `anthropic-managed-claude.cloudpartnerservices.goog`:** Run the command as the account that completed the Marketplace purchase, or contact your Anthropic account representative.
* **A permission error on your first API call:** Check that `claude.googleapis.com` is enabled on the project you're calling. Check that the caller has `roles/claude.user` or `roles/claude.admin` on that project. For what each role allows, see [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles). A new grant or a newly enabled service can take a moment to apply.
* **"Signed in as a different account" after following the setup link:** Click **Log out and continue**. Then use the email address you entered in step 3.
* **The button says "Finish Setup" instead of "Open Claude Console":** Your Anthropic organization exists, but its setup isn't complete. An administrator has to finish the organization details form.
* **The Usage page shows no data after your first API call:** Usage data can take a few minutes to appear in the Claude Console.
## Manage access
### IAM roles
Claude Models on Google Cloud (Anthropic managed) has three predefined IAM roles. Grant roles on the project.
| Role | Display name | What it allows |
| --------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `roles/claude.viewer` | Claude Viewer | Every `get` and `list` permission on workspace resources<br />This role is read-only. |
| `roles/claude.user` | Claude User | Everything `roles/claude.viewer` allows, plus creating and changing workspace resources<br />This includes sending messages and counting tokens. It also includes managing batches, files, skills, and Claude Managed Agents resources. |
| `roles/claude.admin` | Claude Admin | Everything `roles/claude.user` allows, plus the permissions checked on your Anthropic organization<br />Organization-level routes act on your Anthropic organization as a whole, not on one workspace. |
For example, the following command lets a service account call Claude Models on Google Cloud (Anthropic managed):
```bash CLI
gcloud projects add-iam-policy-binding my-project-id \
--member="serviceAccount:[email protected]" \
--role="roles/claude.user"
```
For permissions, predefined roles, and audit log types, see [IAM permissions for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions).
Enabling `claude.googleapis.com` creates a service agent for the project. Don't remove its role grants. Removing them stops Claude Models on Google Cloud (Anthropic managed) from working in the project.
### Using the Claude Console
With Claude Models on Google Cloud (Anthropic managed), you can't use an email address to sign in to your Anthropic organization. Instead, click **Open Claude Console** on the [Claude page](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in the Google Cloud console. Google Cloud IAM controls who can open the Claude Console. Of the three predefined [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), only `roles/claude.admin` on the project lets you open the Claude Console.
### Workspaces
In Claude Models on Google Cloud (Anthropic managed), setup creates your Anthropic organization with one workspace, the Default Workspace. To create more workspaces, [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) and go to **Settings > Workspaces**. On the same page, you can rename or archive any workspace except the Default Workspace. Each workspace has its own [workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). Files, skills, batches, Claude Managed Agents sessions, and other workspace resources belong to the workspace whose ID you [set for the request](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution).
You grant [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) on the project, so a role applies to every workspace in that project. When teams need separate access, give each team its own Google Cloud project. Each project has its own Anthropic organization, so repeat the [setup steps](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in each project, starting from step 2.
## Before making API calls
To call Claude Models on Google Cloud (Anthropic managed), you need the following:
1. A Google Cloud project with an active subscription and an Anthropic organization whose setup is complete. See [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account).
2. The [gcloud CLI](https://cloud.google.com/sdk/docs/install) installed, for local development.
3. The `roles/claude.user` role, granted on the project to the identity that makes the calls.
4. Application Default Credentials for that identity. See [Authentication](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication).
5. Your project ID and your [workspace ID](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id).
To grant the role to your own account for local development, run the following command. You need permission to change the project's IAM policy.
```bash CLI
gcloud projects add-iam-policy-binding my-project-id \
--member="user:[email protected]" \
--role="roles/claude.user"
```
Replace `my-project-id` with your project ID. Replace `[email protected]` with your Google account's email address. To see the project gcloud is using, run `gcloud config get-value project`. For service accounts and the other roles, see [IAM roles](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles).
### Find your workspace ID
To find your workspace ID for Claude Models on Google Cloud (Anthropic managed), [open the Claude Console](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) and go to **Settings > Workspaces**. The ID starts with `wrkspc_`. If you can't open the Claude Console, ask someone who can open it to send you the ID.
Set the project and workspace as environment variables so that the SDK client and the [`ant` CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart) pick them up:
```bash CLI
export ANTHROPIC_GOOGLE_CLOUD_PROJECT="my-project-id"
export ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID="wrkspc_01AbCdEf23GhIj"
```
### Install an SDK
The [SDK client](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) for Claude Models on Google Cloud (Anthropic managed) is `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`). The client resolves your Google credentials. It also builds the base URL from your project, location, and workspace ID.
<Note>
The SDK client for Claude Models on Google Cloud (Anthropic managed) is in beta.
</Note>
Install the package that provides the client:
<Tabs>
<Tab title="Python">
```bash
pip install -U "anthropic[google_cloud]"
```
</Tab>
<Tab title="TypeScript">
```bash
npm install @anthropic-ai/google-cloud-sdk
```
</Tab>
<Tab title="C#">
```bash
dotnet add package Anthropic.GoogleCloud
```
</Tab>
<Tab title="Go">
```bash
go get github.com/anthropics/anthropic-sdk-go/v2
```
</Tab>
<Tab title="Java">
```kotlin Gradle
implementation("com.anthropic:anthropic-java:3.1.0")
implementation("com.anthropic:anthropic-java-google-cloud:3.1.0")
```
```xml Maven
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java-google-cloud</artifactId>
<version>3.1.0</version>
</dependency>
```
</Tab>
<Tab title="PHP">
```bash
composer require anthropic-ai/sdk google/auth
```
</Tab>
<Tab title="Ruby">
```bash
gem install anthropic googleauth
```
</Tab>
</Tabs>
To use the `ant` CLI instead, [install or update the CLI](https://platform.claude.com/docs/en/cli-sdks-libraries/cli/quickstart#installation) to the latest version. A version without support for Claude Models on Google Cloud (Anthropic managed) ignores the `ANTHROPIC_GOOGLE_CLOUD_*` variables. It then does one of the following:
* Sends the request to the Claude API with any other credential you've set up
* Fails with an authentication error
## Making requests
Claude Models on Google Cloud (Anthropic managed) serves Claude API endpoints under a base URL that names your project, a location, and your workspace:
```text wrap
https://claude.googleapis.com/v1/projects/{project}/locations/global/workspaces/{workspace}/invoke
```
The [organization-level routes](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), whose paths start with `/v1/organizations/`, use a base URL without the workspace:
```text wrap
https://claude.googleapis.com/v1/projects/{project}/locations/global/claudeOrganization/invoke
```
If you don't [set the base URL](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution), the SDK client chooses between these two for each request.
Append the Claude API path to the base URL. For example, the [Messages API](https://platform.claude.com/docs/en/api/messages/create) is at `.../invoke/v1/messages`. Three things differ from a Claude API request:
* **Base URL:** The project-scoped URLs shown earlier, in place of `https://api.anthropic.com`.
* **Authentication:** An `Authorization: Bearer` header with a Google access token. Don't send an `x-api-key` header.
* **Workspace:** The workspace ID is part of the URL. Don't send an `anthropic-workspace-id` header.
Everything else is the same as on the Claude API, including the following:
* The `anthropic-version` and `anthropic-beta` headers
* The request body
* Streaming
* The response
Code samples elsewhere in this documentation create the Claude API client and read an API key. To run one with Claude Models on Google Cloud (Anthropic managed), replace its import and client constructor with the ones in the following examples. For a cURL sample, apply the three differences listed earlier.
Before running these examples, complete the steps in [Before making API calls](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#before-making-api-calls).
<CodeGroup>
```bash cURL
curl "https://claude.googleapis.com/v1/projects/$ANTHROPIC_GOOGLE_CLOUD_PROJECT/locations/global/workspaces/$ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID/invoke/v1/messages" \
-H "Authorization: Bearer $(gcloud auth application-default print-access-token)" \
-H "content-type: application/json" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-opus-5-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Claude"}
]
}'
```
```bash CLI
ant messages create \
--model claude-opus-5-5 \
--max-tokens 1024 \
--message '{role: user, content: "Hello, Claude"}'
```
```python Python
from anthropic import AnthropicGoogleCloud
client = AnthropicGoogleCloud()
message = client.messages.create(
model="claude-opus-5-5",
max_tokens=1024,
messages=[{"role": "user", "content": "Hello, Claude"}],
)
print(message)
```
```typescript TypeScript
import { AnthropicGoogleCloud } from "@anthropic-ai/google-cloud-sdk";
const client = new AnthropicGoogleCloud();
const message = await client.messages.create({
model: "claude-opus-5-5",
max_tokens: 1024,
messages: [{ role: "user", content: "Hello, Claude" }]
});
console.log(message);
```
```csharp C#
using Anthropic.GoogleCloud;
using Anthropic.Models.Messages;
var client = new AnthropicGoogleCloudClient();
Cut at 300 lines. The page has the rest.
build-with-claude/claude-models-on-google-cloud/google-managed New page · 763 lines, new page
## Before making API calls ### Install an SDK ## Making requests ### API model IDs ## Global, multi-region, and regional endpoints ## Feature support ### Features not supported ### Context window ## Billing, rate limits, and logging ### Rate limits ### Billing ### Data retention ### Monitoring and logging ## Migrating from Claude Models on Google Cloud (Anthropic managed) ## Next steps
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Claude Models on Google Cloud (Google managed)
url: https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed
description: Google operates Claude Models on Google Cloud (Google managed) as part of Google Cloud's Agent Platform. You can call Claude with Anthropic's client SDKs.
---
[Claude Models on Google Cloud](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview) compares the two Google Cloud offerings. It also shows how to tell which one you use.
## Before making API calls
To use Claude Models on Google Cloud (Google managed), you need:
1. A Google Cloud project that can use Agent Platform. For setup steps, see Google Cloud's [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude) page.
2. The [gcloud CLI](https://cloud.google.com/sdk/docs/install) installed, for local development.
3. For the identity making the calls, an IAM role that includes the `aiplatform.endpoints.predict` permission, such as Agent Platform User (`roles/aiplatform.user`). For details, see Google Cloud's [Agent Platform partner models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models) page.
4. Google Cloud credentials for that identity. For the SDK examples, you might need to run `gcloud auth application-default login` to authenticate with Google Cloud. The cURL examples for Claude Models on Google Cloud (Google managed) get their token with `gcloud auth print-access-token`. That command uses the gcloud CLI's own login, not Application Default Credentials. For those examples, run `gcloud auth login` or `gcloud init` first.
### Install an SDK
Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support Claude Models on Google Cloud (Google managed) through `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`). Install the package that provides it:
<Tabs>
<Tab title="Python">
```bash
pip install -U "anthropic[vertex]"
```
</Tab>
<Tab title="TypeScript">
```bash
npm install @anthropic-ai/vertex-sdk
```
</Tab>
<Tab title="C#">
```bash
dotnet add package Anthropic.Vertex
```
</Tab>
<Tab title="Go">
```bash
go get github.com/anthropics/anthropic-sdk-go/v2
```
</Tab>
<Tab title="Java">
<CodeGroup exclude="shell, python, typescript, csharp, go, php, ruby">
```groovy Gradle
implementation("com.anthropic:anthropic-java:3.1.0")
implementation("com.anthropic:anthropic-java-vertex:3.1.0")
```
```xml Maven
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>com.anthropic</groupId>
<artifactId>anthropic-java-vertex</artifactId>
<version>3.1.0</version>
</dependency>
```
</CodeGroup>
</Tab>
<Tab title="PHP">
```bash
composer require anthropic-ai/sdk google/auth
```
</Tab>
<Tab title="Ruby">
```bash
# Gemfile
gem "anthropic"
gem "googleauth"
```
</Tab>
</Tabs>
The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed).
## Making requests
Requests to Claude Models on Google Cloud (Google managed) go to an Agent Platform endpoint URL that ends in `:rawPredict`. Streaming requests use `:streamRawPredict` instead.
A request is nearly identical to a [Messages API](https://platform.claude.com/docs/en/api/messages/create) request. It differs in two main ways:
* **Model:** The endpoint URL names the model. In a cURL request, leave `model` out of the body.
* **Version:** In a cURL request, pass `anthropic_version` in the body, not as a header. Set it to `vertex-2023-10-16`, or to [API version `2026-10-21`](https://platform.claude.com/docs/en/api/migration-2026-10-21).
The following examples use the global endpoint. For the other endpoint types, see [Global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints).
<CodeGroup exclude="shell:CLI">
```bash cURL
curl https://aiplatform.googleapis.com/v1/projects/MY_PROJECT_ID/locations/global/publishers/anthropic/models/claude-opus-5-5:rawPredict \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json" \
-d '{
"anthropic_version": "vertex-2023-10-16",
"messages": [{"role": "user", "content": "Hey Claude!"}],
"max_tokens": 100
}'
```
<CodeGroupItem language="CLI">
The `ant` CLI doesn't support Claude Models on Google Cloud (Google managed).
</CodeGroupItem>
```python Python
from anthropic import AnthropicVertex
project_id = "MY_PROJECT_ID"
region = "global"
client = AnthropicVertex(project_id=project_id, region=region)
message = client.messages.create(
model="claude-opus-5-5",
max_tokens=100,
messages=[
{
"role": "user",
"content": "Hey Claude!",
}
],
)
print(message)
```
```typescript TypeScript
import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";
const projectId = "MY_PROJECT_ID";
const region = "global";
// Goes through the standard `google-auth-library` flow.
const client = new AnthropicVertex({
projectId,
region
});
const result = await client.messages.create({
model: "claude-opus-5-5",
max_tokens: 100,
messages: [
{
role: "user",
content: "Hey Claude!"
}
]
});
console.log(JSON.stringify(result, null, 2));
```
```csharp C#
using Anthropic.Models.Messages;
using Anthropic.Vertex;
var projectId = "MY_PROJECT_ID";
var region = "global";
var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId));
var parameters = new MessageCreateParams
{
Model = Model.ClaudeOpus5_5,
MaxTokens = 100,
Messages = [new UserMessageParam { Content = "Hey Claude!" }]
};
var message = await client.Messages.Create(parameters);
Console.WriteLine(message);
```
```go Go
import (
"context"
"fmt"
"github.com/anthropics/anthropic-sdk-go/v2"
"github.com/anthropics/anthropic-sdk-go/v2/vertex"
)
// ...
// Uses default Google Cloud credentials
client := anthropic.NewClient(
vertex.WithGoogleAuth(context.Background(), "global", "MY_PROJECT_ID"),
)
message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
Model: anthropic.ModelClaudeOpus5_5,
MaxTokens: 100,
Messages: []anthropic.MessageParam{
anthropic.NewUserMessage(anthropic.NewTextBlock("Hey Claude!")),
},
})
if err != nil {
panic(err)
}
fmt.Printf("%+v\n", message)
```
```java Java
import com.anthropic.client.AnthropicClient;
import com.anthropic.client.okhttp.AnthropicOkHttpClient;
import com.anthropic.models.messages.Message;
import com.anthropic.models.messages.MessageCreateParams;
import com.anthropic.models.messages.Model;
import com.anthropic.vertex.backends.VertexBackend;
import com.google.auth.oauth2.GoogleCredentials;
void main() throws Exception {
AnthropicClient client = AnthropicOkHttpClient.builder()
.backend(
VertexBackend.builder()
.googleCredentials(GoogleCredentials.getApplicationDefault())
.region("global")
.project("MY_PROJECT_ID")
.build()
)
.build();
Message message = client
.messages()
.create(
MessageCreateParams.builder()
.model(Model.CLAUDE_OPUS_5_5)
.maxTokens(100)
.addUserMessage("Hey Claude!")
.build()
);
IO.println(message);
}
```
```php PHP
<?php
use Anthropic\Messages\TextBlock;
use Anthropic\Vertex;
$client = Vertex\Client::fromEnvironment(
region: 'global',
projectId: 'MY_PROJECT_ID',
);
$message = $client->messages->create(
maxTokens: 100,
messages: [
['role' => 'user', 'content' => 'Hey Claude!']
],
model: 'claude-opus-5-5',
);
foreach ($message->content as $block) {
if ($block instanceof TextBlock) {
echo $block->text . PHP_EOL;
}
}
```
```ruby Ruby
require "anthropic"
client = Anthropic::VertexClient.new(
region: "global",
project_id: "MY_PROJECT_ID"
)
message = client.messages.create(
model: "claude-opus-5-5",
max_tokens: 100,
messages: [{role: "user", content: "Hey Claude!"}]
)
puts message.content.find { it.type == :text }.text
```
</CodeGroup>
### API model IDs
| Model | Agent Platform API model ID |
| :---------------------------------------------------------------------------------------------------- | :--------------------------- |
| Claude Fable 5.1 | `claude-fable-5-1` |
| Claude Mythos 5.1 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5-1` |
| Claude Fable 5 | `claude-fable-5` |
| Claude Mythos 5 ([limited availability](https://support.claude.com/en/articles/14604842)) | `claude-mythos-5` |
| Claude Opus 5.5 | `claude-opus-5-5` |
| Claude Opus 5 | `claude-opus-5` |
| Claude Opus 4.8 | `claude-opus-4-8` |
| Claude Opus 4.7 | `claude-opus-4-7` |
| Claude Opus 4.6 | `claude-opus-4-6` |
| Claude Opus 4.5 | `claude-opus-4-5@20251101` |
| Claude Opus 4.1 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-opus-4-1@20250805` |
| Claude Opus 4 ([deprecated](https://platform.claude.com/docs/en/about-claude/model-deprecations)) | `claude-opus-4@20250514` |
| Claude Sonnet 5.5 | `claude-sonnet-5-5` |
Cut at 300 lines. The page has the rest.
build-with-claude/claude-models-on-google-cloud/overview New page · 79 lines, new page
## How the two Google Cloud offerings differ ## What both offerings share ## Moving between the two offerings ## Which offering are you using? ## Next steps
A whole new page. There's nothing to diff it against, so here is what it says.
---
title: Claude Models on Google Cloud
url: https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/overview
description: Compare Claude Models on Google Cloud (Anthropic managed) and Claude Models on Google Cloud (Google managed), and find out which one you use.
---
You can use Claude through your Google Cloud project in two ways:
* **[Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed):** Anthropic operates the [Claude API](https://platform.claude.com/docs/en/api/overview).
* **[Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed):** Google operates Claude models as part of Google Cloud's Agent Platform.
## How the two Google Cloud offerings differ
The following table compares Claude Models on Google Cloud (Anthropic managed) with Claude Models on Google Cloud (Google managed).
| Aspect | [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **API surface** | Claude API endpoints<br />`/v1/{endpoint}` | Agent Platform prediction endpoints |
| **Request format** | Same as the Claude API<br />`model` in the request body<br />`anthropic-version` header | `model` in the URL<br />`anthropic_version` in the request body |
| **Streaming** | `"stream": true` in the request body | A separate `:streamRawPredict` endpoint |
| **Location** | `global`<br />See [Project, location, and workspace resolution](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution). | A global, multi-region, or regional endpoint<br />See [Global, multi-region, and regional endpoints](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints). |
| **Model IDs for models earlier than Claude 4.6** | The Claude API ID<br />Example: `claude-haiku-4-5-20251001` | The Claude API ID, with `@` in place of the hyphen before the snapshot date<br />Example: `claude-haiku-4-5@20251001`<br />See [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions). |
| **Services to enable on your project** | See [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). | The Agent Platform API<br />`aiplatform.googleapis.com` |
| **Anthropic organization** | A new Anthropic organization for your project | None |
| **Billing** | Google Cloud Marketplace | Google Cloud, as Agent Platform usage |
| **Rate limits** | Managed by Anthropic | Managed by Google Cloud |
## What both offerings share
* **Credentials:** Both offerings use Google Cloud credentials, including Application Default Credentials. You grant access to each offering separately, through its own IAM roles.
* [Credentials for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication)
* [Credentials for Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#before-making-api-calls)
* **Billing:** Charges for both offerings appear on your Google Cloud bill.
* [Billing for Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#billing)
* [Billing for Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#billing)
* **Model IDs:** Claude 4.6 and later models use their Claude API IDs on both offerings. See [Model IDs and versioning](https://platform.claude.com/docs/en/about-claude/models/model-ids-and-versions).
* **SDKs:** Anthropic's [client SDKs](https://platform.claude.com/docs/en/cli-sdks-libraries/overview) support both offerings.
## Moving between the two offerings
Follow the steps for whichever offering you're moving to:
* [Steps for moving to Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#migrating-from-google-managed)
* [Steps for moving to Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed#migrating-from-anthropic-managed)
## Which offering are you using?
The following table lists values that identify Claude Models on Google Cloud (Anthropic managed) and Claude Models on Google Cloud (Google managed). Find a value you already have. For example, look for the host in your request URLs or the SDK client in your code. The heading of that value's column is your offering.
| What to check | [Claude Models on Google Cloud (Anthropic managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed) | [Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed) |
| ----------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Where your requests go** | `claude.googleapis.com`<br />The URL includes your workspace ID.<br />It ends in a Claude API path, such as `.../invoke/v1/messages`. | One of these Agent Platform hosts:<br />`aiplatform.googleapis.com`<br />`aiplatform.us.rep.googleapis.com`<br />`aiplatform.eu.rep.googleapis.com`<br />`{region}-aiplatform.googleapis.com`<br />The URL path contains `.../publishers/anthropic/models/{model}`.<br />It ends in `:rawPredict` or `:streamRawPredict`. |
| **SDK client in your code** | `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`)<br />In every SDK, the client name contains `GoogleCloud` (all lowercase in Go). | `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`)<br />In every SDK, the client name contains `Vertex` (all lowercase in Go). |
| **IAM roles that grant access** | `roles/claude.admin`<br />`roles/claude.user`<br />`roles/claude.viewer` | Agent Platform IAM roles |
| **Management console** | The Claude Console, at `platform.claude.com`<br />You open it from the Google Cloud console. | The Google Cloud console |
| **Where each offering appears in the Google Cloud console** | The option labeled **Anthropic managed**<br />See [Set up your account](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account). | Claude models in [Model Garden](https://cloud.google.com/model-garden) |
If you call `api.anthropic.com` with an API key, you use neither offering. To move those calls to Claude Models on Google Cloud (Anthropic managed), see [Moving from an existing Anthropic organization](https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed#moving-from-an-existing-anthropic-organization).
## Next steps
<CardGroup cols={2}>
<Card title="Claude Models on Google Cloud (Anthropic managed)" icon="cloud" href="https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/anthropic-managed">
Set up your account and make your first request.
</Card>
<Card title="Claude Models on Google Cloud (Google managed)" icon="cloud" href="https://platform.claude.com/docs/en/build-with-claude/claude-models-on-google-cloud/google-managed">
Install an SDK and make your first request.
</Card>
<Card title="IAM permissions for Claude Models on Google Cloud (Anthropic managed)" icon="lock" href="https://platform.claude.com/docs/en/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions">
Look up permissions, roles, and audit log types.
</Card>
</CardGroup>
build-with-claude/claude-on-amazon-bedrock-legacy Changed · +56 / -56 lines
build-with-claude/claude-on-vertex-ai Page removed · 763 lines, page removed
## Before making API calls ### Install an SDK ## Making requests ### API model IDs ## Global, multi-region, and regional endpoints ## Feature support ### Features not supported ### Context window ## Billing, rate limits, and logging ### Rate limits ### Billing ### Data retention ### Monitoring and logging ## Migrating from Claude Models on Google Cloud (Anthropic managed) ## Next steps
The page is gone upstream. What it last said is kept here.
build-with-claude/claude-platform-on-aws Changed · +31 / -28 lines
build-with-claude/compaction-threshold Changed · +31 / -28 lines
build-with-claude/context-editing Changed · +7 / -7 lines
build-with-claude/effort Changed · +4 / -3 lines
build-with-claude/fast-mode Changed · +31 / -28 lines
build-with-claude/files Changed · +3 / -2 lines
build-with-claude/handling-stop-reasons Changed · +60 / -52 lines
build-with-claude/mid-conversation-effort-example Changed · +180 / -174 lines
build-with-claude/pdf-support Changed · +227 / -200 lines
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
build-with-claude/preserved-thinking Changed · +3 / -3 lines
build-with-claude/prompt-caching Changed · +229 / -225 lines
The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.