---
title: Using Vertex AI API Key in LobeChat
description: Learn how to configure and use Vertex AI models in LobeChat, get an API key, and start a conversation.
tags:
- LobeChat
- Vertex AI
- API Key
- Web UI
---
# Using Vertex AI in LobeChat
[Vertex AI](https://cloud.google.com/vertex-ai) is a fully managed, integrated AI development platform from Google Cloud, designed for building and deploying generative AI. It provides easy access to Vertex AI Studio, Agent Builder, and over 160 foundational models for AI development.
This document will guide you on how to connect Vertex AI models in LobeChat:
### Step 1: Prepare a Vertex AI Project
- First, visit [Google Cloud](https://console.cloud.google.com/) and complete the registration and login process.
- Create a new Google Cloud project or select an existing one.
- Go to the [Vertex AI Console](https://console.cloud.google.com/vertex-ai).
- Ensure that the Vertex AI API service is enabled for the project.
### Step 2: Set Up API Access Permissions
- Go to the Google Cloud [IAM Management page](https://console.cloud.google.com/iam-admin/serviceaccounts) and navigate to `Service Accounts`.
- Create a new service account and assign a role permission to it, such as `Vertex AI User`.
- On the service account management page, find the service account you just created, click `Keys`, and create a new JSON format key.
- After successful creation, the key file will be automatically saved to your computer in JSON format. Please keep it safe.
### Step 3: Configure Vertex AI in LobeChat
- Visit the `App Settings` and then the `AI Service Provider` interface in LobeChat.
- Find the settings item for `Vertex AI` in the list of providers.
- Open the Vertex AI service provider settings.
- Fill the entire content of the JSON format key you just obtained into the API Key field.
- Select a Vertex AI model for your assistant to start the conversation.
You may need to pay the API service provider during usage. Please refer to Google Cloud's relevant fee policies.
Now you can use the models provided by Vertex AI for conversations in LobeChat.