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