Set up Gemini Cloud Assist in Cloud Billing

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of theService Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see thelaunch stage descriptions.

To set upGemini Cloud Assist in Cloud Billing,perform the following steps:

  1. Enable the Gemini Cloud Assist API in a Google Cloud project.An administrator typically performs this step.

  2. In the Google Cloud project, grant Identity and Access Management (IAM) roles to the same users who access Cloud Billing cost and utilizationdata. An administrator typically performs this step.

  3. For users who need access to Cloud Billing data andGemini Cloud Assist in Cloud Billing,grant IAM roles in the Cloud Billing account that'slinked to the project where the Gemini Cloud Assist API is enabled. An administratortypically performs this step.

Enable the Gemini Cloud Assist API in a Google Cloud project

This section describes the steps required to enable theGemini Cloud Assist API in a Google Cloud project.

Console

  1. To enable the Gemini Cloud Assist API, go to theGemini Cloud Assist API page.

    Go to the Gemini Cloud Assist API

  2. In the project selector, select the project you want to use as a"Gemini" project.

    You can enable the Gemini Cloud Assist API in more than oneproject. For Cloud Billing users who havebilling-account-level permissions on the Cloud Billing account, we recommend that you use aFinOps administration project to contain the API.

  3. ClickEnable.

    The page updates and shows a status ofAPI Enabled.

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

  2. In the project selector menu, select the project you want to use as a"Gemini" project.

    You can enable the Gemini Cloud Assist API in more than oneproject. For Cloud Billing users who havebilling-account-level permissions on the Cloud Billing account, we recommend that you use aFinOps administration project to contain the API.

  3. Enable the Gemini Cloud Assist API usingthegcloud services enable command:

    gcloudservicesenablegeminicloudassist.googleapis.com

    If you want to enable the Gemini Cloud Assist API in a differentGoogle Cloud project, add the--project parameter:

    gcloudservicesenablegeminicloudassist.googleapis.com--projectPROJECT_ID

    ReplacePROJECT_ID with your Google Cloud projectID.

    The output is similar to the following:

    Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete...Operation finished successfully.

After you enable the Gemini Cloud Assist API in the specifiedGoogle Cloud project, Gemini Cloud Assist is now available toall users who have therequired IAM roles on the specified project.

Grant IAM roles in a Google Cloud project

This section describes the steps to grant the required project permissions touse Gemini Cloud Assist. In the Google Cloud project where youenabled the Gemini Cloud Assist API, grant the followingIAM roles to users(principals)on the project:

  • Gemini Cloud Assist User
  • Service Usage Consumer

Console

  1. To grant the IAM roles that are required to use Gemini Cloud Assist, go to theIAM & Admin page.

    Go to IAM & Admin

  2. In thePrincipal column, find aprincipal for which you want to enable access to Gemini Cloud Assist, andthen clickEdit principal inthat row.

  3. In theEdit access pane, clickAdd another role.

  4. InSelect a role, selectGemini Cloud Assist User.

  5. ClickAdd another role and selectService Usage Consumer.

  6. ClickSave.

gcloud

  1. In the Google Cloud console, activate Cloud Shell.

    Activate Cloud Shell

  2. In the project selector menu, select a project.

  3. Grant theGemini Cloud Assist User role:

    gcloud projects add-iam-policy-bindingPROJECT_ID \  --member=PRINCIPAL --role=roles/geminicloudassist.user

    Replace the following:

    • PROJECT_ID: the ID of yourGoogle Cloud project—for example,1234567890.
    • PRINCIPAL: theidentifier for theprincipal—for example,user:cloudysanfrancisco@gmail.com.

    The output is a list of policy bindings that includes the following:

    - members:  - user:PRINCIPAL  role: roles/geminicloudassist.user
  4. Repeat the previous step for the roleroles/serviceusage.serviceUsageConsumer.

For more information, seeGrant a single role andgcloud projects add-iam-policy-binding.

All of the users (principals) who are granted these roles can accessGemini Cloud Assist features in the Google Cloud console within thespecified project. If the project users also haveaccess to view Cloud Billing data,they can use Gemini Cloud Assist in Cloud BillingReportsand theFinOps hub to get AI assistance to create cost reports and tosummarize key insights about cloud costs and optimization recommendations.For more information, seeGemini Cloud Assist in Cloud Billing overview.

Advanced IAM setup tasks for projects

Instead of using the Google Cloud console or the gcloud CLI togrant predefined IAM roles on a project, you can do any of thefollowing:

  • UseIAM REST APIs orIAM client libraries to grant roles.

    If you use these interfaces, use the fully qualified role names:

    • roles/geminicloudassist.user
    • roles/serviceusage.serviceUsageConsumer

    For more information about granting roles, seeManage access to projects, folders, and organizations.

  • Create and grant custom roles.

    Anycustom roles forproject permissions that you create need the following permissions toaccess Gemini Cloud Assist:

    • geminicloudassist.companions.generateChat
    • geminicloudassist.companions.generateCode
    • serviceusage.services.use

Grant IAM roles in a Cloud Billing account

For users who need access to Cloud Billing cost data, you need to grantpermissions on the Cloud Billing account that are adequate to accesstheReports page and theFinOps hub. To useGemini Cloud Assist in Cloud Billing, grant users accessto the Cloud Billing account that islinked to the project where the Gemini Cloud Assist API is enabled.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.