Skip to main content
PATCH
Update an API key

Authorizations

Authorization
string
header
required

A management key (created from the organization dashboard or with POST /v3/manage/auth-keys), sent as Authorization: Bearer <management_key>. Inference API keys (sk-eden...) are not accepted on these endpoints.

Path Parameters

key_id
string<uuid>
required

Body

Editable API key fields: the display name and the spending controls. All fields are optional; only the fields you send are changed. The environment (token_type) cannot be changed: create a new key instead. Renaming to a name already used by one of the owner's active keys returns 409.

name
string

The token name

Required string length: 1 - 200
active_balance
boolean

Weither to use the balance field or not.

balance
string<decimal> | null

Optional remaining credits balance for this Token, if active_balance is set to True and the balance reaches 0, this token will become unusable

Pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
balance_reset_amount
string<decimal> | null

The amount this token's balance is reset to at the start of each balance_reset_period. Null when balance_reset_period is 'none'.

Pattern: ^-?\d{0,5}(?:\.\d{0,9})?$
balance_reset_period
enum<string>

How often this token's balance is reinitialized to balance_reset_amount. 'none' = one-time balance (default, current behaviour).

  • none - None
  • daily - Daily
  • weekly - Weekly
  • monthly - Monthly
Available options:
none,
daily,
weekly,
monthly

Response

200 - application/json

An API key belonging to the organization. The secret is never included: masked shows the key prefix and last characters for identification, and id is the stable identifier used in /manage/keys/{key_id} URLs.

balance is the remaining spendable amount, including usage not yet settled, or null when the key has no spending cap. Revoked keys stay listed with revoked: true and a revoked_at timestamp. id is null for a legacy key that has not been regenerated yet; such a key is listed but cannot be addressed by URL until it is regenerated.

id
string<uuid> | null
required
read-only
name
string
required

The token name

Maximum string length: 200
member
string<email>
required
read-only
masked
string
required
read-only
balance
number<double> | null
required
read-only
Required range: -100000 < x < 100000
revoked
boolean
required
read-only
token_type
enum<string>
  • sandbox_api_token - Sandbox
  • api_token - Back
Available options:
sandbox_api_token,
api_token
active_balance
boolean

Weither to use the balance field or not.

expire_time
string<date-time> | null
revoked_at
string<date-time> | null