BazaarLinkBazaarLink
साइन इन
दस्तावेज़API संदर्भSDK संदर्भएजेंटिक उपयोगAI स्किल्स
विषय-सूची

प्रबंधन API कुंजी

प्रबंधन API कुंजी

प्रबंधन कुंजियाँ प्रोग्रामेटिक कुंजी प्रबंधन के लिए डिज़ाइन की गई हैं। वे मानक API कुंजियाँ बना सकते हैं, सूचीबद्ध कर सकते हैं, अद्यतन कर सकते हैं, अक्षम कर सकते हैं और हटा सकते हैं - लेकिन AI मॉडल कॉल नहीं कर सकते।

नोट
प्रबंधन कुंजियाँ AI मॉडल (chat/completions/messages/embeddings) को कॉल नहीं कर सकतीं। मॉडल एक्सेस के लिए मानक API कुंजी का उपयोग करें।

एक प्रबंधन कुंजी बनाना

पर जाएंप्रबंधन API कुंजी पृष्ठऔर "बनाएं" पर क्लिक करें - यह आपके मानक API कुंजियों से एक अलग पृष्ठ है, न कि उसी पृष्ठ पर एक प्रकार चयनकर्ता।

सूची कुंजियाँ

GET https://api.bazaarlink.ai/v1/keys
Authorization: Bearer sk-bl-YOUR_MGMT_KEY

# Response
{
"keys": [
  {
    "id": "clxyz123...",
    "name": "Production Key",
    "keyType": "standard",
    "keyPrefix": "sk-bl-abc1",
    "keySuffix": "XyZ9",
    "enabled": true,
    "spendLimitUsd": 10.00,
    "spendLimitPeriod": "month",
    "expiresAt": null,
    "createdAt": "2026-01-01T00:00:00.000Z",
    "lastUsed": "2026-03-01T12:34:56.000Z",
    "requestCount": 1234,
    "totalTokens": 5678901
  }
]
}

उप-कुंजी बनाएँ

POST https://api.bazaarlink.ai/v1/keys
Authorization: Bearer sk-bl-YOUR_MGMT_KEY
Content-Type: application/json

{
"name": "Agent Key",
"limit": 10.00,
"limit_reset": "monthly",
"expires_at": "2026-12-31T23:59:59Z"
}

# limit_reset: daily | weekly | monthly
# expires_at:  ISO 8601 datetime (optional)

# Response — save the key value, it won't be shown again
{
"id": "clxyz789...",
"name": "Agent Key",
"key": "sk-bl-xyz789abcdef...",
"keyType": "standard",
"spendLimitUsd": 10.00,
"spendLimitPeriod": "month",
"expiresAt": "2026-12-31T23:59:59.000Z",
"enabled": true,
"createdAt": "2026-03-01T00:00:00.000Z"
}

Update Key

PATCH https://api.bazaarlink.ai/v1/keys/:id
Authorization: Bearer sk-bl-YOUR_MGMT_KEY
Content-Type: application/json

{"enabled": false}              # disable key
{"spendLimitUsd": 5, "spendLimitPeriod": "week"}  # set spend limit
{"spendLimitUsd": null}         # remove spend limit
# Response: {"updated": true}

रिवोक कुंजी

DELETE https://api.bazaarlink.ai/v1/keys/:id
Authorization: Bearer sk-bl-YOUR_MGMT_KEY

# Returns 204 No Content on success

Query बैलेंस

GET https://api.bazaarlink.ai/v1/credits
Authorization: Bearer sk-bl-YOUR_MGMT_KEY

# Response
{
"data": {
  "total_credits": 12.345,
  "total_usage": 3.210
}
}

Query उपयोग

GET https://api.bazaarlink.ai/v1/usage?period=month
Authorization: Bearer sk-bl-YOUR_MGMT_KEY

# period: day | week | month | year
Support
Hi! How can we help you?
Send a message and we'll get back to you soon.
प्रबंधन API कुंजी | BazaarLink