在相容 OpenAI 或 Anthropic API 的第三方工具中接入阿里雲百鍊。
快速開始
- 1
獲取 API Key
根據計費方案獲取 API Key:
- Token Plan 個人版:建立或查看 API Key
- Token Plan 團隊版:分配席位並取得 API Key
- 按量計費:百鍊 API Key
- Coding Plan:Coding Plan API Key
- 2
選擇協議和 Base URL
在工具的自定義模型設定中選擇協議,並填寫對應 Base URL。OpenAI 協議使用
compatible-mode/v1或/v1地址,Anthropic 協議使用/apps/anthropic地址。Token Plan
- OpenAI Base URL:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 - Anthropic Base URL:
https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic
按量計費
將
{WorkspaceId}替換為真實的 Workspace ID。- OpenAI Base URL:
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1 - Anthropic Base URL:
https://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/apps/anthropic
Coding Plan
- OpenAI Base URL:
https://coding-intl.dashscope.aliyuncs.com/v1 - Anthropic Base URL:
https://coding-intl.dashscope.aliyuncs.com/apps/anthropic
- OpenAI Base URL:
- 3
- 4
驗證
傳送一條測試訊息。收到模型回覆即表示接入成功。
不支援的工具型別
Token Plan 個人版、Token Plan 團隊版和 Coding Plan 僅限在 AI 程式設計工具和 OpenClaw 型別 Agent 中使用,以下型別的工具不支援接入:
- 工作流/自動化平臺:如 Dify、n8n、Coze 等。
- API 測試工具:如 Postman、Insomnia 等。
- 自定義應用程式:直接在自動化指令碼、應用後端程式碼中呼叫 API 等。
將套餐 API Key 用於允許範圍之外的呼叫可能被視為違規或濫用,導致訂閱暫停或 API Key 被封禁。