BazaarLinkBazaarLink
登入
文件API 參考SDK 參考Agent 應用AI Skills
管理金鑰

列出 BYOK 金鑰

列出呼叫方組織的全部 BYOK 上游金鑰。認證必須用綁定該組織的管理金鑰(Management API Key);回應中的上游金鑰只以遮蔽形式(keyMask)出現,完整明文建立後即不可再取得。

GET/api/v1/management/byok-keys

驗證

Authorization必填
string · header

在 Authorization 標頭以 Bearer token 傳入 API 金鑰。

GET /api/v1/management/byok-keys
curl https://bazaarlink.ai/api/v1/management/byok-keys \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY"
回應範例

成功。keys 陣列的每個元素含遮蔽金鑰、協定(openai/anthropic)、回退模式(seamless/strict)、模型對應清單(models)、範圍金鑰(scopedApiKeyIds,空陣列=全組織金鑰適用)與健康欄位(lastVerifiedAt/lastErrorAt/errorCount1h)。

{
  "keys": [
    {
      "id": "byok_abc123",
      "ownerType": "org",
      "userId": null,
      "organizationId": "org_abc123",
      "name": "team-upstream",
      "baseUrl": "https://api.example-upstream.com/v1",
      "keyMask": "sk-abc…wxyz",
      "protocol": "openai",
      "enabled": true,
      "fallbackMode": "seamless",
      "modelsStale": false,
      "lastVerifiedAt": "2026-07-29T00:00:00.000Z",
      "lastErrorAt": null,
      "lastErrorCode": null,
      "errorCount1h": 0,
      "createdAt": "2026-07-29T00:00:00.000Z",
      "updatedAt": "2026-07-29T00:00:00.000Z",
      "models": [
        {
          "canonicalId": "openai/gpt-4o",
          "upstreamModelId": "gpt-4o",
          "enabled": true
        }
      ],
      "scopedApiKeyIds": []
    }
  ]
}
客服
客服
您好!有什麼可以協助?
請留下訊息,我們會盡快回覆。
列出 BYOK 金鑰 — BazaarLink API