View Categories

How to Set Up the Vertex AI API Key

This article will guide you through integrating Vertex AI with AI Content Labs.

Step 1: Access your Google Cloud Platform account

Log in to your Google Cloud Platform account at https://cloud.google.com/cloud-console/. If you don’t have one, create a new account.

Google Cloud Console

Step 2: Get the Vertex AI API Key

  1. Create a new project or select an existing one:
    • If it’s a new project, in the top bar, select the project selection dropdown menu and click on “NEW PROJECT”.
    • Assign a name to the project and click on “Create”. Note that the project ID will be generated automatically and cannot be changed later.
  2. Enable the Vertex AI API:
    • In the top, search for “Vertex AI” and select it.
    • Click on “ENABLE”.
  3. Configure the service account:
    • In the side menu, select “IAM and Admin” and then “Service Accounts”.
    • Click on “CREATE SERVICE ACCOUNT”.
    • Complete the required information and click on “CREATE AND CONTINUE”.
    • In Step 2 “Grant this service account access to the project”, select the role Vertex AI Service Agent. This is crucial for Vertex AI to work correctly with AI Content Labs. Click on “Continue”.
    • Step 3 “Grant users access to this service account” is optional. Click on “Done”.
  4. Create a key for the service account:
    • In “IAM and Admin”, select “Service Accounts”.
    • Locate the service account you just created and select the email.
    • Go to the “KEYS” tab and click on “ADD KEY”, then on “Create new key”.
    • Select the key type “JSON” and click on “CREATE”. Save this JSON file in a safe place; you will need it later. Note that the created API key may take a few minutes to become available.

Google Cloud Console welcome page
Select a project in Google Cloud Console
Create new project Google Cloud Console
Search Vertex AI in Google Cloud Console
Vertex AI Panel in Google Cloud Console
Vertex AI API in Google Cloud Marketplace
APIs and Services in Google Cloud Console
Credentials in APIs and Services of Google Cloud Console
Create service account in IAM and Admin of Google Cloud Console
Assign role to service account in Google Cloud Console
Credentials in APIs and Services of Google Cloud Console
Service account in IAM and Admin of Google Cloud Console
Service account keys tab in Google Cloud Console
Create private key in Google Cloud Console

Step 3: Enter the API key in AI Content Labs

  1. Access AI Content Labs.
  2. Click on the user menu at the bottom left of the screen.
  3. Select “Set Up API Keys”.
  4. Locate the “Vertex AI” card.
  5. Click on “Connect”.
  6. Paste the content of the JSON file you copied into the “Private Key JSON” field.
  7. Click on “Save”.

Set Up API Keys

JSON file of the private key

Integration Cards

With these steps, you have successfully integrated Vertex AI with AI Content Labs. To explore available models for Vertex AI, visit our models page. Contact technical support if you experience any issues.