BazaarLinkBazaarLink
Đăng nhập
Tài liệuTham chiếu APITham chiếu SDKSử dụng AgentKỹ năng AI
Management Key

Liệt kê BYOK key

Liệt kê tất cả BYOK upstream key của tổ chức gọi. Xác thực cần Management API Key gắn với tổ chức đó; upstream key chỉ xuất hiện ở dạng che (keyMask) — giá trị đầy đủ không thể lấy lại sau khi tạo.

GET/api/v1/management/byok-keys

Xác thực

Authorizationbắt buộc
string · header

API key dưới dạng bearer token trong header Authorization.

GET /api/v1/management/byok-keys
curl https://bazaarlink.ai/api/v1/management/byok-keys \
  -H "Authorization: Bearer $BAZAARLINK_API_KEY"
Ví dụ phản hồi

Thành công. Mỗi phần tử của keys gồm khóa đã che, giao thức (openai/anthropic), chế độ dự phòng (seamless/strict), danh sách ánh xạ model (models), khóa nền tảng phạm vi (scopedApiKeyIds — mảng rỗng = áp dụng cho mọi khóa của tổ chức) và các trường sức khỏe (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": []
    }
  ]
}
Support
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
Liệt kê BYOK key — BazaarLink API