---
title: Claude Models on Google Cloud (Anthropic managed)
url: https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed
description: Claude Models on Google Cloud (Anthropic managed) ist die Claude API, betrieben von Anthropic und erreichbar über dein Google Cloud-Projekt.
---

Google Cloud übernimmt Zugriff und Abrechnung für Claude Models on Google Cloud (Anthropic managed). Um die beiden Google Cloud-Angebote zu vergleichen oder zu prüfen, welches du verwendest, siehe [Claude Models on Google Cloud](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/overview).

## Dein Konto einrichten

Um dein Konto für Claude Models on Google Cloud (Anthropic managed) einzurichten, benötigst du Folgendes:

* Die Berechtigung, in Google Cloud Marketplace über dein Rechnungskonto Käufe zu tätigen
* Die Berechtigung, Dienste im Projekt zu aktivieren
* Eine [IAM-Rolle, mit der du die Claude Console öffnen kannst](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console), die du für Schritt 4 benötigst

Diese Schritte erstellen eine neue Anthropic-Organisation für dein Google Cloud-Projekt. Sie ist von jeder Anthropic-Organisation getrennt, die dein Unternehmen bereits hat. Das schließt eine Claude Enterprise-Organisation ein. Um von einer bestehenden Organisation umzuziehen, siehe [Umzug von einer bestehenden Anthropic-Organisation](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#moving-from-an-existing-anthropic-organization).

Wenn du einen bestehenden Rabatt hast, kontaktiere deinen Anthropic- oder Google Cloud-Ansprechpartner, bevor du mit diesen Schritten beginnst. Rabatte können nicht auf vergangene Nutzung angewendet werden.

<Steps>
  <Step title="Im Marketplace abonnieren">
    1. Öffne [Google Cloud Marketplace](https://console.cloud.google.com/marketplace) und suche den Eintrag **Claude Models on Google Cloud (Anthropic managed)**.
    2. Klicke auf **Subscribe** und schließe den Kaufvorgang ab.
    3. Kehre zum Eintrag zurück und klicke auf **Manage on Console**. Dadurch wird die Claude-Seite in der Google Cloud Console geöffnet.

    Um später zur Claude-Seite zurückzukehren, wähle dein Projekt in der Google Cloud Console aus. Gehe dann zu **Agent Platform > Models > Claude Platform** und wähle **Anthropic managed** aus.
  </Step>

  <Step title="Die Dienste aktivieren">
    Aktiviere zwei Dienste in jedem Projekt, das Claude Models on Google Cloud (Anthropic managed) aufruft:

    * `claude.googleapis.com` stellt die API für Claude Models on Google Cloud (Anthropic managed) bereit. Dieser Dienst definiert auch die IAM-Berechtigungen. Ohne ihn schlagen Aufrufe fehl.
    * `anthropic-managed-claude.cloudpartnerservices.goog` ist der Marketplace-Dienst, der die Nutzung des Projekts deinem Abonnement zuordnet.

    ```bash CLI
    gcloud services enable claude.googleapis.com \
      anthropic-managed-claude.cloudpartnerservices.goog \
      --project=my-project-id
    ```

    Ersetze `my-project-id` durch deine Projekt-ID.

    Du kannst beide auch über die Claude-Seite oder über **APIs & Services** aktivieren. Die Aktivierung ist ein einmaliger Schritt pro Projekt. Um zu prüfen, ob beide Dienste aktiviert sind, führe `gcloud services list --enabled --project=my-project-id` aus und suche nach beiden Namen.
  </Step>

  <Step title="Deine Anthropic-Organisation einrichten">
    1. Klicke auf der Claude-Seite auf **Activate**.
    2. Gib im Anthropic-Einrichtungsablauf eine Kontakt-E-Mail-Adresse ein.
    3. Öffne den Einrichtungslink, der an diese Adresse gesendet wurde.
    4. Gib den Namen der Organisation, den Rechtsformtyp, das Land und den beabsichtigten Verwendungszweck ein.
    5. Akzeptiere die Commercial Terms of Service und die Nutzungsrichtlinie von Anthropic.

    Die Kontaktadresse wird nur für die Einrichtung und für Servicehinweise verwendet. Wie Personen die Claude Console nach der Einrichtung öffnen, erfährst du unter [Die Claude Console verwenden](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
  </Step>

  <Step title="Die Claude Console öffnen">
    Wenn deine Anthropic-Organisation aktiv ist, ändert sich die Schaltfläche auf der Claude-Seite zu **Open Claude Console**. Klicke darauf. Google Cloud prüft deinen IAM-Zugriff. Anschließend leitet es deinen Browser zu `platform.claude.com` weiter. Du bist bei der neuen Organisation angemeldet.

    Während du in der Claude Console bist, [finde deine Workspace-ID](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id) und kopiere sie. Alle, die Claude Models on Google Cloud (Anthropic managed) aufrufen, benötigen sie. Gib sie an deine Entwickler weiter.
  </Step>
</Steps>

Um ein weiteres Projekt hinzuzufügen, wiederhole diese Schritte in diesem Projekt, beginnend mit Schritt 2.

### Fehlerbehebung bei der Kontoeinrichtung

Wenn bei der Einrichtung von Claude Models on Google Cloud (Anthropic managed) eines der folgenden Probleme auftritt, wende die jeweilige Lösung an:

* **`gcloud services enable` findet `anthropic-managed-claude.cloudpartnerservices.goog` nicht:** Führe den Befehl mit dem Konto aus, das den Marketplace-Kauf abgeschlossen hat, oder kontaktiere deinen Anthropic-Ansprechpartner.
* **Ein Berechtigungsfehler bei deinem ersten API-Aufruf:** Prüfe, ob `claude.googleapis.com` in dem Projekt aktiviert ist, das du aufrufst. Prüfe, ob der Aufrufer `roles/claude.user` oder `roles/claude.admin` für dieses Projekt hat. Was jede Rolle erlaubt, erfährst du unter [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles). Eine neue Berechtigung oder ein neu aktivierter Dienst kann einen Moment brauchen, bis er wirksam wird.
* **„Mit einem anderen Konto angemeldet“ nach dem Aufrufen des Einrichtungslinks:** Klicke auf **Abmelden und fortfahren**. Verwende dann die E-Mail-Adresse, die du in Schritt 3 eingegeben hast.
* **Die Schaltfläche zeigt „Finish Setup“ statt „Open Claude Console“:** Deine Anthropic-Organisation existiert, aber ihre Einrichtung ist nicht abgeschlossen. Ein Administrator muss das Formular mit den Organisationsdetails ausfüllen.
* **Die Seite „Nutzung“ zeigt nach deinem ersten API-Aufruf keine Daten:** Es kann einige Minuten dauern, bis Nutzungsdaten in der Claude Console erscheinen.

## Zugriff verwalten

### IAM-Rollen

Claude Models on Google Cloud (Anthropic managed) hat drei vordefinierte IAM-Rollen. Vergib Rollen auf Projektebene.

| Rolle | Anzeigename | Was sie erlaubt |
| ----- | ----- | ----- |
| `roles/claude.viewer` | Claude Viewer | Jede `get`- und `list`-Berechtigung für Workspace-Ressourcen<br />Diese Rolle ist schreibgeschützt. |
| `roles/claude.user` | Claude User | Alles, was `roles/claude.viewer` erlaubt, plus das Erstellen und Ändern von Workspace-Ressourcen<br />Dazu gehören das Senden von Nachrichten und das Zählen von Token. Außerdem gehört die Verwaltung von Batches, Dateien, Skills und Claude Managed Agents-Ressourcen dazu. |
| `roles/claude.admin` | Claude Admin | Alles, was `roles/claude.user` erlaubt, plus die Berechtigungen, die für deine Anthropic-Organisation geprüft werden<br />Routen auf Organisationsebene wirken auf deine Anthropic-Organisation als Ganzes, nicht auf einen einzelnen Workspace. |

Mit dem folgenden Befehl kann beispielsweise ein Dienstkonto Claude Models on Google Cloud (Anthropic managed) aufrufen:

```bash CLI
gcloud projects add-iam-policy-binding my-project-id \
  --member="serviceAccount:my-app@my-project-id.iam.gserviceaccount.com" \
  --role="roles/claude.user"
```

Zu Berechtigungen, vordefinierten Rollen und Audit-Log-Typen siehe [IAM-Berechtigungen für Claude Models on Google Cloud (Anthropic managed)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions).

Durch das Aktivieren von `claude.googleapis.com` wird ein Dienst-Agent für das Projekt erstellt. Entferne seine Rollenzuweisungen nicht. Wenn du sie entfernst, funktioniert Claude Models on Google Cloud (Anthropic managed) im Projekt nicht mehr.

### Die Claude Console verwenden

Mit Claude Models on Google Cloud (Anthropic managed) kannst du dich nicht mit einer E-Mail-Adresse bei deiner Anthropic-Organisation anmelden. Klicke stattdessen auf **Open Claude Console** auf der [Claude-Seite](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in der Google Cloud Console. Google Cloud IAM steuert, wer die Claude Console öffnen kann. Von den drei vordefinierten [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) erlaubt nur `roles/claude.admin` für das Projekt das Öffnen der Claude Console.

### Workspaces

In Claude Models on Google Cloud (Anthropic managed) erstellt die Einrichtung deine Anthropic-Organisation mit einem Workspace, dem Standard-Workspace. Um weitere Workspaces zu erstellen, [öffne die Claude Console](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) und gehe zu **Einstellungen > Arbeitsbereiche**. Auf derselben Seite kannst du jeden Workspace außer dem Standard-Workspace umbenennen oder archivieren. Jeder Workspace hat seine eigene [Workspace-ID](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). Dateien, Skills, Batches, Claude Managed Agents-Sessions und andere Workspace-Ressourcen gehören zu dem Workspace, dessen ID du [für die Anfrage festlegst](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution).

Du vergibst [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) auf Projektebene, daher gilt eine Rolle für jeden Workspace in diesem Projekt. Wenn Teams getrennten Zugriff benötigen, gib jedem Team ein eigenes Google Cloud-Projekt. Jedes Projekt hat seine eigene Anthropic-Organisation, wiederhole also die [Einrichtungsschritte](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) in jedem Projekt, beginnend mit Schritt 2.

## Vor API-Aufrufen

Um Claude Models on Google Cloud (Anthropic managed) aufzurufen, benötigst du Folgendes:

1. Ein Google Cloud-Projekt mit einem aktiven Abonnement und einer Anthropic-Organisation, deren Einrichtung abgeschlossen ist. Siehe [Dein Konto einrichten](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account).
2. Die installierte [gcloud CLI](https://cloud.google.com/sdk/docs/install) für die lokale Entwicklung.
3. Die Rolle `roles/claude.user`, für das Projekt an die Identität vergeben, die die Aufrufe durchführt.
4. Application Default Credentials für diese Identität. Siehe [Authentifizierung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication).
5. Deine Projekt-ID und deine [Workspace-ID](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id).

Um die Rolle für die lokale Entwicklung deinem eigenen Konto zuzuweisen, führe den folgenden Befehl aus. Du benötigst die Berechtigung, die IAM-Richtlinie des Projekts zu ändern.

```bash CLI
gcloud projects add-iam-policy-binding my-project-id \
  --member="user:you@example.com" \
  --role="roles/claude.user"
```

Ersetze `my-project-id` durch deine Projekt-ID. Ersetze `you@example.com` durch die E-Mail-Adresse deines Google-Kontos. Um das Projekt zu sehen, das gcloud verwendet, führe `gcloud config get-value project` aus. Zu Dienstkonten und den anderen Rollen siehe [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles).

### Deine Workspace-ID finden

Um deine Workspace-ID für Claude Models on Google Cloud (Anthropic managed) zu finden, [öffne die Claude Console](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) und gehe zu **Einstellungen > Arbeitsbereiche**. Die ID beginnt mit `wrkspc_`. Wenn du die Claude Console nicht öffnen kannst, bitte jemanden, der sie öffnen kann, dir die ID zu schicken.

Lege das Projekt und den Workspace als Umgebungsvariablen fest, damit der SDK-Client und die [`ant` CLI](https://code.saschaberens.de/_h/platform.claude.com/docs/de/cli-sdks-libraries/cli/quickstart) sie übernehmen:

```bash CLI
export ANTHROPIC_GOOGLE_CLOUD_PROJECT="my-project-id"
export ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID="wrkspc_01AbCdEf23GhIj"
```

### Ein SDK installieren

Der [SDK-Client](https://code.saschaberens.de/_h/platform.claude.com/docs/de/cli-sdks-libraries/overview) für Claude Models on Google Cloud (Anthropic managed) ist `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient()`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`). Der Client ermittelt deine Google-Anmeldedaten. Außerdem erstellt er die Basis-URL aus deinem Projekt, deinem Standort und deiner Workspace-ID.

<Note>
  Der SDK-Client für Claude Models on Google Cloud (Anthropic managed) befindet sich in der Beta-Phase.
</Note>

Installiere das Paket, das den Client bereitstellt:

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

  <Tab title="Java">
    <Tabs>
      <Tab title="Gradle">
        ```kotlin
        implementation("com.anthropic:anthropic-java:3.13.0")
        implementation("com.anthropic:anthropic-java-google-cloud:3.13.0")
        ```
      </Tab>

      <Tab title="Maven">
        ```xml
        <dependency>
            <groupId>com.anthropic</groupId>
            <artifactId>anthropic-java</artifactId>
            <version>3.13.0</version>
        </dependency>
        <dependency>
            <groupId>com.anthropic</groupId>
            <artifactId>anthropic-java-google-cloud</artifactId>
            <version>3.13.0</version>
        </dependency>
        ```
      </Tab>
    </Tabs>
  </Tab>

  <Tab title="PHP">
    ```bash
    composer require anthropic-ai/sdk google/auth
    ```
  </Tab>

  <Tab title="Ruby">
    ```bash
    gem install anthropic googleauth
    ```
  </Tab>
</Tabs>

Um stattdessen die `ant` CLI zu verwenden, [installiere oder aktualisiere die CLI](https://code.saschaberens.de/_h/platform.claude.com/docs/de/cli-sdks-libraries/cli/quickstart#installation) auf die neueste Version. Eine Version ohne Unterstützung für Claude Models on Google Cloud (Anthropic managed) ignoriert die `ANTHROPIC_GOOGLE_CLOUD_*`-Variablen. Sie tut dann eines der Folgenden:

* Sie sendet die Anfrage mit einer anderen von dir eingerichteten Anmeldeinformation an die Claude API
* Sie schlägt mit einem Authentifizierungsfehler fehl

## Anfragen stellen

Claude Models on Google Cloud (Anthropic managed) stellt Claude API-Endpunkte unter einer Basis-URL bereit, die dein Projekt, einen Standort und deinen Workspace benennt:

```text wrap
https://claude.googleapis.com/v1/projects/{project}/locations/global/workspaces/{workspace}/invoke
```

Die [Routen auf Organisationsebene](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles), deren Pfade mit `/v1/organizations/` beginnen, und die [Benutzerprofil](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/user-profiles)-Routen unter `/v1/user_profiles` verwenden eine Basis-URL ohne den Workspace:

```text wrap
https://claude.googleapis.com/v1/projects/{project}/locations/global/claudeOrganization/invoke
```

Wenn du [die Basis-URL nicht festlegst](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution), wählt der SDK-Client für jede Anfrage zwischen diesen beiden.

Hänge den Claude API-Pfad an die Basis-URL an. Die [Messages API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/messages/create) befindet sich beispielsweise unter `.../invoke/v1/messages`. Drei Dinge unterscheiden sich von einer Claude API-Anfrage:

* **Basis-URL:** Die zuvor gezeigten projektbezogenen URLs anstelle von `https://code.saschaberens.de/_h/api.anthropic.com`.
* **Authentifizierung:** Ein `Authorization: Bearer`-Header mit einem Google-Zugriffstoken. Sende keinen `x-api-key`-Header.
* **Workspace:** Die Workspace-ID ist Teil der URL. Sende keinen `anthropic-workspace-id`-Header.

Alles andere ist genauso wie bei der Claude API, einschließlich der folgenden Punkte:

* Die Header `anthropic-version` und `anthropic-beta`
* Der Anfragetext
* Streaming
* Die Antwort

Eine Ausnahme ist die Anfragegröße: Für Messages- und Token Counting-Anfragen gilt ein niedrigeres Limit. Zu diesem Limit siehe den Abschnitt [Anfragegrößenlimits](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/overview#request-size-limits) in der API-Übersicht.

Codebeispiele an anderer Stelle in dieser Dokumentation erstellen den Claude API-Client und lesen einen API-Key. Um eines davon mit Claude Models on Google Cloud (Anthropic managed) auszuführen, ersetze seinen Import und Client-Konstruktor durch die in den folgenden Beispielen. Wende bei einem cURL-Beispiel die drei zuvor aufgeführten Unterschiede an.

Bevor du diese Beispiele ausführst, schließe die Schritte unter [Vor API-Aufrufen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#before-making-api-calls) ab.

<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: 2026-10-21" \
    -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();

  var parameters = new MessageCreateParams
  {
      Model = Model.ClaudeOpus5_5,
      MaxTokens = 1024,
      Messages = [new UserMessageParam { Content = "Hello, 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/googlecloud"
  )

  func main() {
  	client, err := googlecloud.NewClient(context.Background(), googlecloud.ClientConfig{})
  	if err != nil {
  		panic(err)
  	}

  	message, err := client.Messages.New(context.Background(), anthropic.MessageNewParams{
  		Model:     anthropic.ModelClaudeOpus5_5,
  		MaxTokens: 1024,
  		Messages: []anthropic.MessageParam{
  			anthropic.NewUserMessage(anthropic.NewTextBlock("Hello, Claude")),
  		},
  	})
  	if err != nil {
  		panic(err)
  	}

  	fmt.Println(message)
  }
  ```

  ```java Java
  import com.anthropic.client.AnthropicClient;
  import com.anthropic.client.okhttp.AnthropicOkHttpClient;
  import com.anthropic.googlecloud.backends.GoogleCloudBackend;
  import com.anthropic.models.messages.Message;
  import com.anthropic.models.messages.MessageCreateParams;
  import com.anthropic.models.messages.Model;

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

      Message message = client.messages().create(
          MessageCreateParams.builder()
              .model(Model.CLAUDE_OPUS_5_5)
              .maxTokens(1024)
              .addUserMessage("Hello, Claude")
              .build()
      );

      IO.println(message);
  }
  ```

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

  $client = new Client();

  $message = $client->messages->create(
      model: Model::CLAUDE_OPUS_5_5,
      maxTokens: 1024,
      messages: [['role' => 'user', 'content' => 'Hello, Claude']],
  );

  echo $message;
  ```

  ```ruby Ruby
  require "anthropic"

  client = Anthropic::GoogleCloudClient.new

  message = client.messages.create(
    model: Anthropic::Model::CLAUDE_OPUS_5_5,
    max_tokens: 1024,
    messages: [{ role: "user", content: "Hello, Claude" }]
  )

  puts message
  ```
</CodeGroup>

Um die API über reines HTTP aufzurufen, sende ein Zugriffstoken aus Application Default Credentials. Auf einem Rechner mit der gcloud CLI gibt `gcloud auth application-default print-access-token` eines aus. Zugriffstoken sind kurzlebig. Erzeuge daher bei Bedarf ein neues, anstatt es zu speichern. Zu anderen Anmeldedatenquellen siehe [Authentifizierung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication).

### API-Modell-IDs

Claude Models on Google Cloud (Anthropic managed) verwendet dieselben Modell-IDs wie die Claude API. Zu den verfügbaren Modellen gehören die folgenden:

| Model | Model ID |
| :---- | :---- |
| Claude Fable 5.2 | `claude-fable-5-2` |
| Claude Mythos 5.2 ([limited availability](https://code.saschaberens.de/_h/support.claude.com/en/articles/14604842)) | `claude-mythos-5-2` |
| Claude Fable 5.1 | `claude-fable-5-1` |
| Claude Mythos 5.1 ([limited availability](https://code.saschaberens.de/_h/support.claude.com/en/articles/14604842)) | `claude-mythos-5-1` |
| Claude Fable 5 | `claude-fable-5` |
| Claude Mythos 5 ([limited availability](https://code.saschaberens.de/_h/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 ([deprecated](https://code.saschaberens.de/_h/platform.claude.com/docs/de/about-claude/model-deprecations)) | `claude-opus-4-5-20251101` |
| 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://code.saschaberens.de/_h/platform.claude.com/docs/de/about-claude/model-deprecations)) | `claude-sonnet-4-5-20250929` |
| Claude Haiku 5.5 | `claude-haiku-5-5` |
| Claude Haiku 4.5 | `claude-haiku-4-5-20251001` |

Claude Models on Google Cloud (Anthropic managed) folgt dem Lebenszyklus-Zeitplan der Claude API. Zu den Terminen siehe [Modell-Abkündigungen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/about-claude/model-deprecations). Um Modelle zu vergleichen, siehe [Modellübersicht](https://code.saschaberens.de/_h/platform.claude.com/docs/de/models/overview).

In Claude Models on Google Cloud (Anthropic managed) gibt eine Anfrage für ein Modell, das für deine Anthropic-Organisation nicht verfügbar ist, einen Fehler zurück. Die Fehlermeldung lautet `Model {model} is not available for this organization's inference configuration.`

## Auflösung von Projekt, Standort und Workspace

Der Client für Claude Models on Google Cloud (Anthropic managed) übernimmt die Einstellungen in der folgenden Tabelle. Ein Wert, den du beim Erstellen des Clients übergibst, hat Vorrang vor der Umgebungsvariable. Um das Projekt und die Workspace-ID explizit festzulegen, übergib `project` (go: `Project`; java: `.project()`; csharp: `GoogleCloudClientOptions.Project`; cli: `--google-cloud-project`) und `workspace_id` (typescript, php: `workspaceId`; go: `WorkspaceID`; java: `.workspaceId()`; csharp: `GoogleCloudClientOptions.WorkspaceId`; cli: `--google-cloud-workspace-id`).

| Einstellung | Umgebungsvariable | Wenn nicht gesetzt |
| ----- | ----- | ----- |
| Projekt-ID | `ANTHROPIC_GOOGLE_CLOUD_PROJECT`, dann `GOOGLE_CLOUD_PROJECT` | Das Projekt, das Application Default Credentials meldet, sofern der Anmeldedatentyp eines enthält |
| Workspace-ID | `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` | Der Client löst einen Fehler aus, sofern du nicht die Basis-URL festlegst. [Routen auf Organisationsebene](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) und [Benutzerprofil](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/user-profiles)-Routen benötigen keine Workspace-ID. |
| Standort | `ANTHROPIC_GOOGLE_CLOUD_LOCATION` | `global` |
| Basis-URL | `ANTHROPIC_GOOGLE_CLOUD_BASE_URL` | Abgeleitet aus Projekt, Standort und Workspace-ID |

Belasse den Standort bei `global`. Der Standort ist unabhängig davon, wo die Inferenz ausgeführt wird. Für reine US-Inferenz setze daher bei jeder Anfrage `inference_geo: "us"`, wie unter [Datenresidenz](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/data-residency#inference-geo) beschrieben.

Die `ant` CLI übernimmt dieselben Einstellungen als Flags:

* **Projekt-ID:** `--google-cloud-project`
* **Workspace-ID:** `--google-cloud-workspace-id`
* **Standort:** `--google-cloud-location`
* **Basis-URL:** `--google-cloud-base-url`

Die CLI verwendet Claude Models on Google Cloud (Anthropic managed), wenn das Projekt, die Workspace-ID oder der Standort festgelegt ist. Das Festlegen von `GOOGLE_CLOUD_PROJECT`, der Basis-URL oder beidem reicht nicht aus.

## Authentifizierung

Jede Anfrage an Claude Models on Google Cloud (Anthropic managed) enthält ein Google OAuth 2.0-Zugriffstoken in einem `Authorization: Bearer`-Header. Das Token hat den Scope `https://www.googleapis.com/auth/cloud-platform`.

Google Cloud übernimmt den Zugriff. Sein Gateway unter `claude.googleapis.com` tut für jede Anfrage Folgendes:

1. Es prüft deine Google Cloud-Anmeldedaten.
2. Es prüft, ob der Aufrufer die IAM-Berechtigung besitzt, die die Anfrage benötigt. Falls nicht, gibt Google Cloud einen HTTP-403-Fehler zurück.
3. Es leitet die Anfrage an Anthropic weiter. Anthropic validiert die Anfrage.

Um Berechtigungen zu vergeben, siehe [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles).

Der SDK-Client bezieht das Token aus [Application Default Credentials](https://cloud.google.com/docs/authentication/application-default-credentials) (ADC). Jede Anmeldedatenquelle, die ADC unterstützt, funktioniert:

* **Lokale Entwicklung:** Führe `gcloud auth application-default login` aus.
* **Auf Google Cloud:** Der Client verwendet automatisch das Dienstkonto, das an die Workload angehängt ist, zum Beispiel auf Compute Engine, GKE oder Cloud Run.
* **Eine Dienstkonto-Schlüsseldatei:** Setze `GOOGLE_APPLICATION_CREDENTIALS` auf ihren Pfad.
* **Workload Identity Federation und Dienstkonto-Identitätswechsel:** Konfiguriere sie wie für jede andere Google Cloud API.

Prüfe, ob ADC funktioniert:

```bash CLI
gcloud auth application-default print-access-token
```

Claude Models on Google Cloud (Anthropic managed) verwendet keine API-Keys. In der Claude Console kannst du keine API-Keys für die Anthropic-Organisation erstellen, die bei der Einrichtung erstellt wird. Der SDK-Client für Claude Models on Google Cloud (Anthropic managed) ignoriert diese Umgebungsvariablen:

* `ANTHROPIC_API_KEY`
* `ANTHROPIC_AUTH_TOKEN`
* `ANTHROPIC_BASE_URL`

### Rangfolge der Anmeldedaten

Der SDK-Client für Claude Models on Google Cloud (Anthropic managed) sucht in der folgenden Reihenfolge nach Anmeldedaten. Der Client verwendet die ersten, die er findet:

1. Ein Token-Provider, den du beim Erstellen des Clients als `token_provider` (typescript: `bearerTokenProvider`; csharp: `GoogleCloudClientOptions.TokenProvider`; go: `TokenSource`; java: `.bearerTokenSupplier()`; php: `tokenProvider`) übergibst. Es handelt sich um eine Funktion oder Token-Quelle, die ein Zugriffstoken zurückgibt. Der Client fordert bei jeder Anfrage ein Token von ihr an. Das Zwischenspeichern und Aktualisieren des Tokens liegt bei dir.
2. Ein Google-Anmeldedatenobjekt, das du beim Erstellen des Clients als `credentials` (typescript: `googleAuth`; csharp: `GoogleCloudClientOptions.GoogleCredential`; java: `.googleCredentials()`; php: `googleCredentials`; ruby: `google_credentials`) übergibst. Das Go SDK hat diese Option nicht.
3. Application Default Credentials.

Go und Java unterscheiden sich von den anderen SDKs:

* **Go:** Für Option 1 nimmt der Client eine `oauth2.TokenSource` entgegen. Er speichert das Token zwischen, bis es abläuft.
* **Java:** Verwende `GoogleCloudBackend.fromEnv()`, um Application Default Credentials und die Umgebungsvariablen aus [Auflösung von Projekt, Standort und Workspace](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution) zu lesen.

Der Client hat keine eigene Umgebungsvariable für die Anmeldedaten. Verwende stattdessen `GOOGLE_APPLICATION_CREDENTIALS` von ADC.

Wenn deine Anfragen über einen Proxy laufen, der das Token für dich anhängt, setze `skip_auth` (typescript, php: `skipAuth`; go: `SkipAuth`; java: `.skipAuth()`; csharp: `GoogleCloudClientOptions.SkipAuth`). Der Client sendet dann keinen `Authorization`-Header. Du kannst diese Einstellung nicht mit den vorherigen Anmeldedatenoptionen kombinieren.

Wenn die `ant` CLI Claude Models on Google Cloud (Anthropic managed) verwendet, bezieht sie das Token immer aus Application Default Credentials. Sie akzeptiert keinen Token-Provider, kein Anmeldedatenobjekt und keine Einstellung zum Überspringen der Authentifizierung.

Bevor du `ant` mit Claude Models on Google Cloud (Anthropic managed) verwendest, stelle sicher, dass nichts davon gesetzt ist:

* Ein API-Key

* Ein Authentifizierungstoken

* `--profile` oder `ANTHROPIC_PROFILE`, falls es ein [Konfigurationsprofil](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/wif-reference#profile-configuration-file) benennt, mit dem sich die CLI authentifizieren kann

* Eine der Föderationsvariablen von Anthropic:

  * `ANTHROPIC_FEDERATION_RULE_ID`
  * `ANTHROPIC_ORGANIZATION_ID`
  * `ANTHROPIC_SERVICE_ACCOUNT_ID`
  * `ANTHROPIC_IDENTITY_TOKEN`
  * `ANTHROPIC_IDENTITY_TOKEN_FILE`

Wenn eines davon gesetzt ist, verwendet die CLI diese Anmeldeinformation anstelle der Google Cloud-Einstellungen aus [Deine Workspace-ID finden](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id). Wenn nur einige der Föderationsvariablen gesetzt sind, bricht die CLI mit einem Fehler ab. Wenn mehr als eine Anmeldeinformation gesetzt ist, gibt die CLI einen Hinweis aus, der die verwendete benennt.

Lass außerdem `ANTHROPIC_WORKSPACE_ID` und das Flag `--workspace-id` ungesetzt. Die CLI sendet diesen Wert weiterhin als `anthropic-workspace-id`-Header. Anfragen an Claude Models on Google Cloud (Anthropic managed) dürfen diesen Header nicht enthalten. Lege den Workspace stattdessen mit `--google-cloud-workspace-id` oder `ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID` fest.

Wie der SDK-Client sendet auch die CLI Anfragen für Claude Models on Google Cloud (Anthropic managed) nicht an `--base-url` oder `ANTHROPIC_BASE_URL`.

## Funktionsunterstützung

Die folgenden Abschnitte listen Funktionen auf, die auf Claude Models on Google Cloud (Anthropic managed) verfügbar sind:

* **[Funktionen der Messages API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#messages-api-features):** Modellfähigkeiten, Tools, Kontextverwaltung, Dateien und Skills
* **[Funktionen von Claude Managed Agents](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#claude-managed-agents):** Agenten, Sessions, Sandboxes und geplante Deployments
* **[Verwaltung und Compliance](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#administration-and-compliance):** Workspaces, Benutzerprofile, Nutzungs- und Kostenberichte, die Compliance API-Einstellung, Verschlüsselungsschlüssel und Zero Data Retention

Zu nicht unterstützten Funktionen siehe den Abschnitt [Nicht unterstützte Funktionen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#features-not-supported). Wenn keiner dieser Abschnitte eine Funktion auflistet, die du benötigst, frage deinen Anthropic-Ansprechpartner, ob sie verfügbar ist.

Um zu prüfen, welche Modelle eine Funktion unterstützen, siehe den Abschnitt **Verfügbarkeit** auf der Seite der jeweiligen Funktion.

### Funktionen der Messages API

Die [Messages API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/messages/create), die [Models API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/models/list) und die folgenden Funktionen sind auf Claude Models on Google Cloud (Anthropic managed) verfügbar:

* [Advisor-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/advisor-tool) (Beta)
* [Agent Skills](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/agent-skills/overview)
  * [Benutzerdefinierte Skills](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/skills-guide#managing-custom-skills)
  * [Vorgefertigte Agent Skills](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/agent-skills/overview#pre-built-agent-skills)
* [Bash-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/bash-tool)
* [Batch-Verarbeitung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/batch-processing)
* [Browser- und Computer-Use-Toolsets im SDK](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/browser-use-sdk) (Beta)
* [Browser-Use-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/browser-use-tool)
* [Quellenangaben](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/citations)
* [Klassifikator-Ablehnungen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/refusals-and-fallback)
  * [Clientseitiger Fallback](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/refusals-and-fallback#client-side-fallback) (Beta)
  * [Fallback-Gutschrift](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/fallback-credit) (Beta)
  * [Serverseitiger Fallback](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/refusals-and-fallback#server-side-fallback) (Beta)
* [Code-Ausführungstool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/code-execution-tool)
* [Computer-Use-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/computer-use-tool)
* [Kontextbearbeitung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/context-editing) (Beta)
* [Benutzerdefinierte Tools](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/define-tools)
* [Datenresidenz](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/data-residency)
* [Effort](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/effort)
  * [Effort pro Nachricht](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/effort-per-message) (Beta)
* [Enterprise Frontier Safeguards](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/enterprise-frontier-safeguards/overview) (Beta)
* [Fast Mode](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/fast-mode)
* [Files API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/files)
* [Erzwungene Tool-Nutzung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/define-tools#forcing-tool-use)
* [MCP-Connector](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/mcp-connector) (Beta)
  * [Clientseitige MCP-Helfer](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/mcp-connector#client-side-mcp-helpers) (Beta)
* [Memory-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/memory-tool)
  * [Memory-Tool-Helfer](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/memory-tool#implement-the-memory-handler) (Beta)
* [Nachrichten-Streaming](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/streaming)
  * [Feingranulares Tool-Streaming](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/fine-grained-tool-streaming)
* [Nachrichten-Threads](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/message-threads) (Beta)
* [System-Nachrichten mitten in der Unterhaltung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/mid-conversation-system-messages)
  * [Tool-Änderungen mitten in der Unterhaltung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/mid-conversation-system-messages#mid-conversation-tool-changes) (Beta)
  * [Turn-bezogene System-Nachrichten](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/mid-conversation-system-messages#turn-scoped-system-messages) (Beta)
* [Mehrsprachige Unterstützung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/multilingual-support)
* [Komprimierung auf Anfrage](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/compaction-on-demand) (Beta)
  * [Komprimierungshelfer des Tool-Runners](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/compaction-on-demand#compact-in-a-loop) (Beta)
* [Parallele Tool-Nutzung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/parallel-tool-use)
* [PDF-Unterstützung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/pdf-support)
* [Programmatische Tool-Aufrufe](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/programmatic-tool-calling)
* [Prompt-Caching](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/prompt-caching)
  * [Dauer von 1 Stunde](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/prompt-caching#1-hour-cache-duration)
  * [Dauer von 5 Minuten (Standard)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/prompt-caching#how-prompt-caching-works)
  * [Automatisches Caching](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/prompt-caching#automatic-caching)
  * [Cache-Diagnose](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/cache-diagnostics)
  * [Explizite Cache-Breakpoints](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/prompt-caching#explicit-cache-breakpoints)
* [SDK-Middleware](https://code.saschaberens.de/_h/platform.claude.com/docs/de/cli-sdks-libraries/middleware)
* [Suchergebnisse](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/search-results)
* [Streaming-Ablehnungen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/test-and-evaluate/strengthen-guardrails/handle-streaming-refusals)
* [Strukturierte Ausgaben](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/structured-outputs)
  * [Strikte Tool-Nutzung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/strict-tool-use)
  * [Typisierte Helfer für strukturierte Ausgaben](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/structured-outputs#usage)
* [Task-Budgets](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/task-budgets) (Beta)
* [Texteditor-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/text-editor-tool)
* [Nachdenken](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/thinking)
  * [Adaptives Nachdenken](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/thinking-steering-and-cost)
  * [Erweitertes Nachdenken](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/extended-thinking)
  * [Bewahrtes Nachdenken](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/preserved-thinking)
* [Schwellenwert-Komprimierung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/compaction-threshold) (Beta)
* [Token-Zählung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/token-counting)
* [Tool-Runner](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/tool-runner) (Beta)
* [Tool-Search-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/tool-search-tool)
* [Vision (Bilder)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/vision)
* [Web-Domain-Beschränkungen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/tools-web-restrictions)
* [Web-Fetch-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/web-fetch-tool)
* [Web-Search-Tool](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/tool-use/web-search-tool)

### Claude Managed Agents

[Claude Managed Agents](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/overview) ist über Claude Models on Google Cloud (Anthropic managed) verfügbar, einschließlich [Sessions](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/sessions) und der folgenden Funktionen:

* [Agent-Konfigurationen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/agent-setup) (Beta)
* [Cloud-Sandboxes](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/environments) (Beta)
* [Event-Deltas](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/event-deltas) (Beta)
* [GitHub-Zugriff](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/github) (Beta)
* [Memory Stores](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/memory) (Beta)
* [Multiagenten-Orchestrierung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/multiagent-orchestration) (Beta)
  * [Dynamische Workflows](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/workflow-runs) (Beta)
  * [Session-Threads](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/session-threads) (Beta)
* [Ergebnisse](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/define-outcomes) (Beta)
* [Berechtigungsrichtlinien](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/permission-policies) (Beta)
* [Geplante Deployments](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/scheduled-deployments) (Beta)
* [Selbst gehostete Sandboxes](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/self-hosted-sandboxes) (Beta)
* [Sitzungsbudgets](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/budgets) (Beta)
* [Vaults](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/vaults) (Beta)

Einige [Funktionen der Messages API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#messages-api-features), wie die Files API und der MCP-Connector, funktionieren auch mit Claude Managed Agents. Details findest du im Abschnitt **Verfügbarkeit** auf der Seite der jeweiligen Funktion.

Wenn du selbst gehostete Sandboxes verwenden möchtest, lies die Einträge zu Memory Stores und Workern im Abschnitt [Nicht unterstützte Funktionen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#features-not-supported).

#### Wenn du den Zugriff entziehst

Der Zugriff wird geprüft, wenn eine Session oder ein Deployment erstellt wird, nicht während der Ausführung:

* **Laufende Sessions laufen weiter.** Wenn du der Identität, die eine Session erstellt hat, den Google Cloud-Zugriff entziehst, stoppt die Session nicht.
* **Geplante Deployments laufen weiter.** Ein Deployment prüft den Zugriff seines Erstellers nicht bei jeder geplanten Ausführung erneut. Um es zu beenden, pausiere, aktualisiere oder archiviere es.

Um eine laufende Session zu stoppen, führe die folgenden Schritte aus:

1. Sende der Session ein [`user.interrupt`-Event](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/events-and-streaming#interrupt-the-agent). Sende danach kein `user.message`-Event.
2. Warte, bis der Status der Session `idle` ist.
3. Wenn du die Session nicht mehr benötigst, archiviere oder lösche sie.

Wenn du einen Benutzer entfernst oder ein Dienstkonto rotierst, überprüfe die Sessions und Deployments, die diese Identität erstellt hat.

### Verwaltung und Compliance

Folgendes ist ebenfalls auf Claude Models on Google Cloud (Anthropic managed) verfügbar:

* [Workspaces](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#workspaces)
* [Benutzerprofile für die Zuordnung zu Endkunden](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/user-profiles)
* [Usage and Cost Analytics API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/usage-cost-analytics-api) (Beta)
* [Usage and Cost API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/usage-cost-api) (veraltet), nur der Nutzungsendpunkt
* [Compliance API-Einstellung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#compliance-api) in der Claude Console
* [Kundenverwaltete Verschlüsselungsschlüssel](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/cmek) (CMEK), mit Google Cloud KMS-Schlüsseln
* [Zero Data Retention](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention) (ZDR), auf Anfrage

Die Nutzungs- und Kostenendpunkte verwenden die [Basis-URL ohne den Workspace](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests). Von den drei vordefinierten [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) erlaubt nur `roles/claude.admin` diese Aufrufe.

#### Compliance API

Solange die [Compliance API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/compliance-api) ausgeschaltet ist, zeichnet sie keine Aktivitätsereignisse auf. Du kannst diese Ereignisse später nicht wiederherstellen. Was die Einstellung sonst noch ändert, erfährst du unter [Die Compliance API einrichten](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/compliance-api-access).

Um die Compliance API-Einstellung für die Anthropic-Organisation, die bei der Einrichtung erstellt wird, zu ändern, führe die folgenden Schritte aus:

1. [Öffne die Claude Console](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
2. Gehe zu [Compliance in der Claude Console](https://code.saschaberens.de/_h/platform.claude.com/settings/security) (`platform.claude.com/settings/security`).
3. Verwende den Schalter **Compliance API**.

#### Kundenverwaltete Verschlüsselungsschlüssel

Um deinen eigenen Google Cloud KMS-Schlüssel mit der Anthropic-Organisation zu verwenden, die bei der Einrichtung erstellt wird, führe die folgenden Schritte aus:

1. Kontaktiere deinen Anthropic-Ansprechpartner, um CMEK für die Organisation zu aktivieren. Details findest du unter [Wer CMEK verwenden kann](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/cmek#availability).
2. [Öffne die Claude Console](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console).
3. Folge [CMEK mit Google Cloud KMS einrichten](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/cmek-google-cloud-kms), um den Schlüssel zu erstellen, hinzuzufügen, zu verifizieren und anzuhängen. Verwende für die Schritte in der Claude Console den Tab **Claude Platform** auf der verlinkten Seite.

### Zugriff auf Beta-Funktionen

Einige Beta-Funktionen stehen nur ausgewählten Organisationen offen. Um eine davon zu verwenden, benötigt die Anthropic-Organisation, die bei der Einrichtung erstellt wird, eigenen Zugriff.

### Nicht unterstützte Funktionen

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

* **API-Keys, einschließlich Admin-API-Keys:** Authentifiziere dich stattdessen mit [Google Cloud-Anmeldedaten](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#authentication).
* **MCP-Tunnel:** [MCP-Tunnel](https://code.saschaberens.de/_h/platform.claude.com/docs/de/agents-and-tools/mcp-tunnels/overview) sind auf Claude Models on Google Cloud (Anthropic managed) nicht verfügbar.
* **[Memory Stores in selbst gehosteten Sandboxes](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/self-hosted-sandboxes-memory):** Auf Claude Models on Google Cloud (Anthropic managed) werden Memory Stores in selbst gehosteten Sandboxes nicht unterstützt. Um sie zu verwenden, führe die Session in einer [Cloud-Umgebung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/environments) aus.
* **Vorgefertigte Worker für selbst gehostete Sandboxes:** Die [selbst gehosteten Worker](https://code.saschaberens.de/_h/platform.claude.com/docs/de/managed-agents/self-hosted-sandboxes-workers) in der `ant` CLI und in den Python-, TypeScript- und Go-SDKs unterstützen Claude Models on Google Cloud (Anthropic managed) nicht. Implementiere stattdessen deinen eigenen Worker, der die [Environments Work-Endpunkte](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/beta/environments/work) direkt aufruft. Informationen zu den Rollen und Berechtigungen, die dein Worker benötigt, findest du unter [IAM-Berechtigungen für Umgebungen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions#environments).
* **Linked billing (Beta):** [Linked billing](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/oauth-apps/organization-billing-connections) ist auf Claude Models on Google Cloud (Anthropic managed) nicht verfügbar.

### Kontextfenster

Die Größen des „context window“ (Kontextfenster) auf Claude Models on Google Cloud (Anthropic managed) sind dieselben wie auf der Claude API. Zum Limit jedes Modells siehe [Kontextfenster](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/context-windows).

## Abrechnung, Ratenlimits und Protokollierung

### Ratenlimits

Anthropic verwaltet die „rate limits“ (Ratenlimits) für Claude Models on Google Cloud (Anthropic managed). Wie Ratenlimits gemessen und gemeldet werden, erfährst du unter [Ratenlimits](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/rate-limits).

Um die Ratenlimits deiner Organisation anzuzeigen, [öffne die Claude Console](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) und gehe zu [Ratenlimits in der Claude Console](https://code.saschaberens.de/_h/platform.claude.com/usage/limits) (`platform.claude.com/usage/limits`). Das Badge auf dieser Seite zeigt **Custom-Stufe** für jede Organisation auf Claude Models on Google Cloud (Anthropic managed) an, unabhängig von ihrer [Nutzungsstufe](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/rate-limits#about-rate-limits).

Um höhere Limits anzufordern, verwende das Formular in der Claude Console:

1. Klicke auf der Seite **Ratenlimits** auf **Höhere Limits anfordern**.

   <Frame caption="Die Schaltfläche „Request higher limits“ (Höhere Limits anfordern) befindet sich oben rechts auf der Seite „Rate limits“ (Ratenlimits).">
     ![Kopfbereich der Seite „Rate limits“ (Ratenlimits) in der Claude Console, mit einem „Custom tier“-Badge und der Schaltfläche „Request higher limits“.](https://code.saschaberens.de/_h/platform.claude.com/docs/images/rate-limits/request-higher-limits-button.png)
   </Frame>

2. Fülle jedes Feld aus. Für die Zahlen genügen grobe Schätzungen:

   * Wähle unter **Welche Modelle?** die Modelle aus, die höhere Limits benötigen.
   * Gib unter **Spitzenwerte an Token pro Minute** deine Spitzenwerte für **Input**- und **Output**-Token ein (keine Tagessummen). Lass bei **Input** Token weg, die aus dem Cache gelesen werden. Bei den meisten Modellen zählen sie nicht zu den Input-Token-Limits (siehe [Cache-bewusste ITPM](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/rate-limits#cache-aware-itpm)). Die Zahlen gelten für jedes Modell, das du ausgewählt hast. Wenn ein Modell andere Zahlen benötigt, füge sie im nächsten Feld hinzu.
   * Beschreibe unter **Was baust du, und warum brauchst du höhere Limits?** deinen Anwendungsfall und den Grund, warum du höhere Limits brauchst. Wenn du eine höhere [monatliche Ausgabenobergrenze](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/rate-limits#spend-limits) benötigst, gib das hier an.
   * Gib unter **Erwartete monatliche Ausgaben** einen ganzzahligen Betrag in US-Dollar ein.
   * Gib unter **Kontakt-E-Mail** eine E-Mail-Adresse für die Antwort ein.

   <Frame caption="Das Formular „Request higher limits“ (Höhere Limits anfordern) mit einer Beispielanfrage.">
     ![Formular „Request higher limits“ (Höhere Limits anfordern) mit Feldern für die Modelle, die Spitzenwerte an Token pro Minute, den Grund, die monatlichen Ausgaben und die Kontakt-E-Mail.](https://code.saschaberens.de/_h/platform.claude.com/docs/images/rate-limits/request-higher-limits-form.png)
   </Frame>

3. Klicke auf **Anfrage senden**.

Der Anthropic-Support prüft deine Anfrage und antwortet an die Kontakt-E-Mail-Adresse. Deine Organisation kann alle 24 Stunden eine Anfrage senden.

Wenn deine Organisation eine Zero Data Retention (ZDR)-Vereinbarung hat oder [kundenverwaltete Verschlüsselungsschlüssel (CMEK) aktiviert](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/cmek#availability) hat, kann sie das Formular nicht verwenden. Die Seite zeigt **Vertrieb kontaktieren** an, oder das Formular zeigt beim Senden der Anfrage einen Fehler an. Kontaktiere stattdessen deinen Anthropic-Ansprechpartner oder [den Vertrieb](https://code.saschaberens.de/_h/claude.com/contact-sales).

Jede andere Organisation kann sich ebenfalls an ihren Ansprechpartner oder den Vertrieb wenden.

### Abrechnung

Claude Models on Google Cloud (Anthropic managed) wird über den Google Cloud Marketplace abgerechnet. Anthropic misst deine Nutzung. Es meldet die Nutzung an Google Cloud in Claude Consumption Units. Eine Claude Consumption Unit entspricht 0,01 USD. Die Kosten erscheinen auf deiner Google Cloud-Rechnung. Anthropic stellt keine separate Rechnung aus.

Nutzungs- und Kostendaten findest du auf den Seiten **Nutzung** und **Kosten** in der [Claude Console](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#using-the-claude-console) oder fragst sie mit der [Usage and Cost Analytics API](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/usage-cost-analytics-api) ab.

Wenn du eine Google Cloud-Ausgabenverpflichtung hast, wird die Nutzung darauf angerechnet, so wie andere Marketplace-Käufe.

### Datenaufbewahrung

Anthropic ist der Datenverarbeiter für Claude Models on Google Cloud (Anthropic managed). Einige unterstützende Dienste, wie die Trust-and-Safety-Systeme von Anthropic, verarbeiten Daten außerhalb von Google Cloud.

Claude Models on Google Cloud (Anthropic managed) folgt derselben Datenaufbewahrungsrichtlinie wie die Claude API. Siehe [API und Datenaufbewahrung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/manage-claude/api-and-data-retention). Zero Data Retention (ZDR) ist auf Anfrage verfügbar. Kontaktiere deinen Anthropic-Ansprechpartner.

Eine ZDR-Vereinbarung für eine andere Anthropic-Organisation wird nicht auf deine Organisation für Claude Models on Google Cloud (Anthropic managed) übertragen.

### Überwachung und Protokollierung

[Cloud Audit Logs](https://cloud.google.com/logging/docs/audit) zeichnet API-Aktivitäten für Claude Models on Google Cloud (Anthropic managed) in deinem Projekt auf. Die Einträge erscheinen unter dem Dienst `claude.googleapis.com`. Jede API-Route gehört zu einem von zwei Log-Typen:

* **Data Access-Logs:** Diese decken die meisten Routen ab, einschließlich Nachrichten, Batches, Dateien, Skills, Modelle und Claude Managed Agents-Ressourcen wie Credential Vaults. Diese Logs sind standardmäßig deaktiviert.
* **Admin Activity-Logs:** Diese decken die Routen für Verschlüsselungsschlüssel sowie einige andere [Routen auf Organisationsebene](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) ab, die die Seite zu IAM-Berechtigungen nicht auflistet. Admin Activity-Logs sind immer aktiviert.

Um Anfragen aufzuzeichnen, [aktiviere Data Access-Logs](https://docs.cloud.google.com/logging/docs/audit/configure-data-access) für `claude.googleapis.com` in den Audit-Log-Einstellungen deines Projekts. Wähle alle Data Access-Log-Typen aus, da verschiedene Routen unterschiedliche verwenden.

Zu Audit-Log-Typen nach Route siehe [IAM-Berechtigungen für Claude Models on Google Cloud (Anthropic managed)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions).

#### Anfrage-IDs

Erfolgreiche Antworten von Claude Models on Google Cloud (Anthropic managed) enthalten den Header [`request-id`](https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/errors#request-id).

## Umzug von einer bestehenden Anthropic-Organisation

Du kannst eine bestehende Anthropic-Organisation nicht in eine Organisation für Claude Models on Google Cloud (Anthropic managed) umwandeln. Das gilt auch für eine Organisation, die du direkt mit der Claude API verwendest.

Plane den Umzug als Umstellung auf eine neue Organisation:

* **Erstelle zuerst die neue Organisation.** Folge [Dein Konto einrichten](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account).
* **Erstelle Zugriff und Konfiguration neu.** API-Keys, Workspaces und Claude Console-Einstellungen werden nicht übernommen. Vergib [IAM-Rollen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#iam-roles) für das Projekt, anstatt API-Keys zu erstellen. Um deine Workspaces neu zu erstellen, siehe [Workspaces](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#workspaces). Zu ZDR-Vereinbarungen siehe [Datenaufbewahrung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention).
* **Plane für gespeicherte Ressourcen.** Dateien, Skills, Batches und Claude Managed Agents-Ressourcen verbleiben in der bestehenden Organisation.
* **Aktualisiere deine Integration.** Was sich ändert und was gleich bleibt, erfährst du unter [Anfragen stellen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests). Um die Funktionen zu prüfen, die dein Code verwendet, siehe den Abschnitt [Funktionsunterstützung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support).
* **Stelle nach deinem eigenen Zeitplan um.** Die beiden Organisationen sind unabhängig und können parallel Traffic verarbeiten. Du kannst Workloads schrittweise verlagern. Die bestehende Organisation behält ihre aktuelle Abrechnung. Bevor du Produktions-Traffic verlagerst, prüfe die [Ratenlimits für Claude Models on Google Cloud (Anthropic managed)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#rate-limits).

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

Um zu Claude Models on Google Cloud (Anthropic managed) zu wechseln, führe die folgenden Schritte aus. Bevor du Workloads verschiebst, die auf einer ZDR-Vereinbarung beruhen, lies [Datenaufbewahrung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#data-retention). Was sich beim Wechsel ändert, erfährst du unter [Wie sich die beiden Google Cloud-Angebote unterscheiden](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/overview#how-the-two-google-cloud-offerings-differ).

<Steps>
  <Step title="Richte dein Konto ein">
    Führe jeden Schritt unter [Richte dein Konto ein](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#set-up-your-account) aus.
  </Step>

  <Step title="Richte den Zugriff ein">
    Weise jeder Identität, die Claude Models on Google Cloud (Anthropic managed) aufruft, `roles/claude.user` zu. Lege dein Projekt und deine Workspace-ID als Umgebungsvariablen fest. Für beides siehe [Bevor du API-Aufrufe durchführst](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#before-making-api-calls).
  </Step>

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

  <Step title="Ersetze den Import und den Client">
    Ändere den Code, der deinen Client importiert und erstellt. Verwende `AnthropicGoogleCloud` (csharp: `AnthropicGoogleCloudClient`; go: `googlecloud.NewClient()`; java: `GoogleCloudBackend`; php: `Anthropic\GoogleCloud\Client`; ruby: `Anthropic::GoogleCloudClient`) anstelle von `AnthropicVertex` (csharp: `AnthropicVertexClient`; go: `vertex.WithGoogleAuth()`; java: `VertexBackend`; php: `Anthropic\Vertex\Client`; ruby: `Anthropic::VertexClient`). Ändere in einer cURL-Anfrage die URL, die Header und den Body. Dein aktueller Code erstellt einen Client für Claude Models on Google Cloud (Google managed). Der folgende Code erstellt diesen Client beispielsweise mit dem globalen Endpunkt:

    <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": "2026-10-21",
          "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)
      ```

      ```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/v2"
      	"github.com/anthropics/anthropic-sdk-go/v2/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>

    Der folgende Code erstellt den Client für Claude Models on Google Cloud (Anthropic managed):

    <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: 2026-10-21" \
        -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/v2"
      	"github.com/anthropics/anthropic-sdk-go/v2/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 neue Client liest dein Projekt und deine Workspace-ID aus den Umgebungsvariablen, die du unter [Finde deine Workspace-ID](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#find-your-workspace-id) festgelegt hast. Du übergibst sie nicht beim Erstellen des Clients. Deine Messages-API-Aufrufe bleiben unverändert, mit Ausnahme der Modell-IDs und Funktionen im nächsten Schritt.
  </Step>

  <Step title="Prüfe Modell-IDs und Funktionen">
    * **Modell-IDs:** Wenn du ein Modell vor Claude 4.6 verwendest, ersetze das `@` vor dem Snapshot-Datum in seiner ID durch einen Bindestrich. 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://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#api-model-ids).
    * **Funktionen:** Prüfe unter [Funktionsunterstützung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#feature-support) jede Funktion, die dein Code verwendet.
    * **Standort:** Wenn du heute einen Multi-Region- oder regionalen Endpunkt verwendest, prüfe, welchen Standort Claude Models on Google Cloud (Anthropic managed) verwendet. Siehe [Auflösung von Projekt, Standort und Workspace](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#project-location-and-workspace-resolution).
  </Step>

  <Step title="Führe eine Testanfrage aus">
    Führe die Anfrage unter [Anfragen stellen](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#making-requests) aus, um zu prüfen, ob deine Einrichtung funktioniert. Führe dann deinen eigenen Code aus. Wenn ein Aufruf mit einem Berechtigungsfehler fehlschlägt, siehe [Fehlerbehebung bei der Kontoeinrichtung](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#troubleshooting-account-setup). Bevor du Produktions-Traffic verschiebst, prüfe die [Ratenlimits für Claude Models on Google Cloud (Anthropic managed)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#rate-limits).
  </Step>
</Steps>

## Support

Der [Google Cloud-Support](https://cloud.google.com/support) kümmert sich um dein Google Cloud-Konto, den Zugriff und die Abrechnung. Der [Anthropic-Support](https://code.saschaberens.de/_h/support.claude.com/en/articles/9015913-how-to-get-support) kümmert sich um Claude selbst, einschließlich Modellen, API-Fehlern und Ratenlimits. Um höhere Limits anzufordern, siehe die [Ratenlimits für Claude Models on Google Cloud (Anthropic managed)](https://code.saschaberens.de/_h/platform.claude.com/docs/de/build-with-claude/claude-models-on-google-cloud/anthropic-managed#rate-limits).

## Nächste Schritte

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

  <Card title="IAM-Berechtigungen" icon="lock" href="https://code.saschaberens.de/_h/platform.claude.com/docs/de/api/claude-models-on-google-cloud-anthropic-managed-iam-permissions">
    Schlage Berechtigungen, Rollen und Audit-Log-Typen nach.
  </Card>

  <Card title="Modell-Abkündigungen" icon="arrow-clockwise" href="https://code.saschaberens.de/_h/platform.claude.com/docs/de/about-claude/model-deprecations">
    Wenn sicherere und leistungsfähigere Modelle erscheinen, stellt Anthropic ältere Modelle regelmäßig ein. Sieh dir alle API-Abkündigungen zusammen mit empfohlenen Ersatzmodellen an.
  </Card>

  <Card title="Google Cloud Marketplace" icon="coins" href="https://console.cloud.google.com/marketplace">
    Verwalte dein Abonnement und deine Abrechnung.
  </Card>
</CardGroup>
