Set up Gemini Cloud Assist

Before you can use Gemini Cloud Assist, your administrator needs to perform the setup steps that are described in this document.

Console

  1. Go to the Gemini for Google Cloud page.

    Go to Gemini for Google Cloud

  2. Click Get Gemini Cloud Assist.

  3. In the Get Gemini Cloud Assist dialog, do the following:

    1. Click the expander arrow found in the Required & recommended APIs section.

    2. In the Recommended APIs list, select the APIs you want to enable.

    3. Click Enable Gemini Cloud Assist.

  4. Grant the IAM roles that are required to use Gemini Cloud Assist.

    1. Go to the IAM & Admin page.

      Go to IAM & Admin

    2. In the Principal column, find a principal for which you want to give access to Gemini Cloud Assist, and then click Edit principal in that row.

    3. In the Edit access pane, click Add another role.

    4. In Select a role, select Gemini for Google Cloud User.

    5. Click Add another role and select Recommender Viewer.

    6. If the principal wants to get assistance with products they don't already have access to, you might need to grant them additional IAM roles by clicking Add another role and selecting additional roles. See IAM requirements for using Gemini Cloud Assist for a table of IAM roles that enable an optimal Gemini Cloud Assist experience for different products.

    7. Click Save.

gcloud

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

    Activate Cloud Shell

  2. Enable the Gemini for Google Cloud API using the gcloud services enable command:

    gcloud services enable cloudaicompanion.googleapis.com
    

    If you want to enable the Gemini for Google Cloud API in a different Google Cloud project, add the --project parameter:

    gcloud services enable cloudaicompanion.googleapis.com --project PROJECT_ID
    

    Replace PROJECT_ID with your Google Cloud project ID.

    The output is similar to the following:

    Waiting for async operation operations/acf.2e2fcfce-8327-4984-9040-a67777082687 to complete...
    Operation finished successfully.
    
  3. Grant IAM roles in a Google Cloud project. For more information, see Grant a single role and gcloud projects add-iam-policy-binding.

    1. Grant the Gemini for Google Cloud User role:

      gcloud projects add-iam-policy-binding  PROJECT_ID \
          --member=PRINCIPAL --role=roles/cloudaicompanion.user
      

      Replace PRINCIPAL with the identifier for the principal. The identifier takes the form user|group|serviceAccount:email or domain:domain—for example, user:cloudysanfrancisco@gmail.com, group:admins@example.com, serviceAccount:test123@example.domain.com, or domain:example.domain.com.

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

      - members:
        - user:PRINCIPAL
        role: roles/cloudaicompanion.user
      
    2. Repeat the previous step for the role roles/recommender.viewer.

    3. If the principal wants to get assistance with products they don't already have access to, you might need to grant them additional IAM roles. See IAM requirements for using Gemini Cloud Assist for a table of IAM roles that enable an optimal Gemini Cloud Assist experience for different products.

What's next