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

# Cursor API Key 配置

> 在 Cursor Pro 或更高套餐中，使用一把 OmniaKey API key 和 OpenAI 兼容 base URL。

Cursor Pro 或更高套餐可以通过 OpenAI 兼容配置接入 OmniaKey。打开 Cursor 的模型设置，启用 OpenAI
API Key，填入 OmniaKey token，并把 Override Base URL 设置为
`https://api.omniakey.com/v1`。

> [!NOTE]
>
> Cursor 当前要求 Pro 或更高套餐才能在 Agent 和 Ask 中使用 BYOK。Free / Hobby 用户应先
> 升级 Cursor，再创建或充值 OmniaKey Key。自定义 Key 只适用于受支持的聊天模型；Cursor
> Tab 仍使用 Cursor 内置模型。套餐和补量方案见 [Cursor 额度用完指南](https://omniakey.com/zh/blog/cursor-usage-limit)。

## 直接答案

在 Cursor 中打开 **Settings → Models → API Keys**：

| 字段 | 值 |
| - | - |
| OpenAI API Key | 你的 OmniaKey API key |
| Override Base URL | `https://api.omniakey.com/v1` |
| Model ID | 例如 `claude-opus-5` |

## 第 1 步：创建 OmniaKey API key

打开 [API Keys dashboard](https://omniakey.com/dashboard/tokens)，创建一把例如
`cursor-local` 的 key，并复制保存。

## 第 2 步：配置 Cursor

在 Cursor 的模型设置中：

1. 启用 OpenAI API key。
2. 粘贴你的 OmniaKey key。
3. 启用 Override Base URL。
4. 设置为 `https://api.omniakey.com/v1`。

## 第 3 步：添加模型 id

从 [支持模型](https://docs.omniakey.com/zh/models.md) 复制准确的模型 id。Cursor 可以通过 OpenAI 兼容入口调用支持的
Claude、GPT、Gemini、Grok 模型。

常见示例：

* `claude-opus-5`
* `gpt-5.6-terra`
* `gemini-3.1-pro-preview`
* `grok-4.5`

## 常见问题

### Cursor 免费版可以这样配置吗？

不可以。Cursor 当前要求 Pro 或更高套餐才能在 Agent 和 Ask 中使用自定义 API Key。
OmniaKey 提供模型用量，不能代替 Cursor 订阅。

### Cursor 应该使用什么 base URL？

使用 `https://api.omniakey.com/v1`。

### Cursor 可以通过 OpenAI 兼容接口调用 Claude 吗？

可以。OmniaKey 会把支持的 Claude id 映射到 OpenAI 兼容 Chat Completions 入口。

### 是否应该所有 Cursor workspace 共用一把 key？

可以共用，但按 workspace 分 key 更方便撤销、限额和审计。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.