OpenAI / Anthropic compatible — connect Claude Code, Codex, Cline and other mainstream Agent tools in minutes.兼容 OpenAI / Anthropic 協議,幾分鐘即可接入 Claude Code、Codex、Cline 等主流 Agent 工具。
env field of ~/.claude/settings.json so they apply globally across all projects. On Windows the path is C:\Users\<username>\.claude\settings.json.Claude Code 是 Anthropic 官方 CLI 編程助手,將 Claude 模型整合到終端中,可直接讀寫程式碼檔案、執行命令與 Git 操作,是目前最主流的終端 AI 編程工具之一。推薦寫入 ~/.claude/settings.json 的 env 欄位,所有專案全域生效。Windows 路徑為 C:\Users\<使用者名稱>\.claude\settings.json。
hasCompletedOnboarding in ~/.claude.json to true to skip Anthropic's official login flow.claude, and use /status to confirm the endpoint points to TokenClub.① Base URL 末尾不要加斜線,否則拼接路徑會出現雙斜線導致報錯。~/.claude.json 的 hasCompletedOnboarding 設為 true,以跳過 Anthropic 官方登入引導。claude,並可用 /status 確認位址已指向 TokenClub。
~/.claude.json and set hasCompletedOnboarding to true, then confirm the Base URL in /status points to TokenClub. Open a new terminal after editing.未跳過官方登入引導。編輯 ~/.claude.json,將 hasCompletedOnboarding 設為 true;並確認 /status 中 Base URL 已指向 TokenClub。修改後需新開終端。https://api.tokenclub.cc (no trailing /).Base URL 末尾多了斜線。請改為 https://api.tokenclub.cc(結尾無 /)。thinking field in the response. Disable thinking mode in the group / model settings, or switch to a model that doesn't force thinking.部分模型預設開啟思考模式,要求回傳 thinking 欄位。可在分組 / 模型設定中關閉思考模式,或改用未強制思考的模型。~/.codex/config.toml, add a provider entry, and set it as the default. The token is supplied via the environment variable named in env_key.Codex CLI 是 OpenAI 開源的命令列 AI 編程助手,可在終端中透過自然語言產生程式碼、修復 bug、建構專案。編輯 ~/.codex/config.toml,新增一個 provider 節點並設為預設。令牌透過 env_key 指定的環境變數提供。
export TOKENCLUB_API_KEY=your-token.wire_api to "chat".model_provider / base_url must live in the user-level config (~/.codex/config.toml); placing them in a project-level .codex/config.toml is ignored.① 啟動前設定環境變數:export TOKENCLUB_API_KEY=你的令牌。wire_api 改為 "chat"。model_provider / base_url 等鍵必須放在使用者級設定(~/.codex/config.toml),放在專案級 .codex/config.toml 會被忽略。
wire_api from "responses" to "chat".該模型或分組未啟用 Responses 協議轉換。將 wire_api 由 "responses" 改為 "chat" 即可。~/.codex/config.toml; these keys in a project-level .codex/config.toml are ignored.provider 與 base_url 必須寫在使用者級 ~/.codex/config.toml,專案級 .codex/config.toml 中的這些鍵會被忽略。~/.config/opencode/settings.json or configuring interactively with the /connect command.OpenCode 是一個開源的終端 AI 編程代理(GitHub 3 萬+ 星標),支援 Claude、GPT-4、Gemini 等多種模型,讓你在終端中用自然語言寫程式碼、修 Bug。使用 Anthropic 相容協議,推薦寫入 ~/.config/opencode/settings.json 或使用 /connect 命令互動式設定。
hasCompletedOnboarding to true to skip Anthropic's official login flow.hasCompletedOnboarding 為 true,跳過 Anthropic 官方登入引導。~/.opencode.json (or a similar path), set hasCompletedOnboarding to true, and confirm the Base URL points to TokenClub. Open a new terminal afterward.編輯 ~/.opencode.json(或類似路徑),將 hasCompletedOnboarding 設為 true,並確認 Base URL 已指向 TokenClub。設定後新開終端。~/.openclaw/config.json; connecting via the native Anthropic format unlocks full features like Prompt Caching and Extended Thinking.OpenClaw 是一個開源的個人 AI 智慧體閘道,支援 Anthropic Messages API 與 OpenAI Completions API 雙協議,可在本地統一管理多個模型供應商、編排工具鏈。推薦使用 ~/.openclaw/config.json 設定自訂 provider,以 Anthropic 原生格式接入可獲得 Prompt Caching 與 Extended Thinking 等完整功能。
api to "openai-completions" and append /v1 to the Base URL (note: Prompt Caching and Extended Thinking are unavailable in this mode):如使用 OpenAI 相容格式,將 api 改為 "openai-completions",Base URL 末尾加 /v1(注意:該模式下 Prompt Caching 與 Extended Thinking 不可用):/v1 to the Base URL, and include the anthropic-version request header.api can be "anthropic-messages" (recommended, supports Prompt Caching) or "openai-completions" (no /v1 restriction).openclaw gateway restart to apply it, and verify with openclaw models list.id must match the name in the console model marketplace.① Anthropic 原生格式 Base URL不要加 /v1,並需攜帶 anthropic-version 請求標頭。api 可選 "anthropic-messages"(推薦,支援 Prompt Caching)或 "openai-completions"(無 /v1 限制)。openclaw gateway restart 使其生效,可用 openclaw models list 驗證。id 需與控制台模型廣場中的名稱一致。
"api": "anthropic-messages" for Prompt Caching (lowering long-conversation cost) and Extended Thinking. Use "openai-completions" only when calling non-Claude models.推薦 "api": "anthropic-messages",可獲得 Prompt Caching(降低長對話成本)和 Extended Thinking 能力。僅調用非 Claude 模型時用 "openai-completions"。openclaw gateway restart to restart the gateway, then openclaw models list to check. Confirm the provider name matches the prefix in agents.defaults.model.primary.執行 openclaw gateway restart 重啟閘道,然後 openclaw models list 查看。確認 provider 名稱與 agents.defaults.model.primary 中的前綴一致。"api": "anthropic-messages", do not add /v1 (use https://api.tokenclub.cc). With "api": "openai-completions", you need /v1 (use https://api.tokenclub.cc/v1)."api": "anthropic-messages" 時不加 /v1(填 https://api.tokenclub.cc)。"api": "openai-completions" 時需要 /v1(填 https://api.tokenclub.cc/v1)。~/.workbuddy/models.json to configure custom models, and the URL must end with /v1/chat/completions.WorkBuddy 是騰訊推出的 AI 桌面智慧體工作台,使用者可用自然語言下達任務,讓它自主完成檔案處理、文檔產生等辦公操作。它使用 ~/.workbuddy/models.json 設定自訂模型,URL 必須以 /v1/chat/completions 結尾。
id must exactly match the model name in the console model marketplace (case-sensitive).supportsToolCall must be true.① 設定完成後需完全退出並重啟 WorkBuddy(Windows 從系統匣退出,macOS 右鍵 Dock 圖示退出),否則設定不生效。id 必須與控制台模型廣場中的模型名完全一致(區分大小寫)。supportsToolCall 必須為 true。
supportsToolCall must be set to true, and the model itself must support function calling.supportsToolCall 必須設為 true,且使用的模型本身需支援函式調用能力。id field doesn't match the actual server-side model name. Confirm the exact model name in the console model marketplace (including hyphens and casing).id 欄位值與伺服端實際模型名不一致。請確認控制台模型廣場中的準確模型名稱(含連字號和大小寫)。models.json. Install: npm install -g @tencent-ai/codebuddy-code.CodeBuddy 是騰訊雲 AI 編程助手,業界首個同時支援外掛(VS Code/JetBrains)、獨立 IDE 和 CLI 三種形態,深度融合 DeepSeek/混元等大模型。透過 models.json 可接入 OpenAI 相容介面。安裝:npm install -g @tencent-ai/codebuddy-code。
npm install -g @tencent-ai/codebuddy-code, then start it with codebuddy. On first use you'll choose a login method (International / China / Enterprise).執行 npm install -g @tencent-ai/codebuddy-code,安裝後 codebuddy 啟動。首次使用需選擇登入方式(國際站 / 中國站 / 企業版)。/v1/chat/completions, based on the OpenAI-compatible format.必須以 /v1/chat/completions 結尾,基於 OpenAI 相容格式。Settings → Models打開 Cursor → Settings → ModelsOpenAI API Key field在 OpenAI API Key 欄粘貼你的令牌Override OpenAI Base URL and enter https://api.tokenclub.cc/v1展開 Override OpenAI Base URL,填入 https://api.tokenclub.cc/v1/chat/completions to the Base URL — Cursor appends it automatically./chat/completions,Cursor 會自動拼接。https://api.tokenclub.cc/v1 (with /v1). Don't add /chat/completions.需要。填入 https://api.tokenclub.cc/v1(帶 /v1)。不要加 /chat/completions。Settings → Models → Add model打開 Trae → Settings → Models → 添加模型OpenAI服務商選擇 OpenAICustom Model模型選擇 自訂模型 (Custom Model)deepseek-chat)Model ID填寫模型名(如 deepseek-chat)https://api.tokenclub.cc/v1Base URL填寫 https://api.tokenclub.cc/v1https://api.tokenclub.cc/v1.https://api.tokenclub.cc (no /v1).① Base URL 必須填寫完整路徑,不能只填網域。OpenAI 相容填 https://api.tokenclub.cc/v1。https://api.tokenclub.cc(無 /v1)。
https://api.tokenclub.cc/v1; for Anthropic-compatible use https://api.tokenclub.cc.Trae 要求 Base URL 為完整介面路徑。OpenAI 相容填 https://api.tokenclub.cc/v1,Anthropic 相容填 https://api.tokenclub.cc。OpenAI CompatibleAPI Provider 選擇 OpenAI Compatiblehttps://api.tokenclub.cc/v1Base URL 填 https://api.tokenclub.cc/v1deepseek-chat)Model ID 填你要使用的具體模型名(如 deepseek-chat)OpenAI Compatible — don't pick Anthropic or the official OpenAI provider.選擇 OpenAI Compatible(OpenAI 相容),不要選 Anthropic 或官方 OpenAI。/v1, i.e. https://api.tokenclub.cc/v1.OpenAI 相容介面需帶 /v1,即 https://api.tokenclub.cc/v1。https://api.tokenclub.cc/v1 (with /v1). The Anthropic SDK uses https://api.tokenclub.cc (without).OpenAI SDK 使用 https://api.tokenclub.cc/v1(帶 /v1)。Anthropic SDK 使用 https://api.tokenclub.cc(不帶)。api_key; for raw HTTP requests, use the Authorization: Bearer your-token header.SDK 傳 api_key 即可;裸 HTTP 請求用 Authorization: Bearer 你的令牌 標頭。| Status狀態碼 | Meaning含義 | Cause & solution原因與解決 |
|---|---|---|
| 400 | Bad format格式錯誤 | The request body is malformed. Fix the body format and fields per the error message.請求體格式有誤。按錯誤資訊修正請求體格式與欄位。 |
| 401 | Auth failed認證失敗 | Token is wrong, expired, or lacks permission. Check and update your API token.令牌錯誤、過期或無權限。檢查並更新 API 令牌。 |
| 402 | Insufficient balance餘額不足 | Account balance is too low. Contact TokenClub for a redemption code to top up.帳戶餘額不足。請聯絡 TokenClub 獲取兌換碼充值。 |
| 422 | Parameter error參數錯誤 | Invalid request body parameters. Fix the relevant parameters per the error message.請求體參數不合法。按錯誤資訊修正相關參數。 |
| 429 | Rate limit reached請求達到上限 | Request rate (RPM/TPM) exceeded. Lower your request frequency or retry later.請求速率(RPM/TPM)超限。降低請求頻率或稍後重試。 |
| 500 | Server error伺服器故障 | Internal service error. Retry later; if it persists, contact support.服務內部錯誤。稍後重試,持續出現請聯絡客服。 |
| 503 | Server busy伺服器繁忙 | Load is too high to process right now. Please retry later.負載過高,暫時無法處理。請稍後重試。 |
429. Keep concurrency and request frequency reasonable; under heavy load a single request may respond with slight delay, which is normal.超過速率上限會返回 429。請合理控制並發與請求頻率;高負載時單次請求回應可能稍有延遲,屬正常現象。