> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs-staging.joytokens.ai/llms.txt.

# Claude Desktop

> 使用 Claude Desktop 接入 JoyToken

## 开启第三方推理

1. 在 Claude Desktop 中打开 **Help > Troubleshooting**，开启 Developer Mode。
2. 打开 **Developer > Configure Third-Party Inference**。
3. 选择 **Gateway** 作为推理服务商。

## 配置 JoyToken

| 配置项                 | 值                                            |
| ------------------- | -------------------------------------------- |
| Gateway base URL    | `https://api-staging.joytokens.ai/anthropic` |
| Gateway API key     | 你的 JoyToken API Key                          |
| Credential kind     | Static API key                               |
| Gateway auth scheme | `x-api-key`                                  |
| Model discovery     | 关闭                                           |
| Inference model     | `auto`                                       |

在本机应用配置，然后新建一个对话。

## 验证

发送 `Reply with exactly: pong`。成功时会返回 `pong`。

## 常见错误

| 错误                 | 处理方式                                    |
| ------------------ | --------------------------------------- |
| `401 Unauthorized` | 检查 Gateway API key，并确认鉴权方式是 `x-api-key` |
| 没有可用模型             | 关闭模型发现并手动添加 `auto`                      |
| 请求使用了其他服务商         | 确认 Inference provider 已设置为 Gateway      |

## 相关资源

* [Claude Desktop Gateway 配置](https://claude.com/docs/third-party/claude-desktop/gateway)
* [Claude Desktop 应用内配置](https://claude.com/docs/third-party/claude-desktop/in-app-configuration)
* [JoyToken 环境](/zh/user-guide/environments)