API7 Docs
API7 GatewayAPI7 Enterprise Admin APIsDelete an AI model

Delete an AI model

DELETE /aisix/admin/models/{model_id}

DELETE /aisix/admin/models/{model_id}

Interactive request editor loads with JavaScript.

Authorization

X-API-KEY<token>

In: header

Path Parameters

model_id*string

AI Model 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/models/model-abc123?ai_gateway_group_id=abc1234567890"

Operation completed successfully with no response body.

""
Complete operation details and schema variants

DELETE /aisix/admin/models/{model_id}

Delete an AI model

IAM Action: ai_gateway:DeleteAIModel, Resource: arn:api7:ai_gateway:aigatewaygroup/%s Deletes the specified AI model configuration and removes it from etcd.

Parameters

  • ai_gateway_group_id (query, string, required): AI Gateway group ID (filter resources by group).
  • model_id (path, string, required): AI Model 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/models/{model_id}, response 400 above.

cURL

curl -X DELETE '$API_BASE_URL/aisix/admin/models/{model_id}'