Public API

刪除 API Key

Management key required. 永久刪除模型 API Key,保留歷史用量。

URL 中的 api_key_id 就是建立模型 API Key(POST /public/v1/api-keys)回應中的 id,格式為 ak_...。 請儲存此值,以便停用、刪除、設定額度及查詢用量。回應中的 key(apikey-...)用於模型呼叫;管理操作的驗證標頭仍使用 mgmt-...。

DELETE
/public/v1/api-keys/{api_key_id}

Management key required. Use a Management API Key (mgmt-...) for your Team, created by a Team Owner. Requests use the Team associated with that key.

No request body. Soft-deletes the key, preserving its identity and usage history. A deleted key cannot be enabled or have its allowance changed. Repeating deletion of this Team's key returns 204; unknown or other-Team identifiers return 404. Follows existing gateway cache refresh behavior.

Authorization

ManagementKeyBearer
AuthorizationBearer <token>

Management key required. Send Authorization: Bearer mgmt-....

In: header

Path Parameters

api_key_id*string

The id returned by Create a model API key (POST /public/v1/api-keys). Copy the complete ak_... value into this path parameter. Use the mgmt-... management key in the authorization header; the returned key (apikey-...) is for model calls.

Match^ak_[0-9A-Za-z]{22}$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/public/v1/api-keys/ak_0123456789ABCDEFGHIJKL"
Empty

Last updated on