Update an API key
API Keys
Update API Key
Update API key metadata and status.
PATCH
Update an API key
This endpoint requires a management API key. Standard Gateway API keys are not accepted.
limit and limit_reset.Authorizations
Bearer token authentication
Path Parameters
API key identifier or hash.
Body
application/json
Minimum string length:
1Example:
"[\"chat.completions\",\"responses\"]"
Optional spend limit in USD for this key. Set null to clear.
Required range:
x >= 0Period used for the spend limit window.
Available options:
daily, weekly, monthly Accepted for compatibility. Current AI Stats behavior always excludes BYOK from this limit field.
Response
Updated API key metadata
Last modified on May 19, 2026