首页 / 文档 / 各工具的 API 密钥配置

各工具的 API 密钥配置

选择正确的密钥分组,然后使用客户端所需的密钥和基础 URL。

先选择访问组

  1. 确认所需套餐或按余额使用的访问权限已在您的账户中生效。
  2. 对于限时 Claude 套餐,请使用以下组中的密钥: Claude Unlimited。Codex 组的密钥使用独立的 GPT/Codex 路由。
  3. 检查 可用模型 ,在配置客户端之前使用同一密钥进行检查。

然后使用下面的客户端设置。请妥善保管密钥,并在开始较大任务之前测试一个简短请求。

一份统一参考,让您无需为了记住一个后缀而打开五份指南。

工具密钥填写位置基础 URL
Claude CodeANTHROPIC_AUTH_TOKENhttps://aiprimetech.io
Anthropic SDK(Python/TS)api_key= 或 ANTHROPIC_API_KEYhttps://aiprimetech.io
OpenAI SDK(Python/TS)api_key= 或 OPENAI_API_KEYhttps://aiprimetech.io/v1
Cursor设置 → 模型 → OpenAI 密钥https://aiprimetech.io/v1
Cline扩展设置中的 Anthropic 提供商https://aiprimetech.io
ContinueapiKey 在 config.jsonhttps://aiprimetech.io (anthropic)/ https://aiprimetech.io/v1 (openai)
AiderANTHROPIC_API_KEY / OPENAI_API_KEYANTHROPIC_API_BASE / OPENAI_API_BASE
Codex CLIOPENAI_API_KEYhttps://aiprimetech.io/v1
Zed助手提供商设置https://aiprimetech.io/v1
LangChain / LiteLLMOPENAI_API_KEYhttps://aiprimetech.io/v1
curl (Messages)x-api-key 请求头https://aiprimetech.io/v1/messages
curl (Chat Completions)Authorization: Bearerhttps://aiprimetech.io/v1/chat/completions
OpenCode (provider/npm configuration)provider.<name>.options.apiKeyhttps://aiprimetech.io/v1 替换为 @ai-sdk/anthropic
Hermes 具名自定义提供商key_env 在提供商配置中https://aiprimetech.io/v1; transport: anthropic_messages
OpenClaw 自定义 Claude 提供商提供商 apiKey; api: anthropic-messageshttps://aiprimetech.io
请按您所用客户端对应的行配置。Claude Code 和 Anthropic SDK 使用不带路径的源地址;OpenCode 的 Anthropic 提供商示例和 Hermes 自定义提供商使用 /v1。仅凭 API 格式无法确定客户端如何追加路径。