> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigmodel.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# Cursor

> 在 Cursor 中使用 GLM Coding Plan 的方法

将 GLM 模型通过 OpenAI 协议在 **Cursor** 中自定义配置模型接入使用。

<Danger>
  注意：由于 Cursor 的限制，只有订阅了 Cursor 高级会员及以上的用户才支持自定义配置模型。
</Danger>

<Danger>
  注意：若非 Cursor 高级会员，配置后会报错 `The model GLM does not work with your current plan or api key`.
</Danger>

<Tip>
  使用最新 GLM 模型，需要配置模型编码为对应的模型编码
</Tip>

### 1. 安装 Cursor

访问 Cursor 官网下载并安装适合您的操作系统的版本。

### 2. 创建新 Provider/Model

在 Cursor 中，打开 “**Models**” 部分，并点击 “**Add Custom Model**” 按钮。

* 选择 **OpenAI 协议**。
* 配置 **OpenAI API Key**（从[智谱开放平台](https://bigmodel.cn/usercenter/proj-mgmt/apikeys)获取）。
* 在 **Override OpenAI Base URL** 中，将默认 URL 替换：`https://open.bigmodel.cn/api/coding/paas/v4`。
* 输入您希望使用的 GLM 模型编码。
* 注意: 在 Cursor 中，需要输入模型的大写名称不能小写名称，如 `GLM-4.7`。

### 3. 保存并切换模型

配置完成后，保存设置并在主页上选择您刚创建的 Provider。

### 4. 开始使用

通过配置后，您可以开始使用 GLM 模型进行代码生成、调试、任务分析等工作。
