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, max 100000 | null = unlimited, 0 = zero quota, positive = USD cap |
limitCurrency | enum | default USD | Optional: USD or CNY. When set to CNY, limitAmount is treated as RMB and converted to USD server-side before storage |
models | string[] | - | Updated logical model allowlist |
expiresAt | string | null | RFC3339 datetime | null clears the expiry |
Notes
- 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.- The response includes
exchange_rate, plus RMB display companionslimit_amount_cnyandused_amount_cny. - By default,
limitAmountis interpreted as USD. SetlimitCurrency: "CNY"to submit an RMB cap that will be converted to USD using the current exchange rate before storage.