> ## 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 高级会员及以上的用户才支持自定义配置模型。

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

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

## 一、安装 Cursor

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

## 二、创建新 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 模型编码。

<Warning>
  注意: 在 Cursor 中，需要输入模型的**大写名称**，如 `GLM-5.2`，不能填小写名称。
</Warning>

## 三、保存并切换模型

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

## 四、开始使用

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