Delete an AI API key
DELETE /aisix/admin/apikeys/{api_key_id}
DELETE /aisix/admin/apikeys/{api_key_id}Interactive request editor loads with JavaScript.
X-API-KEY<token>
In: header
Path Parameters
api_key_id*string
AI API Key ID.
Length
1 <= lengthQuery Parameters
ai_gateway_group_id*string
AI Gateway group ID (filter resources by group).
Length
1 <= lengthResponse Body
application/json
application/json
application/json
curl -X DELETE "$API_BASE_URL/aisix/admin/apikeys/apikey-abc123?ai_gateway_group_id=abc1234567890"Operation completed successfully with no response body.
""Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.
{
"value": {},
"error_msg": "error message"
}Not Found — The requested resource does not exist or has been deleted.
{
"value": {},
"error_msg": "error message"
}Complete operation details and schema variants
DELETE /aisix/admin/apikeys/{api_key_id}
Delete an AI API key
IAM Action: ai_gateway:DeleteAIAPIKey, Resource: arn:api7:ai_gateway:aigatewaygroup/%s
Deletes the specified AI API key configuration and removes it from etcd.
Parameters
ai_gateway_group_id(query, string, required): AI Gateway group ID (filter resources by group).api_key_id(path, string, required): AI API Key ID.
Responses
200: Operation completed successfully with no response body.400: Bad Request — The request was malformed or contained invalid parameters. Check the error_msg field for details.value(object, optional): The specific resource.error_msg(string, optional): The error message.404: Not Found — The requested resource does not exist or has been deleted. Response fields (application/json): identical toDELETE /aisix/admin/apikeys/{api_key_id}, response 400 above.
cURL
curl -X DELETE '$API_BASE_URL/aisix/admin/apikeys/{api_key_id}'