Documentation Index
Fetch the complete documentation index at: https://docs.aihubmix.com/llms.txt
Use this file to discover all available pages before exploring further.
概覽
為了滿足開發者運用 Anthropic API 生態系的需求,我們的 API 現已支援透過 Anthropic API 介面存取所有模型。支援 200+ LLM,其中包含 7 個免費模型。
快速開始
安裝 Anthropic SDK
API 用法
端點:https://aihubmix.com/v1/messages
相容性說明
支援的參數
透過 Anthropic API 整合時,支援下列輸入參數:| 參數 | 類型 | 必填 | 說明 |
|---|---|---|---|
model | string | 是 | 支援的模型可參見模型清單 |
messages | array of MessageParam | 是 | 輸入訊息 |
max_tokens | number | 否 | 生成的最大 token 數 |
stream | boolean | 否 | 啟用串流回應 |
system | string or array of TextBlockParam | 是 | 系統提示 |
temperature | number | 否 | 範圍:(0.0, 1.0]。控制輸出隨機性;建議值為 1 |
top_p | number | 否 | Nucleus sampling 參數 |
thinking | ThinkingConfigParam | 否 | 推理設定 |
支援的訊息類型
| 類型 | 說明 |
|---|---|
type="text" | 文字訊息 |
type="tool_use" | 工具呼叫 |
type="tool_result" | 工具呼叫結果 |
type="thinking" | 模型推理輸出 |
使用範例
在 Claude Code 中使用 GPT-5.2
雖然 AIHubMix 上的任何支援模型都可以透過此方式使用,但為了獲得最佳體驗,我們建議使用 gpt-5.2 或 glm-4.7 等高能力模型。1. 安裝並設定 Claude Code
請參考 Claude Code 安裝指南:https://docs.aihubmix.com/cn/api/Claude-Code2. 將 Claude Code 連接到 AIHubMix
Claude 設定檔:.claude/settings.json
AIHUBMIX_API_KEY 替換為您實際的 AIHubMix API key。
3. 開始對話
切換到您的專案目錄並啟動 Claude Code:4. 驗證
您可以在 Claude Code 中執行/status 指令來驗證連接狀態:
最後更新:2026-06-01