---
title: Claude Models on Google Cloud (Google managed)
url: https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed
description: Google betreibt Claude Models on Google Cloud (Google managed) als Teil von Google Cloud's Agent Platform. Du kannst Claude mit den Client-SDKs von Anthropic aufrufen.
---

[Claude Models on Google Cloud](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/overview) vergleicht die beiden Google Cloud-Angebote. Dort erfährst du auch, wie du erkennst, welches du verwendest.

## Vor API-Aufrufen

Um Claude Models on Google Cloud (Google managed) zu verwenden, benötigst du:

1. Ein Google Cloud-Projekt, das Agent Platform verwenden kann. Die Einrichtungsschritte findest du auf der Google Cloud-Seite [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude).
2. Die installierte [gcloud CLI](https://cloud.google.com/sdk/docs/install) für die lokale Entwicklung.
3. Für die Identität, die die Aufrufe ausführt, eine IAM-Rolle, die die Berechtigung `aiplatform.endpoints.predict` enthält, zum Beispiel Agent Platform User (`roles/aiplatform.user`). Details findest du auf der Google Cloud-Seite [Agent Platform partner models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/use-partner-models).
4. Google Cloud-Anmeldedaten für diese Identität. Für die SDK-Beispiele musst du möglicherweise `gcloud auth application-default login` ausführen, um dich bei Google Cloud zu authentifizieren. Die cURL-Beispiele für Claude Models on Google Cloud (Google managed) beziehen ihr Token mit `gcloud auth print-access-token`. Dieser Befehl verwendet die eigene Anmeldung der gcloud CLI, nicht die Application Default Credentials. Führe für diese Beispiele zuerst `gcloud auth login` oder `gcloud init` aus.

### Ein SDK installieren

Die [Client-SDKs](https://platform.claude.com/docs/de/cli-sdks-libraries/overview) von Anthropic unterstützen Claude Models on Google Cloud (Google managed) über `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`). Installiere das Paket, das dies bereitstellt:

<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
    ```
  </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>

Die `ant` CLI unterstützt Claude Models on Google Cloud (Google managed) nicht.

## Anfragen stellen

Anfragen an Claude Models on Google Cloud (Google managed) gehen an eine Agent Platform-Endpunkt-URL, die auf `:rawPredict` endet. „Streaming"-Anfragen (Streaming-Anfragen) verwenden stattdessen `:streamRawPredict`.

Eine Anfrage ist nahezu identisch mit einer Anfrage an die [Messages API](https://platform.claude.com/docs/de/api/messages/create). Sie unterscheidet sich in zwei wesentlichen Punkten:

* **Modell:** Die Endpunkt-URL benennt das Modell. Lass in einer cURL-Anfrage `model` im Body weg.
* **Version:** Übergib in einer cURL-Anfrage `anthropic_version` im Body, nicht als Header. Setze den Wert auf `vertex-2023-10-16` oder auf [API-Version `2026-10-21`](https://platform.claude.com/docs/de/api/migration-2026-10-21).

Die folgenden Beispiele verwenden den globalen Endpunkt. Informationen zu den anderen Endpunkttypen findest du unter [Globale, multiregionale und regionale Endpunkte](https://platform.claude.com/docs/de/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">
    Die `ant` CLI unterstützt Claude Models on Google Cloud (Google managed) nicht.
  </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";

  // Durchläuft den Standard-Flow von `google-auth-library`.
  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"
  	"github.com/anthropics/anthropic-sdk-go/vertex"
  )
  // ...
  	// Verwendet die Standard-Anmeldedaten von Google Cloud
  	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-Modell-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/de/about-claude/model-deprecations))   | `claude-opus-4-1@20250805`   |
| Claude Opus 4 ([deprecated](https://platform.claude.com/docs/de/about-claude/model-deprecations))     | `claude-opus-4@20250514`     |
| Claude Sonnet 5.5                                                                                     | `claude-sonnet-5-5`          |
| Claude Sonnet 5                                                                                       | `claude-sonnet-5`            |
| Claude Sonnet 4.6                                                                                     | `claude-sonnet-4-6`          |
| Claude Sonnet 4.5 ([deprecated](https://platform.claude.com/docs/de/about-claude/model-deprecations)) | `claude-sonnet-4-5@20250929` |
| Claude Sonnet 4 ([deprecated](https://platform.claude.com/docs/de/about-claude/model-deprecations))   | `claude-sonnet-4@20250514`   |
| Claude Haiku 5.5                                                                                      | `claude-haiku-5-5`           |
| Claude Haiku 4.5                                                                                      | `claude-haiku-4-5@20251001`  |
| Claude Haiku 3.5 ([deprecated](https://platform.claude.com/docs/de/about-claude/model-deprecations))  | `claude-3-5-haiku@20241022`  |

Claude Models on Google Cloud (Google managed) bietet in verschiedenen Regionen unterschiedliche Claude-Modelle an. Um zu prüfen, welche Modelle eine Region anbietet, suche in [Model Garden](https://cloud.google.com/model-garden) nach „Claude" oder sieh dir die Google Cloud-Seite [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude) an.

Google legt die Lebenszyklusdaten für die Modelle fest, die Claude Models on Google Cloud (Google managed) bereitstellt. Diese Daten können vom Zeitplan der Claude API abweichen. Das aktuelle Einstellungsdatum eines Modells findest du auf der Google Cloud-Seite [Anthropic Claude models on Agent Platform](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude). Was „Abgekündigt" und „Eingestellt" bedeuten, erfährst du unter [Modellabkündigungen](https://platform.claude.com/docs/de/about-claude/model-deprecations).

<Note>
  Claude Mythos Preview ist eine Research Preview. Claude Models on Google Cloud (Google managed) bietet sie eingeladenen Kunden an. Weitere Informationen findest du unter [Project Glasswing](https://anthropic.com/glasswing).
</Note>

<Tip>
  Du wechselst auf ein neueres Claude-Modell? Der [Claude API Skill](https://platform.claude.com/docs/de/agents-and-tools/agent-skills/claude-api-skill#migrating-to-a-newer-claude-model) in Claude Code wendet Modell-ID-Austausche und inkompatible Parameteränderungen in deiner gesamten Codebasis an:

  Lass Claude Code deinen Code für dich migrieren

  ```text
  /claude-api migrate dieses Projekt auf das neueste Claude Opus-Modell
  ```

  Der Skill erkennt, auf welche Cloud-Plattform dein Code abzielt, und passt Modell-ID-Formate und Funktionsänderungen für diese Plattform an.
</Tip>

## Globale, multiregionale und regionale Endpunkte

Claude Models on Google Cloud (Google managed) bietet drei Endpunkttypen an. Du wählst einen über den Regionswert aus, den du beim Erstellen des Clients übergibst. In einer cURL-Anfrage legt der Endpunkttyp den Host und das `locations`-Segment der URL fest.

| Endpunkttyp            | Regionswert                            | Host                                                                       |
| ---------------------- | -------------------------------------- | -------------------------------------------------------------------------- |
| **Global** (empfohlen) | `"global"`                             | `aiplatform.googleapis.com`                                                |
| **Multiregional**      | `"us"` oder `"eu"`                     | `aiplatform.us.rep.googleapis.com`<br />`aiplatform.eu.rep.googleapis.com` |
| **Regional**           | Eine Region, zum Beispiel `"us-east5"` | `{region}-aiplatform.googleapis.com`                                       |

Die Endpunkttypen unterscheiden sich darin, wohin sie Anfragen senden:

* **Global:** Anfragen gehen an eine beliebige Region mit verfügbarer Kapazität. Verwende diesen Typ, wenn du maximale Verfügbarkeit möchtest und die Datenresidenz flexibel ist.
* **Multiregional:** Anfragen gehen an eine beliebige Region in den Vereinigten Staaten (`"us"`) oder der Europäischen Union (`"eu"`). Verwende diesen Typ, wenn du Datenresidenz innerhalb eines größeren geografischen Raums und eine höhere Verfügbarkeit als bei einer einzelnen Region benötigst.
* **Regional:** Anfragen gehen nur an die von dir angegebene Region, zum Beispiel `"us-east5"` oder `"europe-west1"`. Verwende diesen Typ, wenn du Datenresidenz in einer einzelnen Region benötigst oder strenge Compliance-Vorgaben erfüllen musst.

Multiregionale und regionale Endpunkte kosten 10 % mehr als globale Endpunkte. Alle drei Endpunkttypen akzeptieren Pay-as-you-go-Traffic, und Provisioned Throughput erfordert einen regionalen Endpunkt.

Regionale Endpunkte stellen nur Claude Sonnet 4.6 und frühere Modelle bereit. Verwende für neuere Modelle einen globalen oder multiregionalen Endpunkt.

<Note>
  Der Aufpreis für multiregionale und regionale Endpunkte gilt nur für Claude Sonnet 4.5 (abgekündigt) und spätere Modelle. Die Modelle, die ihre frühere Preisgestaltung behalten, findest du unter [Preise für Cloud-Plattformen](https://platform.claude.com/docs/de/about-claude/pricing#cloud-platform-pricing). Bei regionalen Endpunkten spiegelt der Aufpreis die Infrastrukturkosten für dedizierte regionale Kapazität wider.
</Note>

Die folgenden Beispiele verwenden den multiregionalen Endpunkt `us`. Die hervorgehobenen Zeilen legen die Region fest. Eine vollständige Anfrage an den globalen Endpunkt findest du unter [Anfragen stellen](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#accessing-vertex-ai).

<CodeGroup exclude="shell:CLI">
  ```bash cURL
  # Die Multi-Region-Kennung, "us" oder "eu", erscheint im Hostnamen und im Pfad
  curl https://aiplatform.us.rep.googleapis.com/v1/projects/MY_PROJECT_ID/locations/us/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">
    Die `ant` CLI unterstützt Claude Models on Google Cloud (Google managed) nicht.
  </CodeGroupItem>

  ```python Python
  from anthropic import AnthropicVertex

  project_id = "MY_PROJECT_ID"
  region = "us"  # Multi-region identifier: "us" or "eu"

  client = AnthropicVertex(project_id=project_id, region=region)
  ```

  ```typescript TypeScript
  import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";

  const projectId = "MY_PROJECT_ID";
  const region = "us"; // Multi-region identifier: "us" or "eu"

  const client = new AnthropicVertex({
    projectId,
    region
  });
  ```

  ```csharp C#
  using Anthropic.Vertex;

  var projectId = "MY_PROJECT_ID";
  var region = "us"; // Multi-region identifier: "us" or "eu"

  var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId));
  ```

  ```go Go
  import (
  	"context"

  	"github.com/anthropics/anthropic-sdk-go"
  	"github.com/anthropics/anthropic-sdk-go/vertex"
  )
  // ...
  	// Multi-Region-Kennung: "us" oder "eu"
  	client := anthropic.NewClient(
  		vertex.WithGoogleAuth(context.Background(), "us", "MY_PROJECT_ID"),
  	)
  ```

  ```java Java
  import com.anthropic.client.AnthropicClient;
  import com.anthropic.client.okhttp.AnthropicOkHttpClient;
  import com.anthropic.vertex.backends.VertexBackend;
  import com.google.auth.oauth2.GoogleCredentials;

  void main() throws Exception {
      // Multi-Region-Kennung: "us" oder "eu"
      AnthropicClient client = AnthropicOkHttpClient.builder()
          .backend(
              VertexBackend.builder()
                  .googleCredentials(GoogleCredentials.getApplicationDefault())
                  .region("us")
                  .project("MY_PROJECT_ID")
                  .build()
          )
          .build();
  }
  ```

  ```php PHP
  use Anthropic\Vertex;

  $client = Vertex\Client::fromEnvironment(
      region: 'us', // Multi-region identifier: "us" or "eu"
      projectId: 'MY_PROJECT_ID',
  );
  ```

  ```ruby Ruby
  require "anthropic"

  client = Anthropic::VertexClient.new(
    region: "us", # Multi-region identifier: "us" or "eu"
    project_id: "MY_PROJECT_ID"
  )
  ```
</CodeGroup>

## Unterstützte Funktionen

Zu den Funktionen, die auf Claude Models on Google Cloud (Google managed) unterstützt werden, gehören:

* [Messages API](https://platform.claude.com/docs/de/api/messages/create)

* [„Prompt caching" (Prompt-Caching)](https://platform.claude.com/docs/de/build-with-claude/prompt-caching)

* [„Thinking" (Nachdenken)](https://platform.claude.com/docs/de/build-with-claude/thinking)

* [„Tool use" (Tool-Nutzung)](https://platform.claude.com/docs/de/agents-and-tools/tool-use/overview), einschließlich dieser Tools:

  * [Bash-Tool](https://platform.claude.com/docs/de/agents-and-tools/tool-use/bash-tool)
  * [Browser-Use-Tool](https://platform.claude.com/docs/de/agents-and-tools/tool-use/browser-use-tool)
  * [Computer-Use-Tool](https://platform.claude.com/docs/de/agents-and-tools/tool-use/computer-use-tool)
  * [Memory-Tool](https://platform.claude.com/docs/de/agents-and-tools/tool-use/memory-tool)
  * [Texteditor-Tool](https://platform.claude.com/docs/de/agents-and-tools/tool-use/text-editor-tool)
  * [Websuche-Tool](https://platform.claude.com/docs/de/agents-and-tools/tool-use/web-search-tool)

* [Zitate](https://platform.claude.com/docs/de/build-with-claude/citations)

* [Strukturierte Ausgaben](https://platform.claude.com/docs/de/build-with-claude/structured-outputs)

Die [Funktionsübersicht](https://platform.claude.com/docs/de/build-with-claude/overview) listet jede Funktion auf und zeigt, ob Claude Models on Google Cloud (Google managed) sie unterstützt.

### Nicht unterstützte Funktionen

Claude Models on Google Cloud (Google managed) unterstützt Folgendes nicht:

* **Eingabequellen:** URL-Quellen für Bilder und Dokumente sowie die Files API
* **Serverseitige Tools:** Codeausführung, Web Fetch und Advisor
* **Agent-Infrastruktur:** Agent Skills, MCP-Connector und programmatischer Tool-Aufruf
* **API-Endpunkte:** Message Batches API, Models API, Admin API, Compliance API sowie Usage and Cost API
* **Claude Managed Agents**
* **Serverseitiger Fallback:** Der [`fallbacks`-Parameter](https://platform.claude.com/docs/de/build-with-claude/refusals-and-fallback#server-side-fallback)

Verwende anstelle des serverseitigen Fallbacks das [clientseitige Fallback-Muster](https://platform.claude.com/docs/de/build-with-claude/refusals-and-fallback#client-side-fallback).

### Kontextfenster

Claude Models on Google Cloud (Google managed) bietet für diese Modelle ein [„context window" (Kontextfenster) mit 1M Token](https://platform.claude.com/docs/de/build-with-claude/context-windows):

* Claude Fable 5.1
* Claude Fable 5
* Claude Opus 5.5
* Claude Opus 5
* Claude Opus 4.8
* Claude Opus 4.7
* Claude Opus 4.6
* Claude Sonnet 5.5
* Claude Sonnet 5
* Claude Sonnet 4.6
* Claude Haiku 5.5

Andere Claude-Modelle haben ein Kontextfenster mit 200k Token. Dazu gehören Claude Sonnet 4.5 (abgekündigt) und Claude Sonnet 4 (abgekündigt).

Agent Platform begrenzt Anfrage-Payloads auf 30 MB. Wenn du große Dokumente oder viele Bilder sendest, erreichst du dieses Limit möglicherweise vor dem Token-Limit.

## Abrechnung, Ratenlimits und Protokollierung

### Ratenlimits

Google Cloud verwaltet „rate limits" (Ratenlimits) und Kontingente für Claude Models on Google Cloud (Google managed). Details, einschließlich der Beantragung einer Kontingenterhöhung, findest du auf der Google Cloud-Seite [Quotas for Anthropic Claude models](https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude/quotas).

### Abrechnung

Google Cloud stellt dir Claude Models on Google Cloud (Google managed) in Rechnung. Preise findest du auf der Google Cloud-Seite [Generative AI pricing](https://cloud.google.com/vertex-ai/generative-ai/pricing#claude-models). Die Preise hängen auch vom Endpunkttyp ab. Siehe [Globale, multiregionale und regionale Endpunkte](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#global-multi-region-and-regional-endpoints).

### Datenaufbewahrung

Google Cloud regelt den Umgang mit Daten für Claude Models on Google Cloud (Google managed). Details findest du unter [Agent Platform and zero data retention](https://cloud.google.com/vertex-ai/generative-ai/docs/data-governance).

### Überwachung und Protokollierung

Um Prompts und Completions für Claude Models on Google Cloud (Google managed) zu protokollieren, verwende den [Request-Response-Logging-Dienst](https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/request-response-logging) von Agent Platform.

Anthropic empfiehlt, mindestens die Protokolle der letzten 30 Tage aufzubewahren. Die Protokolle helfen dir, deine Aktivität nachzuvollziehen und möglichen Missbrauch zu untersuchen.

<Note>
  Das Aktivieren dieses Dienstes gewährt weder Google noch Anthropic Zugriff auf deine Inhalte.
</Note>

## Migration von Claude Models on Google Cloud (Anthropic managed)

Was sich beim Wechsel ändert, erfährst du unter [Wie sich die beiden Google Cloud-Angebote unterscheiden](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/overview#how-the-two-google-cloud-offerings-differ). Um zu Claude Models on Google Cloud (Google managed) zu wechseln, führe diese Schritte aus:

<Steps>
  <Step title="Zugriff einrichten">
    Prüfe, ob dein Projekt und die Identität, die die Aufrufe ausführt, die Anforderungen unter [Vor API-Aufrufen](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#before-making-api-calls) erfüllen.
  </Step>

  <Step title="Das SDK-Paket installieren">
    Installiere das Paket, das den Client für Claude Models on Google Cloud (Google managed) bereitstellt. Siehe [Ein SDK installieren](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#install-an-sdk-for-accessing-vertex-ai).
  </Step>

  <Step title="Import und Client ersetzen">
    Ändere den Code, der deinen Client importiert und erstellt. Verwende `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`) anstelle von `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`). Eine cURL-Anfrage benötigt eine neue URL, neue Header und einen neuen Body. Der folgende Code erstellt den Client für Claude Models on Google Cloud (Anthropic managed), den du heute verwendest:

    <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()
      ```

      ```typescript TypeScript
      import { AnthropicGoogleCloud } from "@anthropic-ai/google-cloud-sdk";

      const client = new AnthropicGoogleCloud();
      ```

      ```csharp C#
      using Anthropic.GoogleCloud;

      var client = new AnthropicGoogleCloudClient();
      ```

      ```go Go
      import (
      	"context"

      	"github.com/anthropics/anthropic-sdk-go"
      	"github.com/anthropics/anthropic-sdk-go/googlecloud"
      )
      // ...
      	client, err := googlecloud.NewClient(context.Background(), googlecloud.ClientConfig{})
      	if err != nil {
      		panic(err)
      	}
      ```

      ```java Java
      import com.anthropic.client.AnthropicClient;
      import com.anthropic.client.okhttp.AnthropicOkHttpClient;
      import com.anthropic.googlecloud.backends.GoogleCloudBackend;

      void main() {
          AnthropicClient client = AnthropicOkHttpClient.builder()
              .backend(GoogleCloudBackend.fromEnv())
              .build();
      }
      ```

      ```php PHP
      use Anthropic\GoogleCloud\Client;

      $client = new Client();
      ```

      ```ruby Ruby
      require "anthropic"

      client = Anthropic::GoogleCloudClient.new
      ```
    </CodeGroup>

    Der folgende Code erstellt den Client für Claude Models on Google Cloud (Google managed). Er verwendet den globalen Endpunkt. Informationen zu den anderen Endpunkttypen findest du unter [Globale, multiregionale und regionale Endpunkte](https://platform.claude.com/docs/de/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">
        Die `ant` CLI unterstützt Claude Models on Google Cloud (Google managed) nicht. Verwende stattdessen cURL oder ein SDK.
      </CodeGroupItem>

      ```python Python
      from anthropic import AnthropicVertex

      project_id = "MY_PROJECT_ID"
      region = "global"

      client = AnthropicVertex(project_id=project_id, region=region)
      ```

      ```typescript TypeScript
      import { AnthropicVertex } from "@anthropic-ai/vertex-sdk";

      const projectId = "MY_PROJECT_ID";
      const region = "global";

      const client = new AnthropicVertex({
        projectId,
        region
      });
      ```

      ```csharp C#
      using Anthropic.Vertex;

      var projectId = "MY_PROJECT_ID";
      var region = "global";

      var client = new AnthropicVertexClient(new AnthropicVertexCredentials(region, projectId));
      ```

      ```go Go
      import (
      	"context"

      	"github.com/anthropics/anthropic-sdk-go"
      	"github.com/anthropics/anthropic-sdk-go/vertex"
      )
      // ...
      	// Verwendet die Standard-Anmeldedaten von Google Cloud
      	client := anthropic.NewClient(
      		vertex.WithGoogleAuth(context.Background(), "global", "MY_PROJECT_ID"),
      	)
      ```

      ```java Java
      import com.anthropic.client.AnthropicClient;
      import com.anthropic.client.okhttp.AnthropicOkHttpClient;
      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();
      }
      ```

      ```php PHP
      use Anthropic\Vertex;

      $client = Vertex\Client::fromEnvironment(
          region: 'global',
          projectId: 'MY_PROJECT_ID',
      );
      ```

      ```ruby Ruby
      require "anthropic"

      client = Anthropic::VertexClient.new(
        region: "global",
        project_id: "MY_PROJECT_ID"
      )
      ```
    </CodeGroup>

    Dieser Code übergibt beim Erstellen des Clients deine Projekt-ID und eine Region. Ersetze `MY_PROJECT_ID` durch deine Projekt-ID. Die Messages API-Aufrufe, die du mit dem Client ausführst, bleiben unverändert. Ausnahmen sind die Modell-IDs und Funktionen im nächsten Schritt.
  </Step>

  <Step title="Modell-IDs und Funktionen prüfen">
    * **Modell-IDs:** Wenn du ein Modell vor Claude 4.6 verwendest, ersetze den Bindestrich vor dem Snapshot-Datum in seiner ID durch `@`. Zum Beispiel wird `claude-haiku-4-5-20251001` zu `claude-haiku-4-5@20251001`. Die Modelle und ihre IDs findest du unter [API-Modell-IDs](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#api-model-ids).
    * **Funktionen:** Prüfe, dass die Funktionen, die dein Code verwendet, nicht unter [Nicht unterstützte Funktionen](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#features-not-supported) aufgeführt sind.
  </Step>

  <Step title="Eine Testanfrage ausführen">
    Führe die Anfrage unter [Anfragen stellen](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#accessing-vertex-ai) aus, um zu prüfen, ob deine Einrichtung funktioniert. Führe dann deinen eigenen Code aus. Bevor du Produktions-Traffic umstellst, lies die Informationen zu [Ratenlimits für Claude Models on Google Cloud (Google managed)](https://platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/google-managed#rate-limits).
  </Step>
</Steps>

## Nächste Schritte

<CardGroup cols={2}>
  <Card title="Funktionsübersicht" icon="stack" href="https://platform.claude.com/docs/de/build-with-claude/overview">
    Entdecke die Funktionen von Claude.
  </Card>

  <Card title="Anthropic Claude models on Agent Platform" icon="book" href="https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/partner-models/claude">
    Prüfe, welche Claude-Modelle jede Region anbietet, und ihre Einstellungsdaten.
  </Card>

  <Card title="Agent Platform-Dokumentation" icon="book" href="https://cloud.google.com/vertex-ai/docs">
    Lies die Agent Platform-Dokumentation von Google Cloud.
  </Card>

  <Card title="Globaler Endpunkt für Claude-Modelle" icon="link" href="https://cloud.google.com/blog/products/ai-machine-learning/global-endpoint-for-claude-models-generally-available-on-vertex-ai">
    Lies den Blogbeitrag von Google Cloud über den globalen Endpunkt für Claude-Modelle.
  </Card>
</CardGroup>
