Model deployment management API, applicable to all model types including text, image, video, and speech. Supports querying deployment status and list, modifying throttling, scaling, and deleting deployments.
Prerequisites
-
Supported region: The features described in this document are only available in the China (Beijing) region, and you must use the API Key from that region.
-
You have successfully obtained an API Key and configured it as an environment variable.
-
You have read Model deployment and Deploy models using the API to understand the basic steps of model deployment.
Get model deployment status
Query the details and running status of a specified model deployment. You can poll this API; when the status becomes RUNNING, it indicates that the model has been deployed successfully.
Model deployment is expected to take 5 to 10 minutes.
Endpoint
GET https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}
Request example
Sample request:
curl "https://dashscope.aliyuncs.com/api/v1/deployments/qwen-plus-202305099980-fac9-sample" \
--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. Returned by Create deployment or List deployments. |
Response example
Pay attention to the status field. When the status becomes RUNNING, the model has been deployed successfully and is ready for invocation.
{
"request_id": "66a855f0-a6fe-4b05-9786-fb30c7c6782d",
"output": {
"deployed_model": "emo-35b3f106-sample01",
"gmt_create": "2025-06-17T11:00:38",
"gmt_modified": "2025-06-17T11:06:13",
"status": "RUNNING",
"model_name": "emo",
"base_model": "emo",
"base_capacity": 1,
"capacity": 1,
"ready_capacity": 1,
"workspace_id": "llm-v71tlv3***",
"charge_type": "post_paid",
"creator": "175805416***",
"modifier": "175805416***"
}
}
Response parameters
|
Field |
Type |
Description |
|
request_id |
String |
Unique identifier for the request. |
|
output |
Object |
Job details. |
|
output.deployed_model |
String |
Unique identifier of the model deployment. Used to query deployment status and invoke the model. |
|
output.model_name |
String |
Model identifier name. |
|
output.base_model |
String |
The base model used. |
|
output.status |
String |
Deployment status:
|
|
output.base_capacity |
Number |
Base resource unit count. |
|
output.capacity |
Number |
Current resource unit count. |
|
output.ready_capacity |
Number |
Number of ready resource units. |
|
output.workspace_id |
String |
The workspace ID associated with the Alibaba Cloud Model Studio API Key. See Get the Workspace ID. |
|
output.charge_type |
String |
Billing mode. post_paid indicates pay-as-you-go. |
|
output.gmt_create |
String |
Deployment creation time. |
|
output.gmt_modified |
String |
Deployment last modified time. |
|
output.creator |
String |
Alibaba Cloud account ID of the creator. |
|
output.modifier |
String |
Alibaba Cloud account ID of the modifier. |
|
output.plan |
String |
Deployment plan. |
List deployable models
Get the list of eligible candidate models for deployment on the Model Studio platform, i.e., which models can be used to create deployments.
Endpoint
GET https://dashscope.aliyuncs.com/api/v1/deployments/models
Request example
Use the following command to query models available for deployment. We recommend using version=v1.0 to get a complete response including deployment plans and template information.
curl "https://dashscope.aliyuncs.com/api/v1/deployments/models?page_no=1&page_size=100&version=v1.0&model_source=base" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'
Query user fine-tuned models:
curl "https://dashscope.aliyuncs.com/api/v1/deployments/models?page_no=1&page_size=100&version=v1.0&model_source=custom" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json'
Request parameters
|
Parameter |
Type |
Required |
Description |
|
page_no |
Number |
No |
Page number. Default value: 1. |
|
page_size |
Number |
No |
Page size. Default value: 50. Maximum value: 100. Minimum value: 1. |
|
model_source |
String |
No |
Model source. |
|
version |
String |
No |
API version. We recommend using |
Response example
After the command is executed, the following result is returned:
{
"request_id": "f7da015c-ea90-4d96-af89-2f8d7604026a",
"output": {
"page_no": 1,
"page_size": 100,
"total": 5,
"models": [
{
"model_name": "qwen3-8b",
"plans": [
{
"plan": "mu",
"templates": [
{
"template_id": "MU1",
"template_name": "Single-node deployment - Standard inference",
"template_type": "COUPLED",
"template_version": "v1",
"template_desc": "Suitable for standard inference scenarios",
"roles": {
"unified": {
"model_unit_spec": "MU1",
"capacity_unit_per_instance": 4
}
}
},
{
"template_id": "MU1-PD",
"template_name": "PD-separated deployment - Standard inference",
"template_type": "SEPERATED",
"template_version": "v1",
"template_desc": "Suitable for PD-separated inference scenarios",
"roles": {
"prefill": {
"model_unit_spec": "MU1",
"capacity_unit_per_instance": 4
},
"decode": {
"model_unit_spec": "MU1",
"capacity_unit_per_instance": 4
}
}
}
]
},
{
"plan": "lora"
}
]
}
]
}
}
Response parameters
|
Parameter |
Type |
Description |
|
models |
Array |
List of deployable models. |
|
models[].model_name |
String |
Model name. |
|
models[].plans |
Array |
List of deployment plans supported by the model. Returned when |
|
models[].plans[].plan |
String |
Deployment plan type: |
|
models[].plans[].templates |
Array |
List of deployment templates (returned when |
|
models[].plans[].templates[].template_id |
String |
Template ID, passed as the |
|
models[].plans[].templates[].template_name |
String |
Template display name. |
|
models[].plans[].templates[].template_type |
String |
Template type: |
|
models[].plans[].templates[].template_version |
String |
Template version. |
|
models[].plans[].templates[].template_desc |
String |
Template description. |
|
models[].plans[].templates[].roles |
Object |
Node role configuration. COUPLED mode contains a |
|
models[].plans[].templates[].roles.{role}.model_unit_spec |
String |
Model unit specification. |
|
models[].plans[].templates[].roles.{role}.capacity_unit_per_instance |
Number |
Number of capacity units per instance, i.e., base_capacity. When creating a deployment, |
|
page_no |
Number |
Query page number. |
|
page_size |
Number |
Query page size. |
|
total |
Long |
Total number of models matching the query conditions. |
List deployed models
Get the list of deployed instances, i.e., the model services that are actually running or have been deployed in the current workspace.
Endpoint
GET https://dashscope.aliyuncs.com/api/v1/deployments
Request example
Run the following command to obtain the list of dedicated services:
curl "https://dashscope.aliyuncs.com/api/v1/deployments?page_no=1&page_size=100" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
|
page_no |
Number |
query |
No |
Page number. Default: 1. |
|
page_size |
Number |
query |
No |
Page size. Default: 50. Maximum: 200. Minimum: 1. |
Response example
Sample response:
{
"request_id": "7efdd3a7-a90d-96c6-b477-70055d59edf7",
"output": {
"page_no": 1,
"page_size": 10,
"total": 1,
"deployments": [
{
"deployed_model": "emo-35b3f106-sample01",
"gmt_create": "2025-06-17T11:00:38",
"gmt_modified": "2025-06-17T11:06:13",
"status": "RUNNING",
"model_name": "emo",
"base_model": "emo",
"base_capacity": 1,
"capacity": 1,
"ready_capacity": 1,
"workspace_id": "llm-v71tlv3d***",
"charge_type": "post_paid",
"creator": "175805416***",
"modifier": "175805416***"
}
]
}
}
Response parameters
|
Field |
Type |
Description |
|
request_id |
String |
Unique identifier for the request. |
|
output.page_no |
Number |
Current page number. |
|
output.page_size |
Number |
Number of items per page. |
|
output.total |
Number |
Total number of deployments. |
|
output.deployments |
Array |
List of model deployments. Each element has the same fields as the output of Get a model deployment. |
Modify deployment throttling
Modify the RPM (Requests Per Minute) and TPM (Tokens Per Minute) throttling settings for a specified model deployment.
Only some models deployed by using model units support modifying RPM and TPM settings.
Endpoint
PUT https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}/update
Request example
Run the following command to modify the throttling settings of a specified deployment:
curl -X PUT "https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}/update" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"rpm_limit": 1000,
"tpm_limit": 200
}'
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
|
deployed_model |
String |
path |
Yes |
The unique identifier for the model deployment. You can obtain it from Create deployment or the List deployments operation. |
|
rpm_limit |
Number |
body |
At least one parameter |
Requests per minute (RPM). |
|
tpm_limit |
Number |
body |
Tokens per minute (TPM). |
Response example
Sample response:
{
"request_id": "1d121fd9-876c-40ad-bc40-a9e68ef3b986",
"output":
{
"deployed_model": "qwen-plus-2025-12-01-b6d61c71",
"gmt_create": "2026-01-07T13:52:44",
"gmt_modified": "2026-01-07T14:01:41",
"status": "PENDING",
"model_name": "qwen-plus-2025-12-01",
"base_model": "qwen-plus-2025-12-01",
"base_capacity": 4,
"capacity": 4,
"ready_capacity": 0,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"creator": "16542902******",
"modifier": "16542902********",
"plan": "mu",
"model_unit_spec": "MU1",
"enable_thinking": true,
"max_context_length": 1,
"rpm_limit": 1000,
"tpm_limit": 200
}
}
Response parameters
In addition to the base fields listed in Get a model deployment, the response may also include the following fields:
|
Field |
Type |
Description |
|
output.plan |
String |
Deployment plan. |
|
output.model_unit_spec |
String |
Model unit deployment template, such as MU1. |
|
output.enable_thinking |
Boolean |
Whether thinking mode is enabled. |
|
output.max_context_length |
Number |
Maximum context length. |
|
output.rpm_limit |
Number |
Requests per minute limit. |
|
output.tpm_limit |
Number |
Tokens per minute limit. |
Scale a deployment
Adjust the number of resource units used by a dedicated service by performing an update operation.
Endpoint
PUT https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}/scale
Request example
Run the following command to scale a specified service:
curl --request PUT "https://dashscope.aliyuncs.com/api/v1/deployments/emo-35b3f106-sample01/scale" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"capacity":2
}'
Request parameters
|
Parameter |
Type |
Location |
Required |
Description |
|
|
deployed_model |
String |
path |
Yes |
The unique identifier for the model deployment. You can obtain it from Create deployment or the List deployments operation. |
|
|
capacity |
Number |
body |
Conditionally required |
Only available when For more information, see feature support for model unit deployment. |
The resource units used by the model after the update. Must be an integer multiple of |
|
ptu_capacity |
Object |
body |
Conditionally required |
Only available when For more information, see feature support for PTU deployment. |
Takes effect only when Example: |
|
ptu_capacity.input_tpm |
Number |
body |
Supported by all models. Input tokens per minute. The maximum input token amount per minute supported by the deployed model. |
||
|
ptu_capacity.output_tpm |
Number |
body |
Supported by all models. Output tokens per minute. The maximum output token amount per minute supported by the deployed model. |
||
|
ptu_capacity.thinking_output_tpm |
Number |
body |
Supported by some models. Thinking output tokens per minute. The maximum thinking output token amount per minute supported by the deployed model. |
||
Response example
Sample response:
{
"request_id": "6c6b7676-3fea-423b-bc26-c9e2337e1142",
"output": {
"deployed_model": "emo-35b3f106-sample01",
"gmt_create": "2025-06-17T11:00:38",
"gmt_modified": "2025-06-17T11:42:02.311",
"status": "UPDATING",
"model_name": "emo",
"base_model": "emo",
"base_capacity": 1,
"capacity": 2,
"ready_capacity": 1,
"workspace_id": "llm-v71tlv3dezezp2en",
"charge_type": "post_paid",
"creator": "17580541***",
"modifier": "17580541***"
}
}
Response parameters
Response parameters are the same as Get a model deployment. For details, see the response parameters of Get a model deployment.
Delete a deployment
Delete a specified model deployment and release the corresponding computing resources.
After this operation is performed, the model deployment service will be taken offline immediately and cannot be recovered:
-
The model will no longer be available for invocation.
-
Billing for the deployment service will stop.
Endpoint
DELETE https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}
Request example
Run the following command to delete a specified deployment.
curl --request DELETE "https://dashscope.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 it from Create deployment or the List deployments operation. |
Response example
Pay attention to the status field. When the status becomes DELETING, it indicates that the deployment is being deleted.
{
"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***"
}
}
Then, call Get a model deployment to verify the deletion. If the following response is returned, it means the deployed service no longer exists and has been successfully deleted.
{
"request_id": "eb619064-0c4f-4d29-aa49-xxxxxx",
"message": "Not found.",
"code": "NotFound"
}
Response parameters
Response parameters are the same as Get a model deployment. For details, see the response parameters of Get 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 ID for the request. |
|
code |
String |
The error code. |
|
message |
String |
The error message. |
Possible errors:
|
Error code |
Error message |
Error reason |
|
NotFound |
Model: xxx not found! |
|
|
Conflict |
Deployed model xxx already exists, please specify a suffix. |
The specified suffix is already in use. |
|
InvalidParameter |
Invalid capacity (xx), capacity must be larger than or equal to 0 and multiples of 1 and less than 1000! |
Invalid capacity units specified when creating or updating the deployment. |