工具接入

在 Cursor 中使用 Claude API 密钥

Cursor 允许你自带 Anthropic 密钥,这意味着你可以用折扣预付余额在 Cursor 中运行 Claude,而不必依赖捆绑套餐。

·

三步配置

  1. 01打开 Cursor → Settings → Models → Anthropic API。
  2. 02把 Base URL 设为 https://api.apitoken.sale,并粘贴你的 sk-pool-••• 密钥。
  3. 03选择一个模型,例如 claude-opus-4-8,即可开始编码。

另见: 无需 Anthropic 账户在 Cursor 中运行 Claude

配置

# Cursor → Settings → Models → Anthropic API
Base URL : https://api.apitoken.sale
API key  : sk-pool-•••
Model    : claude-opus-4-8

故障排查

  • Cursor 忽略密钥:确认你编辑的是 Anthropic 提供方,而不是 OpenAI。
  • 找不到模型:设置一个当前的模型 ID,例如 claude-opus-4-8。
  • 401:重新检查 Base URL,并确认密钥完整粘贴。

连接成功后,所有受支持的 Claude 模型都可在同一把密钥和余额下使用。

任何语言都能在 Cursor 中使用你的 Claude API 密钥

密钥与语言无关——无论是 Python、JavaScript、TypeScript、Go、Rust 还是其他项目,Cursor 都能在 Windows、macOS 和 Linux 上使用它。你配置的是模型提供方,而不是编程语言。

常见问题

我能在 Cursor 里用自己的 Claude 密钥吗?

可以。Cursor 的 Anthropic 提供方接受自定义 Base URL 和密钥,因此你可以把它指向 apitoken.sale。

我还需要 Cursor Pro 吗?

你可以用自己的 API 密钥和余额运行 Claude;而需要 Cursor 自身套餐的功能则与模型提供方无关,属于另一回事。

Claude API 密钥能在 Windows 和 Mac 的 Cursor 里用吗?

可以——Anthropic 提供方设置在 Windows、macOS 和 Linux 上完全相同。

通过 Google 或 GitHub 创建密钥,用 $10 的 Claude 赠送用量测试网关。