跳转到内容
搜索文档

Claude Desktop

最后更新 查看 MarkdownAgent 设置

Claude Desktop 可以将第三方推理请求发送到自定义 gateway。此配置会将这些请求发送到 AI Gateway 的 Anthropic 端点,并使用 Cloudflare gateway 令牌进行身份验证。AI Gateway 可通过 Unified Billing已存储的提供商密钥(BYOK)为你提供 Anthropic 凭据。

前提条件

开始之前,你需要:

  1. 在 Claude Desktop 中,选择 Help(帮助) > Troubleshooting(故障排除) > Enable Developer Mode(启用开发者模式)

  2. 选择 Developer(开发者) > Configure Third-Party Inference(配置第三方推理)

  3. Connection(连接) 中,将连接类型设为 Gateway

  4. Gateway credentials(网关凭据) 中,将 Credential kind(凭据类型) 设为 Static API key(静态 API 密钥)

  5. Gateway API key(网关 API 密钥) 设为你的 Cloudflare gateway 令牌。

    <CF_AIG_TOKEN> 替换为你的 gateway 令牌。

    <CF_AIG_TOKEN>
  6. Gateway auth scheme(网关身份验证方案) 设为 Bearer

  7. 将 gateway base URL 设为你的 gateway 的 Anthropic 端点。

    <ACCOUNT_ID><GATEWAY_ID> 替换为你的值。

    https://gateway.ai.cloudflare.com/v1/<ACCOUNT_ID>/<GATEWAY_ID>/anthropic
  8. Models(模型) 中,添加要使用的 Claude 模型。

    字段
    Model ID claude-sonnet-4-5
    Display name Claude Sonnet 4.5
    Tier alias sonnet
  9. Gateway credentials(网关凭据) 中,选择 Test connection(测试连接)

  10. 开始 Claude Desktop 对话。请求现在会通过 AI Gateway 路由。

要确认流量已到达 AI Gateway,请参阅验证是否生效

这篇文档对您有帮助吗?