# Vertex AI

## 教程概述

### 1. 取得 API Key

* 喺取得 Gemini 嘅 API Key 之前，你需要有一個 Google Cloud 專案（如果你已經有，可以跳過呢個步驟）
* 進入 [Google Cloud](https://console.cloud.google.com/projectcreate) 創建項目，填寫項目名稱並點擊創建項目

<figure><img src="/files/febf55e7627e82cfdd86fcd466c09412f0b1cdb6" alt=""><figcaption></figcaption></figure>

* 進入[Vertex AI 控制台](https://console.cloud.google.com/vertex-ai)
* 喺建立好嘅專案中啟用 [Vertex AI API](https://console.cloud.google.com/apis/library/aiplatform.googleapis.com?inv=1\&invt=Ab0iBA)

<figure><img src="/files/78e14f83eb4d071a6be1ca96c2b832f5e0cae46e" alt=""><figcaption></figcaption></figure>

## 2. 設置 API 存取權限

* 打開 [服務帳號](https://console.cloud.google.com/iam-admin/serviceaccounts) 權限介面，建立服務帳號

<figure><img src="/files/5417de375dfe78ed77055c6c0e5489de3d00708c" alt=""><figcaption></figcaption></figure>

* 喺服務帳號管理頁面搵返頭先建立嘅服務帳號，撳`金鑰`並建立一個新的 JSON 格式金鑰

<figure><img src="/files/26c8161f60567fd3612b7687cacfe20ceabfce0c" alt=""><figcaption></figcaption></figure>

* 建立成功後，金鑰檔案會以 JSON 檔案格式自動儲存到你部電腦上，請 **妥善保存**

## 3. 喺 Cherry Studio 入面配置 Vertex AI

* 選擇 Vertex AI 服務供應商
* 將 JSON 檔案對應嘅欄位填入

<figure><img src="/files/9c73a1657249fa1fb67f8559b52a54f9ed47d14c" alt=""><figcaption></figcaption></figure>

撳添加 [模型](https://console.cloud.google.com/vertex-ai/model-garden)，就可以開開心心開始使用喇！


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cherry-ai.com/docs/zhong-wen-fan-ti/pre-basic/providers/vertex-ai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
