Overview
Use this endpoint to update the name, usage limit, allowed models, expiry, or status of an existing user API key.Request Body
At least one field must be provided.| Field | Type | Default / Limits | Notes |
|---|---|---|---|
status | enum | - | active, inactive, revoked |
name | string | length 1-50 | Updated display name |
limitAmount | number | null | min 0, input max 1000000 | null = unlimited, 0 = zero quota. Positive values are normalized to a stored cap that cannot exceed 100000 USD equivalent. |
limitCurrency | enum | default USD | USD only. Sending CNY returns 400 currency_retired. |
models | string[] | - | Updated model allowlist |
expiresAt | string | null | RFC3339 datetime | null clears the expiry |
Notes
-
Monetary fields are USD-only.
CNYinputs are retired and return400 currency_retired. - Hard delete is intentionally not supported in Management API v1.
-
revokedis terminal for ordinary operational use; create a new key instead of expecting a future un-revoke flow.
Example
Request / Response
Use the interactive OpenAPI panel above for the exact schema and response fields.Response example
Important fields
API key identifier used in follow-up Management API calls.
Display name for the API key.
Non-secret key prefix for display and support.
One of
active, inactive, or revoked.Spending cap in USD as a JSON number for display.
null means unlimited.Exact spending cap in USD as a decimal string.
null means unlimited.Accumulated usage in USD as a JSON number for display.
Exact accumulated usage in USD as a decimal string.
Per-key model allowlist. Empty array means no additional key-level model restriction.
ISO timestamp when the key expires, or
null for no expiry.ISO timestamp for the most recent use, or
null when unused.ISO creation timestamp.