API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsDelete an AI API key

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.

Authorization

X-API-KEY<token>

In: header

Path Parameters

api_key_id*string

AI API Key ID.

Length1 <= length

Query Parameters

ai_gateway_group_id*string

AI Gateway group ID (filter resources by group).

Length1 <= length

Response 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.

""
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 to DELETE /aisix/admin/apikeys/{api_key_id}, response 400 above.

cURL

curl -X DELETE '$API_BASE_URL/aisix/admin/apikeys/{api_key_id}'