Deletes a specified model deployment.
Prerequisites
-
You have read Introduction to Model Deployment and Model Deployment via API and understand the basic steps for model deployment on the Alibaba Cloud Model Studio platform.
-
You have an API key for Model Studio. For more information, see Get API Key.
Delete a model deployment
Endpoint
DELETE https://dashscope-intl.aliyuncs.com/api/v1/deployments/{deployed_model}
Request example
Use the following command to delete a deployment.
curl --request DELETE "https://dashscope-intl.aliyuncs.com/api/v1/deployments/emo-35b3f106-sample01" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
|
deployed_model |
String |
path |
Yes |
The unique identifier for the model deployment. You can obtain this ID from the response of the Create Deployment or List Deployments calls. |
Response example
A successful request returns the following response:
{
"request_id": "5378b78b-8564-481f-a3e0-580e551df22c",
"output": {
"deployed_model": "emo-35b3f106-sample01",
"gmt_create": "2025-06-17T11:00:38",
"gmt_modified": "2025-06-17T11:42:02",
"status": "DELETING",
"model_name": "emo",
"base_model": "emo",
"base_capacity": 1,
"capacity": 2,
"ready_capacity": 1,
"workspace_id": "llm-v71tlv3***",
"charge_type": "post_paid",
"creator": "175805416***",
"modifier": "175805416***"
}
}
Response parameters
See the response parameters in Create a model deployment.
Error responses
Response example
{
"request_id": "ca218d57-b91b-46b2-bd35-c41c6287bcf4",
"message": "Model: qwen-plus-20230703-cx7f not found!",
"code": "NotFound"
}
Response parameters
|
Field |
Type |
Description |
|
request_id |
String |
The unique identifier for the request. |
|
code |
String |
The error code. |
|
message |
String |
The error message. |
If a request fails, it may return one of the following errors:
|
Error code |
Error message |
Cause |
|
NotFound |
Model: xxx not found! |
|
|
Conflict |
Deployed model xxx already exists, please specify a suffix. |
A deployment with the specified suffix already exists. |
|
InvalidParameter |
Invalid capacity (xx), capacity must be larger than or equal to 0 and multiples of 1 and less than 1000! |
The value specified for the capacity parameter is invalid. |