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

# Cursor

> 在 Cursor 中配置自定义 OpenAI API

## 配置步骤

1. 打开 **Cursor Settings → Models**。
2. 启用自定义 OpenAI API Key，填入 `API_KEY`。
3. 在 **Override OpenAI Base URL** 填写 `https://api.bianxie.ai/v1`。
4. 添加[实时模型页](https://api.bianxie.ai/pricing)中的完整模型 ID并启用。
5. 在 Chat 或 Agent 的模型选择器中切换到该模型。

## 验证

先在新对话中发送“只回复 OK”。成功后再让 Agent 读取当前文件，但暂不修改。若模型未出现在选择器中，重新打开 Cursor 或禁用再启用该模型。

## 常见问题

* `401`：重新粘贴 Key，确认没有前后空格。
* `404`：确认 Base URL 以 `/v1` 结尾。
* 工具调用失败：改用明确支持 tools 的模型。
* 请求仍走 Cursor 官方服务：确认当前会话实际选中了自定义模型。

<Note>Cursor 的部分内置专有功能可能固定使用其官方服务；自定义模型是否适用于 Chat、Agent 或补全取决于当前 Cursor 版本。</Note>
