[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-19。"],[[["\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)."]]