Platform API
Update KEY
Update the name, expiration time, quota, model/IP restrictions, and status of an existing KEY.
PUT
Update KEY
Request Parameters
Request Headers
Authentication for the request. This API uses the AIHubMix Manage Key for authentication.
The content type of the request. This parameter must be set to application/json.
Path Parameters
integer
required
KEY ID.
Request Body
string
The name of the new Key.
integer
Expiration time (UNIX timestamp), -1 means never expires.
boolean
Whether the quota is unlimited. true means unlimited; false means a quota is enabled (requires remain_quota).
integer
Remaining quota. remain_quota should be: desired quota * 500000 (for example, if the desired quota is 10, then pass 5000000). When unlimited_quota is true, it is recommended to pass -1.
integer
Key status. 0 means disabled, 1 means enabled.
text
Restrictions on the models that the current Key can use (empty or not provided means no restrictions).
text
IP restrictions (empty or not provided means no restrictions).
Response Parameters
boolean
Indicates whether the request was successful.
string
Detailed information on request failure. May be empty or not returned when the request is successful.
object
Last updated: 2026-06-01
Update KEY