---
title: CC Switch | RunAPI
description: 安裝 CC Switch，新增 RunAPI Claude Code Provider，選擇模型，並驗證連線。
url: https://runapi.ai/zh-TW/docs/resources/tool-integrations/cc-switch.md
canonical: https://runapi.ai/zh-TW/docs/resources/tool-integrations/cc-switch
locale: zh-TW
---

> HTML 版本: https://runapi.ai/zh-TW/docs/resources/tool-integrations/cc-switch
> 代理程式網站索引: https://runapi.ai/llms.txt

# CC Switch

## 概覽

CC Switch 是一款用於管理程式碼工具供應商的桌面應用程式。本指南將其 Claude Code 供應商連接至 RunAPI，無需手動編輯您的 shell 設定檔或專案檔案。

## 開始之前

* 安裝 Claude Code 並登入您的 RunAPI 帳戶。
* 依照[身分驗證指南](https://runapi.ai/zh-TW/docs/guides/authentication.md)建立一組標準 API 金鑰。請將其保存於 CC Switch 中，不要加入版本控制。
* 使用可透過此連線取得的 RunAPI 模型識別碼。您可從 CC Switch 中選擇，或從[模型目錄](https://runapi.ai/zh-TW/models)複製。

## 安裝

從其[官方發布頁面][1]下載適用於 Windows、macOS
或 Linux 的 CC Switch。在 macOS 上使用 Homebrew，請以下列指令安裝：



[1]: https://github.com/farion1231/cc-switch/releases

```shell
brew install --cask cc-switch
```

安裝後開啟 CC Switch，並在應用程式切換器中選取 **Claude Code**。

## 設定 RunAPI

1.  選取 **Add Provider**，然後選擇 **Custom** 預設值。
2.  將提供者命名為 `RunAPI`，並在其設定編輯器中輸入您的 API 金鑰與 Base URL：

```json
{
  "env": {
    "ANTHROPIC_API_KEY": "YOUR_RUNAPI_API_KEY",
    "ANTHROPIC_BASE_URL": "https://runapi.ai"
  }
}
```

上方的 API 金鑰僅為占位符。請透過[身分驗證指南](https://runapi.ai/zh-TW/docs/guides/authentication.md)建立並輪換您的實際金鑰。

## 選擇模型

1.  僅使用 **Fetch Models** 探索候選模型。若模型未列出，請從[模型目錄](https://runapi.ai/zh-TW/models)複製其識別碼。擷取模型並不會將模型指派給 Claude Code 的請求角色。
2.  將選定的識別碼設為 **Default fallback model**，然後選取 **Quick Set**。這會將該識別碼套用至每個 **Actual Request Model** 列：Sonnet、Opus、Fable、Haiku 與 Subagent。
3.  儲存前，請確認每一列均顯示預期的 RunAPI 識別碼。CC Switch 會將此對應關係以 `ANTHROPIC_MODEL`、`ANTHROPIC_DEFAULT_SONNET_MODEL`、`ANTHROPIC_DEFAULT_OPUS_MODEL`、`ANTHROPIC_DEFAULT_FABLE_MODEL`、`ANTHROPIC_DEFAULT_HAIKU_MODEL` 及 `CLAUDE_CODE_SUBAGENT_MODEL` 的形式持久儲存。
4.  儲存提供者，在提供者清單中選取它，然後將其啟用。

## 驗證

在專案目錄中開啟新的終端機並啟動 Claude Code：

```shell
claude
```

執行 `/status` 以檢視目前使用的模型，然後傳送一段簡短提示，例如 `Describe this repository in one sentence.`。收到正常回應即確認 CC Switch 正在使用有效的 RunAPI 提供者。

## 疑難排解

* **身分驗證失敗：** 請確認 CC Switch Provider 中的 API 金鑰是否正確，若有需要，請從[身分驗證指南](https://runapi.ai/zh-TW/docs/guides/authentication.md)建立新的金鑰。
* **預期的模型無法使用：** 重新整理模型選擇器，或從[模型目錄](https://runapi.ai/zh-TW/models)複製受支援的模型識別碼，將其設為**預設備援模型**，然後再次選擇 **Quick Set**。
* **Claude Code 仍然使用其他 Provider：** 請在 CC Switch 中啟用 RunAPI Provider，然後開啟新的終端機工作階段。請查閱 CC Switch 的 [provider 說明文件][1]，以排查環境衝突問題。



[1]: https://github.com/farion1231/cc-switch/tree/main/docs/user-manual/en/2-providers

## 後續步驟

如需協定選擇與請求行為，請參閱 [LLM API 快速入門](https://runapi.ai/zh-TW/docs/guides/llm-api/quickstart.md)。如需請求與回應欄位，請參閱 [Anthropic Messages API 參考](https://runapi.ai/zh-TW/docs/api/anthropic/messages.md)。若要將 RunAPI 工具加入 Claude Code，請繼續閱讀 [MCP 概覽](https://runapi.ai/zh-TW/docs/resources/mcp.md)。

---

## RunAPI 的更多內容

- [首頁](https://runapi.ai/zh-TW/.md)
- [模型目錄](https://runapi.ai/zh-TW/models.md)
- [價格](https://runapi.ai/zh-TW/pricing.md)
- [提供商](https://runapi.ai/zh-TW/models)
- [文件](https://runapi.ai/zh-TW/docs/guides)
- [SDK](https://runapi.ai/zh-TW/sdk.md)
- [CLI](https://runapi.ai/zh-TW/cli.md)
- [MCP Server](https://runapi.ai/zh-TW/mcp.md)
- [Claude Code 與 Cursor](https://runapi.ai/zh-TW/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-TW/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-TW/openrouter-alternative.md)
- [企業版](https://runapi.ai/zh-TW/contact.md)
- [聯絡我們](https://runapi.ai/zh-TW/contact.md)
- [服務條款](https://runapi.ai/zh-TW/terms.md)
- [隱私權](https://runapi.ai/zh-TW/privacy.md)
- [代理程式網站索引](https://runapi.ai/llms.txt)

聯絡我們: contact@runapi.ai

## 結構化資料

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-TW/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-TWicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "TechArticle",
    "headline": "CC Switch",
    "description": "安裝 CC Switch，新增 RunAPI Claude Code Provider，選擇模型，並驗證連線。",
    "url": "https://runapi.ai/zh-TW/docs/resources/tool-integrations/cc-switch",
    "mainEntityOfPage": "https://runapi.ai/zh-TW/docs/resources/tool-integrations/cc-switch"
  }
]
```
