Gemini in Colab Enterprise in einem Projekt in Google Cloud aktivieren
Um Gemini in Colab Enterprise in einem Projekt in Google Cloud zu aktivieren, muss ein Administrator die Gemini for Google Cloud API aktivieren und Nutzern die Rolle „Gemini for Google Cloud User“ zuweisen.
Wenn Sie die Gemini for Google Cloud API aktivieren möchten, rufen Sie in der Google Cloud Console die Seite Gemini for Google Cloud auf.
Die Seite wird aktualisiert und zeigt den Status Aktiviert an.
Gemini ist jetzt im ausgewählten Projekt inGoogle Cloud für alle Nutzer mit den erforderlichen IAM-Rollen verfügbar.
Wenn Sie die IAM-Rollen zuweisen möchten, die für Gemini erforderlich sind, rufen Sie die Seite IAM und Verwaltung auf.
Suchen Sie in der Spalte Hauptkonto ein Hauptkonto, dem Sie Zugriff auf Gemini in Colab Enterprise gewähren möchten, und klicken Sie dann in dieser Zeile auf editHauptkonto bearbeiten.
Klicken Sie im Bereich Zugriff bearbeiten auf addWeitere Rolle hinzufügen.
Wählen Sie unter Rolle auswählen die Option Gemini for Google Cloud User aus.
Klicken Sie auf Speichern.
Alle Nutzer, denen diese Rollen zugewiesen wurden, können im angegebenen Projekt in der Google Cloud Console auf Funktionen von Gemini für Google Cloudzugreifen. Weitere Informationen finden Sie im Abschnitt zur Verwendung von Gemini für KI-Unterstützung und Entwicklung.
Erweiterte Einrichtungsaufgaben
Anstatt die Google Cloud Console oder die gcloud CLI zum Zuweisen vordefinierter IAM-Rollen zu verwenden, können Sie eine der folgenden Aktionen ausführen:
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-25 (UTC)."],[[["\u003cp\u003eGemini in Colab Enterprise is available to try at no cost until February 27, 2025.\u003c/p\u003e\n"],["\u003cp\u003eActivating Gemini in Colab Enterprise requires an administrator to enable the Gemini for Google Cloud API within a designated Google Cloud project.\u003c/p\u003e\n"],["\u003cp\u003eUsers must be granted the "Gemini for Google Cloud User" role to access Gemini features.\u003c/p\u003e\n"],["\u003cp\u003eBesides using the Google Cloud console, IAM REST APIs or client libraries can be used to manage user roles, specifically \u003ccode\u003eroles/cloudaicompanion.user\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eCustom roles for Gemini access require the following permissions: \u003ccode\u003ecloudaicompanion.instances.generateCode\u003c/code\u003e, \u003ccode\u003ecloudaicompanion.instances.completeCode\u003c/code\u003e, and \u003ccode\u003ecloudaicompanion.entitlements.get\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Set up Gemini in Colab Enterprise for a project\n\nBefore you can use [Gemini in Colab Enterprise](/gemini/docs/colab/overview),\nyour team needs to\n[activate Gemini in Colab Enterprise in a Google Cloud project](#activate-gemini),\nas described in this document. An administrator typically performs this step.\n\nActivate Gemini in Colab Enterprise in a Google Cloud project\n-------------------------------------------------------------\n\nTo activate Gemini in Colab Enterprise in a Google Cloud project, an\nadministrator needs to enable the Gemini for Google Cloud API and grant the\nGemini for Google Cloud User role to users.\n\n1. To enable the Gemini for Google Cloud API, in the Google Cloud console,\n go to the **Gemini for Google Cloud** page.\n\n [Go to Gemini for Google Cloud](https://console.cloud.google.com/marketplace/product/google/cloudaicompanion.googleapis.com)\n2. In the project selector, select a project.\n\n3. Click **Enable**.\n\n The page updates and shows a status of **Enabled**.\n Gemini is now available in the selected\n Google Cloud project to all users who have the required\n IAM roles.\n4. To grant the IAM roles that are required to use\n Gemini, go to the **IAM \\& Admin** page.\n\n [Go to IAM \\& Admin](https://console.cloud.google.com/projectselector/iam-admin/iam?supportedpurview=)\n5. In the **Principal** column, find a\n [principal](/iam/docs/overview#concepts_related_identity) for which you want\n to give access to Gemini in Colab Enterprise, and then click\n edit **Edit principal** in that row.\n\n6. In the **Edit access** pane, click\n add **Add another role**.\n\n7. In **Select a role** , select **Gemini for Google Cloud User**.\n\n8. Click **Save**.\n\nAll of the users who have been granted these roles can access Gemini for Google Cloud\nfeatures in the Google Cloud console within the specified project. For more\ninformation, see\n[Use Gemini for AI assistance and development](/gemini/docs/overview).\n\nAdvanced setup tasks\n--------------------\n\nInstead of using the Google Cloud console or the gcloud CLI to\ngrant predefined IAM roles, you can do any of the following:\n\n- Use [IAM REST APIs](/iam/docs/reference/rest)\n or [IAM client libraries](/iam/docs/reference/libraries)\n to grant roles.\n\n If you use these interfaces, use the fully qualified role name,\n `roles/cloudaicompanion.user`.\n\n For more information about granting roles, see\n [Manage access to projects, folders, and organizations](/iam/docs/granting-changing-revoking-access).\n- Create and grant custom roles.\n\n Any [custom roles](/iam/docs/creating-custom-roles) that you create need the\n following permissions to access Gemini:\n - `cloudaicompanion.instances.generateCode`\n - `cloudaicompanion.instances.completeCode`\n - `cloudaicompanion.entitlements.get`\n\nBilling\n-------\n\nGemini in Colab Enterprise is currently available to try at no additional cost. See\n[Colab Enterprise pricing](/colab/pricing).\n\nWhat's next\n-----------\n\n- Learn how to [write code with Gemini assistance](/colab/docs/use-code-completion).\n- Learn more about the [types of generative AI assistance available in Gemini for Google Cloud](/gemini/docs/overview).\n- Learn [how Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance).\n- Learn [how to access and manage Gemini admin controls](/gemini/docs/admin)."]]