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

# cc switch 配置

> 用 cc switch 一次配好 Claude Code 和 Codex

一个 API Key 可以同时配给 Claude Code 和 Codex，两边的请求地址都填 `https://ai.axuremart.com`。还没有 API Key 的话，先看[获取 API Key](https://docs.axuremart.com/api-key.md)。

## 第一步：下载安装 cc switch

点击对应系统的按钮下载安装包，下载后双击安装。

> [card] [Windows 版本](https://github.com/farion1231/cc-switch/releases/download/v3.16.5/CC-Switch-v3.16.5-Windows.msi)
>
> CC-Switch-v3.16.5-Windows.msi

> [card] [Mac 版本](https://github.com/farion1231/cc-switch/releases/download/v3.17.0/CC-Switch-v3.17.0-macOS.dmg)
>
> CC-Switch-v3.17.0-macOS.dmg

## 第二步：添加供应商

按你要用的工具选一个标签页。用几个工具就各添加一次，都填同一个 API Key。

> [tab] Claude Code
>
> 1. 打开 cc switch，在 claude 分类下创建供应商
>
> ![创建供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-03.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=1d338bff3ac67d985aba7da114d9615a)
>
> 2. 配置供应商
>
> ![配置供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-04.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=5a23b1afb1cf42f722239c9947534aa2)
>
> ![配置供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-05.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=e7269c708cf7794383fda47abe65bf92)
>
> | 配置项 | 填写内容 |
> | - | - |
> | 供应商类型 | 自定义配置 |
> | 名称 | 自己随意填写 |
> | 官网链接 | `https://ai.axuremart.com` |
> | API key | 你的 API Key |
> | 请求地址 | `https://ai.axuremart.com` |
> | 模型设置 | 保留空值 |
>
> 3. 启用供应商
>
> ![启用供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-06.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=0636182eca801d4bb5662dcead5a92b7)
>
> 4. 启动 Claude Code 后默认使用 Claude opus 5.5。要开启 1M 上下文或换成 Claude sonnet 5.5，在输入框里输入 `/model` 切换。
>
> ![切换模型](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-07.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=ad1f03a24442a80200a604d889fe4191)

> [tab] Codex
>
> 1. 打开 cc switch，在 codex 分类下创建供应商
>
> ![创建供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-19.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=a33e5ce3879b2a6cb5f8f9b8f4b851be)
>
> 2. 配置供应商
>
> ![配置供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-20.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=45b3c37883027d782f848667c9f815bc)
>
> ![配置供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-21.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=e3875c4bc0dc206104454c827b85f152)
>
> ![配置供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-22.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=572c048b7bea8acb4d395923b186937d)
>
> | 配置项 | 填写内容 |
> | - | - |
> | 供应商类型 | 自定义配置 |
> | 名称 | 自己随意填写 |
> | 官网链接 | `https://ai.axuremart.com` |
> | API key | 你的 API Key |
> | 请求地址 | `https://ai.axuremart.com` |
>
> 3. 在配置文件 `config.toml` 中粘贴下面的内容，把 `experimental_bearer_token` 换成你的 API Key
>
> ```toml theme={null}
> [model_providers.custom]
> name = "OpenAI"
> wire_api = "responses"
> requires_openai_auth = false
> http_headers = { "x-openai-actor-authorization" = "local-image-extension" }
> base_url = "https://ai.axuremart.com"
> experimental_bearer_token = "这里填写你的令牌key"
> ```
>
> ![config.toml 配置](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-23.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=8eba3efb45b583482729d777c2ba9eec)
>
> 4. 启用供应商
>
> ![启用供应商](https://mintcdn.com/agent-pm/oHetu81dZtjYE4sA/images/img-24.png?fit=max\&auto=format\&n=oHetu81dZtjYE4sA\&q=85\&s=597e5b4bff2ef047421b235f7796688f)

> [tab] Claude 桌面端
>
> Claude 桌面端和 Claude Code 是分开配置的。只配了 Claude Code 的话，桌面端用不了，需要在 cc switch 里单独设置一次。
>
> 1. 打开 cc switch，在顶部切换到 Claude 桌面端分类（带显示器小图标的那个），点击右上角的「+」添加供应商
>
> ![选择桌面端添加供应商](https://mintcdn.com/agent-pm/n4UGkRtRYmlSJxD-/images/img-36.png?fit=max\&auto=format\&n=n4UGkRtRYmlSJxD-\&q=85\&s=5236a185d79e89e5fe0664c755206bd3)
>
> 2. 预设供应商保持「自定义配置」，不要选其他预设
>
> ![保持自定义配置](https://mintcdn.com/agent-pm/n4UGkRtRYmlSJxD-/images/img-37.png?fit=max\&auto=format\&n=n4UGkRtRYmlSJxD-\&q=85\&s=a6056ec2b445a2550af7410632026665)
>
> 3. 按下表填写，然后点击「添加」
>
> | 配置项 | 填写内容 |
> | - | - |
> | 供应商名称 | 自己随意填写 |
> | 官网链接 | `https://ai.axuremart.com` |
> | API Key | 你的 API Key |
> | 请求地址 | `https://ai.axuremart.com`，末尾不要加斜杠 |
> | 需要模型映射 | 保持关闭 |
>
> ![填写桌面端配置](https://mintcdn.com/agent-pm/n4UGkRtRYmlSJxD-/images/img-38.png?fit=max\&auto=format\&n=n4UGkRtRYmlSJxD-\&q=85\&s=fd676d424994d18471ddfa13a495e168)
>
> 4. 确认供应商显示「使用中」
>
> ![桌面端供应商使用中](https://mintcdn.com/agent-pm/n4UGkRtRYmlSJxD-/images/img-39.png?fit=max\&auto=format\&n=n4UGkRtRYmlSJxD-\&q=85\&s=eac6502914e0a50f47d5a164b03b100f)
>
> 5. 打开 Claude 桌面端，不用登录就能直接对话
>
> > [!WARNING]
> >
> > 如果配置前已经打开过 Claude 桌面端，要先完全退出，再重新打开，配置才会生效。

> [!NOTE]
>
> 部分截图是旧版本，里面的 `/v1` 后缀和分组可以忽略，以本页文字为准。

配置好后，接着看 [Claude Code](https://docs.axuremart.com/claude-code/cli.md)、[Claude 桌面端](https://docs.axuremart.com/claude-code/desktop.md) 或 [Codex](https://docs.axuremart.com/codex/cli.md) 开始使用。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.