> ## Documentation Index
> Fetch the complete documentation index at: https://aaa-418ef7e6.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 在 Claude Code 中使用 CiYuanBest

> 通过 CC Switch 可视化配置工具，在 Claude Code 中接入 CiYuanBest 服务

<Tip>
  为降低大家使用的门槛，本文档通过可视化的工具来进行配置。

  对于进阶玩家手动配置，核心信息如下：

  * **Base URL**：`https://api.ciyuan.best`
  * **可用模型**：[https://www.ciyuan.best/pricing](https://www.ciyuan.best/pricing)
</Tip>

## 进入 CiYuanBest 官网申请自己的 key

* 如果你还没有 CiYuanBest 账号，请先注册：[注册账号和获取 API Key](/getting-started/register)
* 如果你还没有 CiYuanBest 的 API Key，请先生成：[注册账号和获取 API Key](/getting-started/register)

## 选择合适自己应用场景的模型

进入 [CiYuanBest 模型广场](https://www.ciyuan.best/pricing)：

* 模型广场中的模型都可以使用，只是每个模型有各自的价格
* 点击模型后面的复制按钮，将模型 ID 复制到剪切板
* 将模型 ID 记录下来，例如：`MiniMax-M2.7`
  <Frame>
    <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-10.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=e9b209a7d32a9851639088256e17153b" alt="Image" width="1280" height="711" data-path="images/image-10.png" />
  </Frame>

## 下载可视化配置工具 CC Switch

根据你的操作系统下载对应版本：[https://github.com/farion1231/cc-switch/releases](https://github.com/farion1231/cc-switch/releases)

<Frame>
  <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-11.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=919fa3b495a3b4e4a4bb95ed7e61d643" alt="Image" width="2402" height="1864" data-path="images/image-11.png" />
</Frame>

<Frame>
  <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-12.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=36c4dc30d57b7727a85bcc1e572286a2" alt="Image" width="1280" height="466" data-path="images/image-12.png" />
</Frame>

## 在 CC Switch 中给 Claude Code 添加模型

### 点击右上角的「+」添加模型

<Frame>
  <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-13.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=5329dfece381a6c692bc807ca3f816ed" alt="Image" width="1280" height="466" data-path="images/image-13.png" />
</Frame>

### 点击右上角的「+」添加模型

点击「自定义配置」，然后添加如下字段：

```text theme={null}
供应商名称：CiYuanBest
官网链接：https://www.ciyuan.best
API Key：刚才从 CiYuanBest 复制的令牌
请求地址：https://api.ciyuan.best
API 格式：选择，Anthropic Messages（原生）
认证字段：选择，ANTHROPIC_AUTH_TOKEN（默认）
主模型：claude-sonnet-4-6（或者自己合适的模型，比如：MiniMax-M2.7）
Sonnet模型模型：claude-sonnet-4-6（或者自己合适的模型，比如：MiniMax-M2.7）
Opus默认模型：claude-opus-4-6（或者自己合适的模型，比如：MiniMax-M2.7）
勾选：写入通用配置
```

最后点击底部按钮「添加」。

<Frame>
  <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-17.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=18351e3e2356018e141280b2c7e64319" alt="Image" title="Image" style={{ width:"54%" }} width="1872" height="2172" data-path="images/image-17.png" />
</Frame>

上面是上半部分的配置，下面是下半部分的配置

<Frame>
  <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-18.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=d6a778d4135ec11964702f44f2f4a7a2" alt="Image" title="Image" style={{ width:"55%" }} width="1872" height="2172" data-path="images/image-18.png" />
</Frame>

### 回到模型列表页

点击「启用」按钮，就可以正常在 Claude Code 中使用 CiYuanBest 提供服务。

<Frame>
  <img src="https://mintcdn.com/clawpower/TG-Ad4D7TXq_8F5_/images/image-16.png?fit=max&auto=format&n=TG-Ad4D7TXq_8F5_&q=85&s=49368ee0cd259cffc888d60be4181a7b" alt="Image" width="1280" height="587" data-path="images/image-16.png" />
</Frame>

## 进阶：切换 claude-opus-4-6 模型

请留意 claude-opus-4-6 模型的价格：好用是好用，但是价格没那么美丽。

只需要将模型 ID 都改成 `claude-opus-4-6` 即可。
