Skip to main content
PATCH
/api/v1/api_keys

التفويضات

Authorization
string
header
مطلوب

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

الجسم

application/json

The request body for updating an existing API key. The description, expiration date, consumption limits, limit period (epoch / month / lifetime), and model privacy can be updated.

id
string
مطلوب

The API Key ID to update

مثال:

"e28e82dc-9df2-4b47-b726-d0a222ef2ab5"

consumptionLimit
object

The API Key consumption limits, evaluated against the window selected by limitPeriod.

مثال:
limitPeriod
enum<string>

Reset window the consumption limits apply to. EPOCH resets every UTC day (legacy default). MONTH resets on the 1st of each UTC calendar month. LIFETIME never resets, so the limit acts as a permanent cap on the key.

الخيارات المتاحة:
EPOCH,
MONTH,
LIFETIME
مثال:

"MONTH"

modelPrivacy
enum<string>

Which models this key may call, by privacy tier. ALL allows every model. PRIVATE_TEXT requires text and embedding models to be Private, TEE, or E2EE while other modalities may be Anonymous or Private. PRIVATE_ONLY requires every model to be Private, TEE, or E2EE; Anonymous models are rejected.

الخيارات المتاحة:
ALL,
PRIVATE_TEXT,
PRIVATE_ONLY
مثال:

"ALL"

description
string

The API Key description (max 64 characters)

Maximum string length: 64
مثال:

"Updated API Key Name"

expiresAt

The API Key expiration date. Set to empty string or null to remove expiration.

الخيارات المتاحة:
مثال:

"2023-10-01T12:00:00.000Z"

الاستجابة

OK

data
object
مطلوب
success
boolean
مطلوب