Source: https://aiprimetech.io/zh/docs/guides/cursor/ [首页](/zh/) / [文档](/zh/docs/) / Cursor # Cursor 通过兼容 OpenAI 的端点在 Cursor 中使用 Claude 模型,无需 Anthropic 账户。 复制页面 [ 以 Markdown 查看](/zh/docs/guides/cursor.md) [ 向 ChatGPT 提问](https://chatgpt.com/?q=Read%20https%3A//aiprimetech.io/docs/guides/cursor.md%20and%20answer%20questions%20about%20it.%20Start%20with%20a%20short%20summary.) [ 在 Claude 中提问](https://claude.ai/new?q=Read%20https%3A//aiprimetech.io/docs/guides/cursor.md%20and%20answer%20questions%20about%20it.%20Start%20with%20a%20short%20summary.) Cursor 使用 OpenAI Chat Completions 格式,因此通过以下地址连接 /v1/chat/completions ——这意味着 /v1 这一后缀必须包含在基础 URL 中. ## 设置 - 打开 设置 → 模型 (或 Cursor 设置 → 模型 ,具体取决于版本)。 - 找到 OpenAI API 部分并粘贴你的 sk- 密钥。 - 启用 覆盖 OpenAI 基础 URL 并将其设置为 https://aiprimetech.io/v1. - 添加自定义模型名称——使用准确的 ID,例如 claude-sonnet-4-6. - 点击 验证 / 保存。Cursor 会发起一次测试调用;结果显示为绿色就表示连接正常。 基础 URLhttps://aiprimetech.io/v1 API 密钥您的 sk- 键 模型 IDclaude-sonnet-4-6, claude-opus-4-8, gpt-5.5, gemini-3-pro 使用的端点/v1/chat/completions 遗漏 /v1 是 Cursor 配置失败的首要原因——验证会因 404 而失败,因为 Cursor 只会追加 /chat/completions 到你提供的基础 URL 后面。参见 [基础 URL](/zh/docs/getting-started/base-urls/). ## 支持与不支持的功能 | 功能 | 状态 | 使用自定义模型聊天 | 可用 | 行内编辑(Ctrl/Cmd+K) | 可用 | Composer / 智能体模式 | 使用支持工具调用的模型时可用 | Cursor Tab(自动补全) | 使用 Cursor 自研模型,不受此设置影响 Cursor Tab 不会通过任何自定义基础 URL 路由——这是 Cursor 的产品决策,并非网关限制。 ## 验证失败时 - 404 ——基础 URL 中缺少 /v1 后缀。 - 401 ——密钥有误或含有多余空格。请从仪表板重新复制。 - 找不到模型——自定义模型名称必须是来自以下来源的准确 ID [模型](/zh/docs/getting-started/models/),而不是“Claude Sonnet”之类的显示名称。 - 验证通过但回复为空——参见 [故障排查](/zh/docs/guides/troubleshooting/). [Chat CompletionsCursor 使用的端点](/zh/docs/api-reference/chat-completions/)[基础 URL/v1 规则](/zh/docs/getting-started/base-urls/)[ClineAnthropic 格式的替代方案](/zh/docs/guides/cline/) [上一页Claude Code](/zh/docs/guides/claude-code/)[下一页Cline](/zh/docs/guides/cline/)