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

取得單一 BYOK 金鑰

以 id 取得組織的單一 BYOK 金鑰,含模型對應清單與健康欄位。上游金鑰僅以遮蔽形式(keyMask)出現。

GET/api/v1/management/byok-keys/:id

驗證

Authorization必填
string · header

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

路徑參數

id必填
string

BYOK 金鑰 id(建立或列出時取得)。

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

成功,回傳 { key }。

{
  "key": {
    "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