This page describes the steps for enabling the Conversational Analytics API (accessed through geminidataanalytics.googleapis.com
) for your Google Cloud project. The Conversational Analytics API is the first capability under the Data Analytics API with Gemini in the Google Cloud console.
Before you begin
Before you can use the Conversational Analytics API, you must have a Google Cloud project that can access the data that you want to work with. To set up your project, complete the following steps:
- Identify the data that you want to use with the Conversational Analytics API. You can use data sources like BigQuery tables, Looker Explores, and Looker Studio reports.
In the Google Cloud console, on the project selector page, create a Google Cloud project that can access the data that you want to use with the Conversational Analytics API.
Enable the required APIs
To use the Conversational Analytics API, you must enable a set of required APIs in your Google Cloud project. If you plan to use the Conversational Analytics API from a Colab Enterprise environment, you must also enable additional APIs.
Required APIs
console
Enable the following APIs in the Google Cloud console for the Google Cloud project that you will use with the Conversational Analytics API.
Enable the Gemini Data Analytics API
gcloud
With the Google Cloud CLI, run the following gcloud services enable
commands to enable the Gemini Data Analytics API, the Gemini for Google Cloud API, and the BigQuery API, respectively:
gcloud services enable geminidataanalytics.googleapis.com --project=project_id gcloud services enable cloudaicompanion.googleapis.com --project=project_id gcloud services enable bigquery.googleapis.com --project=project_id
In the previous sample gcloud CLI commands, replace project_id
with your Google Cloud project ID.
APIs for Colab Enterprise
If you plan to use the Conversational Analytics API from a Colab Enterprise environment, also enable the following APIs:
Grant required roles
To use the Conversational Analytics API, grant the following Identity and Access Management (IAM) roles in the Google Cloud console to the principals (such as users or service accounts) that need to interact with the API:
- Gemini for Google Cloud User (
roles/cloudaicompanion.user
): required to create conversations that are managed by Google Cloud. - Looker Instance User (
roles/looker.instanceUser
): required to access data from a Looker (Google Cloud core) instance - BigQuery User (
roles/bigquery.user
): required to access data in BigQuery - BigQuery Studio User (
roles/bigquery.studioUser
): required if you use BigQuery Studio and data canvas
In addition, permissions for actions like managing agents are controlled by Gemini Data Analytics roles, as described in Grant Conversational Analytics API IAM roles and permissions.
Additional configuration for VPC Service Controls
If VPC Service Controls is enabled for your organization or for the Google Cloud project that you're using, add the following APIs, which are used by the Conversational Analytics API, to the allowlist:
- From
geminidataanalytics.googleapis.com
, allow the following API:projects.locations.chat
- From
aiplatform.googleapis.com
, allow the following API: - From
datacatalog.googleapis.com
, allow the following APIs: - From
bigquery.googleapis.com
, allow the following APIs: