> 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/pre-basic/providers/google-gemini.md).

# Google Gemini

## 获取APIKey

* 获取 Gemini 的 api key 前，你需要有一个 Google Cloud 项目（如果你已有，此过程可跳过）
* 进入 [Google Cloud](https://console.cloud.google.com/projectcreate) 创建项目，填写项目名称并点击创建项目

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

* 在官方 [API Key页面](https://aistudio.google.com/app/apikey?hl=zh-cn) 点击 `密钥 创建API密钥`

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

* 将生成的 key 复制，并打开 CherryStudio 的 [服务商设置](https://github.com/CherryHQ/cherry-studio-docs/blob/main/pre-basic/providers/broken-reference/README.md)
* 找到服务商 Gemini，填入刚刚获取到的 key

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

* 点击最下方管理或者添加，加入支持的模型并打开右上角服务商开关就可以使用了。

{% hint style="info" %}

* 中国除台湾之外其他地区无法直接使用 Google Gemini 服务，需自行解决代理问题；
  {% endhint %}

***

### 💡 获取帮助与提交反馈

如果您在配置或使用过程中遇到任何疑问、Bug 或有功能改进建议，请参考 [反馈与建议](/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/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.
