> For the complete documentation index, see [llms.txt](https://docs.cherryai.com.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/pre-basic/providers/google-gemini.md).

# Google Gemini

## 獲取 API Key

* 喺獲取 Gemini 嘅 API key 之前，你需要有一個 Google Cloud 專案（如果你已經有，就可以跳過呢個步驟）
* 進入 [Google Cloud](https://console.cloud.google.com/projectcreate) 建立專案，填寫專案名稱，然後撳建立專案

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

* 喺官方 [API Key 頁面](https://aistudio.google.com/app/apikey?hl=zh-cn) 撳 `密鑰 建立 API 密鑰`

<figure><img src="/files/62542cf57c30f77754f9753d60126f21dddba83f" alt=""><figcaption></figcaption></figure>

* 將生成嘅 key 複製，然後打開 CherryStudio 嘅 [模型服務設定](/docs/zhong-wen-fan-ti/pre-basic/providers/providers.md)
* 搵到服務提供者 Gemini，填入啱啱攞到嘅 key

<figure><img src="/files/22b03f4a444744b65fb7828f2d8107df93740b09" alt=""><figcaption></figcaption></figure>

* 撳最下方管理或者添加，加入支援嘅模型，再打開右上角服務商開關就可以用喇。

{% hint style="info" %}

* 中國除台灣之外其他地區無法直接使用 Google Gemini 服務，需要自行解決代理問題；
  {% endhint %}

***

### 攞幫助同提交意見

如果您喺配置或使用過程中遇到任何疑問、Bug 或有功能改善建議，請參考 [反饋與建議](/docs/zhong-wen-fan-ti/question-contact/suggestions.md) 入面提供嘅官方渠道。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.cherryai.com.cn/docs/zhong-wen-fan-ti/pre-basic/providers/google-gemini.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
