# OpenAI

## 获取APIKey

* 在官方[API Key页面](https://platform.openai.com/api-keys)点击<mark style="background-color:green;">`+ Create new secret key`</mark>

<img src="/files/NncU4jujdDHnbMrjcKIT" alt="" class="gitbook-drawing">

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

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

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

{% hint style="info" %}

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


---

# 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/pre-basic/providers/openai.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.
