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.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
string
API key identifier used in follow-up Management API calls.
string
Display name for the API key.
string
Non-secret key prefix for display and support.
string
One of
active, inactive, or revoked.number | null
Spending cap in USD as a JSON number for display.
null means unlimited.string | null
Exact spending cap in USD as a decimal string.
null means unlimited.number
Accumulated usage in USD as a JSON number for display.
string
Exact accumulated usage in USD as a decimal string.
string[]
Per-key model allowlist. Empty array means no additional key-level model restriction.
string | null
ISO timestamp when the key expires, or
null for no expiry.string | null
ISO timestamp for the most recent use, or
null when unused.string
ISO creation timestamp.