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

# Claude Desktop 接入 BetterToken Claude 模型

> 在 Claude Desktop 中通过 Gateway 配置 BetterToken Claude 提供商的 Base URL 和 API Key。

本页只介绍将 BetterToken 的 **Claude 提供商**直接接入 Claude Desktop。你需要填写 BetterToken API Key、`https://www.bettertoken.ai` 和 `x-api-key`，然后重启 Claude Desktop。

## 重点信息

| 字段       | 填写内容                         |
| -------- | ---------------------------- |
| API Key  | BetterToken API Key          |
| Base URL | `https://www.bettertoken.ai` |
| Model    | Claude 提供商模型                 |

## 准备工作

* <a href={"https://bettertoken.ai/register"}>创建并复制 BetterToken API Key</a>
* 确认该 API Key 可以使用 Claude 提供商模型

## 安装

从 [Claude Desktop 官网](https://claude.ai/download)安装或更新到最新版本。完成安装后启动 Claude Desktop。

## 手动配置

<Steps>
  <Step title="启用 developer mode">
    打开 Claude Desktop 后，在 macOS 左上角菜单中选择 **Help** → **Troubleshooting** → **Enable Developer Mode**。

    <Frame>
      <img src="https://mintcdn.com/bettertoken-d796114e/ZMo3cJhJx4ISRrsG/images/claude-desktop-llmeasy-api/enable-developer-mode-menu.png?fit=max&auto=format&n=ZMo3cJhJx4ISRrsG&q=85&s=88d5591c4fc6690a13b846df03f84991" alt="在 Claude Desktop 的 Help 菜单中选择 Enable Developer Mode。" style={{ borderRadius: '0.5rem' }} width="3840" height="2160" data-path="images/claude-desktop-llmeasy-api/enable-developer-mode-menu.png" />
    </Frame>

    在确认窗口中点击 **Enable**，然后重启 Claude Desktop。

    <Frame>
      <img src="https://mintcdn.com/bettertoken-d796114e/yi2bQP5Q3QRPQ3t1/images/claude-desktop-llmeasy-api/developer-mode-confirm.png?fit=max&auto=format&n=yi2bQP5Q3QRPQ3t1&q=85&s=ec60755e271216c1383bd7ec466c58db" alt="确认启用 Claude Desktop developer mode。" style={{ borderRadius: '0.5rem' }} width="520" height="480" data-path="images/claude-desktop-llmeasy-api/developer-mode-confirm.png" />
    </Frame>
  </Step>

  <Step title="打开第三方推理配置">
    重启后，在 macOS 菜单栏选择 **Developer** → **Configure Third-Party Inference...**。

    <Frame>
      <img src="https://mintcdn.com/bettertoken-d796114e/ZMo3cJhJx4ISRrsG/images/claude-desktop-llmeasy-api/configure-third-party-inference.png?fit=max&auto=format&n=ZMo3cJhJx4ISRrsG&q=85&s=f4412369928fe11c78433578e0efa60a" alt="在 Developer 菜单中选择 Configure Third-Party Inference。" style={{ borderRadius: '0.5rem' }} width="3840" height="2160" data-path="images/claude-desktop-llmeasy-api/configure-third-party-inference.png" />
    </Frame>
  </Step>

  <Step title="填写 BetterToken API 信息">
    在配置窗口中选择 **Gateway**，然后填写：

    | 字段                      | 填写内容                         |
    | ----------------------- | ---------------------------- |
    | **Gateway base URL**    | `https://www.bettertoken.ai` |
    | **Gateway API key**     | 你的 BetterToken API Key       |
    | **Gateway auth scheme** | `x-api-key`                  |

    选择 **Gateway auth scheme** 后，Claude Desktop 会获取可用的 Claude 模型。点击 **Apply locally**。

    <Frame>
      <img src="https://mintcdn.com/bettertoken-d796114e/ZMo3cJhJx4ISRrsG/images/claude-desktop-llmeasy-api/gateway-credentials.png?fit=max&auto=format&n=ZMo3cJhJx4ISRrsG&q=85&s=14951973725bde190ce650415e7b67f8" alt="在 Claude Desktop 中填写 BetterToken Gateway Base URL、API Key 和认证方式。" style={{ borderRadius: '0.5rem' }} width="1800" height="1440" data-path="images/claude-desktop-llmeasy-api/gateway-credentials.png" />
    </Frame>
  </Step>
</Steps>

## 验证连接

点击 **Save & Restart**。重新打开后选择 **Continue with Gateway**，发送一条简短消息。左下角显示 **Gateway** 且消息正常返回，即表示配置生效。

<Frame>
  <img src="https://mintcdn.com/bettertoken-d796114e/yi2bQP5Q3QRPQ3t1/images/claude-desktop-llmeasy-api/gateway-ready.png?fit=max&auto=format&n=yi2bQP5Q3QRPQ3t1&q=85&s=292b7db7ffddbcb11be3312dda097997" alt="Claude Desktop 已通过 BetterToken Gateway 打开并可以正常使用。" style={{ borderRadius: '0.5rem' }} width="3840" height="2100" data-path="images/claude-desktop-llmeasy-api/gateway-ready.png" />
</Frame>

## 切换模型

打开模型选择器，选择 Gateway 返回的其他 Claude 模型。没有看到目标模型时，重新打开 **Configure Third-Party Inference...** 并点击 **Apply locally**，然后重启 Claude Desktop。

## 常见错误

| 问题           | 处理方式                                                                 |
| ------------ | -------------------------------------------------------------------- |
| 无法连接 Gateway | 确认 **Gateway base URL** 正好是 `https://www.bettertoken.ai`，不要添加 `/v1`。 |
| 返回 `401`     | 重新复制 BetterToken API Key，并确认认证方式为 `x-api-key`。                       |
| 没有 Claude 模型 | 确认 API Key 可以使用 Claude 提供商模型，然后重新打开配置窗口。                             |
| 配置未生效        | 完全退出 Claude Desktop，再重新打开并选择 **Continue with Gateway**。              |

## 进阶配置

需要在 Claude Desktop 中使用 GPT、Kimi、GLM 或其他非 Claude 提供商时，请通过 [CC Switch 配置 Claude Desktop](/zh/ai-tools/cc-switch#claude-desktop)。CC Switch 负责 API Format、模型映射、代理和重启生效流程。

### 支持的提供商

| 提供商    | 状态   |
| ------ | ---- |
| Claude | 手动配置 |
| GPT    | 进阶配置 |
| Kimi   | 进阶配置 |
| GLM    | 进阶配置 |

<Note>状态仅针对本页介绍的 BetterToken 接入方式。</Note>

<Accordion title="配置方式说明">
  * **进阶配置**：安装 CC Switch，并使用本地代理、协议转换或模型映射。
  * **手动配置**：填写 API Key、Base URL 和 Model。
</Accordion>

### 相关指南

* [Claude Desktop 使用第三方模型](/zh/faq/claude-desktop/third-party-models)
* [CC Switch 配置 BetterToken](/zh/ai-tools/cc-switch)
* [Codex CLI 自定义 provider 配置](/zh/ai-tools/codex)
* [下载最新版 CC Switch](https://github.com/farion1231/cc-switch/releases)

## 技术说明

<Accordion title="Gateway 地址与认证">
  Claude Desktop 的 **Gateway base URL** 使用 Anthropic-compatible 地址 `https://www.bettertoken.ai`，不要添加 `/v1`。认证方式选择 `x-api-key`。
</Accordion>
