This document uses Qwen model deployment as an example and describes how to call the API over HTTP, helping you use the model deployment feature provided by Alibaba Cloud Model Studio.
ImportantThe regions where the model deployment API is available vary by deployment method — Model Unit (MU) and Dedicated Throughput (DTU) are supported in China (Beijing).
Prerequisites
- You have read dedicated deployment overview and create model deployment tasks by using APIs, mastered how to use the model deployment API, and are familiar with the basic steps of model deployment on the Alibaba Cloud Model Studio platform.
- The Model Studio API key has been configured. For more information, see Obtain and configure an API key.
- DTU (DTU dedicated computing power) deployment uses the same set of deployment APIs, and the deployment form is distinguished by
plan="dtu"in the request. DTU deployment requests must use themaas.aliyuncs.comworkspace domain corresponding to the workspace and region where the deployment resides (for example,ws-vxxx.cn-beijing.maas.aliyuncs.com) and the API Key of that workspace, instead ofdashscope.aliyuncs.com. - The Intelligent Routing (mr) service also calls the deployment APIs on this page (requests are distinguished by
plan="mr", pay-as-you-go only). For the complete API description, see the standalone Intelligent Routing API reference. - Request domains vary by region: the Beijing region uses
dashscope.aliyuncs.com, and the Singapore region usesdashscope-intl.aliyuncs.com; the Dedicated Workspace Host ({WorkspaceId}.{region}.maas.aliyuncs.com) is available in all regions. For the complete domain information of each region, see Regional endpoints. - DTU deployment supports upfront payment only (
charge_type="pre_paid") and does not support pay-as-you-go creation; renewal and auto-renewal changes are currently supported only in the console. The DTU API does not support theAssumedRoleUserrole. Before using DTU, you must activate the DTU feature in the console and apply for a resource quota. For more information, see Dedicated Throughput (DTU).
Obtain the list of deployable models
GET https://dashscope.aliyuncs.com/api/v1/deployments/models
Request example
You can run the following command to query the models that support deployment. We recommend using version=v1.0 to obtain the complete response containing 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'
To 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'
To query DTU deployment plans (when plan=dtu is passed, only DTU prepaid templates are returned, and the version parameter is not required; DTU requires the workspace domain):
curl "https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments/models?plan=dtu&model_source=base&page_no=1&page_size=100" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
page_no | Number | query | No | The page number. The default value is 1. |
page_size | Number | query | No | The page size. The default value is 50, the maximum value is 100, and the minimum value is 1. |
model_source | String | query | No | The model source. |
version | String | query | No | The API version. We recommend using |
plan | String | query | No | Pass |
Response examples¶meters
Click here to view
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": "单机部署-标准推理型",
"template_type": "COUPLED",
"template_version": "v1",
"template_desc": "适用于标准推理场景",
"roles": {
"unified": {
"model_unit_spec": "MU1",
"capacity_unit_per_instance": 4
}
}
},
{
"template_id": "MU1-PD",
"template_name": "PD分离部署-标准推理型",
"template_type": "SEPERATED",
"template_version": "v1",
"template_desc": "适用于PD分离推理场景",
"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 | The list of deployable models. |
models[].model_name | String | The model name. |
models[].plans | Array | The list of deployment plans supported by this model. Returned when |
models[].plans[].plan | String | Deployment plan type: |
models[].plans[].templates | Array | The list of deployment templates (returned when |
page_no | Number | The page number of the query. |
page_size | Number | The page size of the query. |
total | Long | The total number of models that match the query conditions. |
Template field descriptions (templates)
Parameter | Type | Description |
|---|---|---|
template_id | String | The template ID, passed in as the |
template_name | String | The display name of the template. |
template_type | String | Template type: |
template_version | String | The template version. |
template_desc | String | The template description. |
roles | Object | The node role configuration. The COUPLED pattern includes |
Field descriptions for roles nodes
Parameter | Type | Description |
|---|---|---|
model_unit_spec | String | The Model Unit type. |
capacity_unit_per_instance | Number | The number of capacity units per instance, that is, base_capacity. When creating a deployment, |
DTU template field descriptions (returned when plan=dtu)
Parameter | Type | Description |
|---|---|---|
charge_type | String | Fixed to |
sku_code | String | The commodity SKU used when creating the deployment. |
template_code | String | The deployment template used when creating the deployment, which must be the same template item as |
input_tpm_quota | Object | The purchasable range and step of input TPM. For the fields, see the following table. |
output_tpm_quota | Object | The purchasable range and step of output TPM. For the fields, see the following table. |
display_meta | Object | Display information such as the plan name, description, and tags. Returned when a value is available. |
standard_workload | Object | The standard workload provided by the template (TPM unit and workload tier). Returned when a value is available. |
input_tpm_quota and output_tpm_quota indicate the purchase rules for input TPM and output TPM respectively. The capacity unit is tokens/min. The following fields are included:
Field | Type | Description |
|---|---|---|
init | Integer | The minimum initial purchase TPM for this dimension. The purchased capacity must not be less than this value. |
max | Integer | The upper limit of TPM that can currently be purchased. If max=0 in any dimension, no quota is currently available for purchase; contact sales to apply for resources. A value of 0 does not mean unlimited. |
step | Integer | The purchase step for this dimension. The purchased TPM must be an integer multiple of this step (not an offset accumulated on init). |
When creating or scaling a DTU deployment, the dtu_capacity.input_tpm and dtu_capacity.output_tpm passed in must meet all of the following:
- Input and output TPM must each fall within their respective [init, max] ranges;
- Input TPM must be an integer multiple of
input_tpm_quota.step, and output TPM must be an integer multiple ofoutput_tpm_quota.step; - The input and output step multipliers must be identical:
input_tpm / input_tpm_quota.step = output_tpm / output_tpm_quota.step = n(where n is a positive integer). You cannot select different multipliers independently.
For example, when the input range is init=10000, max=100000, step=10000 and the output range is init=1000, max=10000, step=1000: purchasing an input of 30000 and an output of 3000 (both are 3 times the step, valid); purchasing an input of 30000 and an output of 2000 (multipliers 3 and 2, invalid); purchasing an input of 15000 and an output of 1500 (not integer multiples of the step, invalid).
Create a Model Deployment Task
POST https://dashscope.aliyuncs.com/api/v1/deployments
Request Examples
Dedicated Throughput (DTU)
Upfront billing, with capacity purchased by input/output TPM (the workspace domain is required; sku_code, template_code, and capacity ranges are queried through the List Deployable Models API with plan=dtu). DTU is the successor to Model Unit (MU); for new dedicated deployments, DTU is the preferred choice:
curl "https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model_name": "your-supported-model",
"display_name": "业务模型服务",
"suffix": "production",
"plan": "dtu",
"sku_code": "your-prepaid-sku",
"template_code": "your-template",
"charge_type": "pre_paid",
"pre_paid_info": {
"pricing_cycle": "Month",
"duration": 1,
"auto_renewal": false
},
"dtu_capacity": {"input_tpm": 10000, "output_tpm": 10000}
}'
Model Unit Deployment (COUPLED mode)
Use template_id to specify the MU1 specification; capacity is the number of resource units:
curl "https://dashscope.aliyuncs.com/api/v1/deployments" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model_name": "qwen3-8b",
"plan": "mu",
"template_id": "MU1",
"capacity": 4
}'
Model Unit Deployment (PD disaggregation mode)
Use the MU1-PD template and specify prefill_capacity and decode_capacity separately:
curl "https://dashscope.aliyuncs.com/api/v1/deployments" \
--header "Authorization: Bearer $DASHSCOPE_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"model_name": "qwen3-8b",
"plan": "mu",
"template_id": "MU1-PD",
"prefill_capacity": 4,
"decode_capacity": 8
}'
Request Parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
model_name | String | body | Yes | The name of the model to deploy. |
plan | String | body | Yes | Deployment plan: |
template_id | String | body | Conditionally required | The deployment template ID, corresponding to the |
deploy_spec (legacy) | String | body | No | Model Unit specification. Deprecated. |
capacity | Number | body | Conditionally required | The number of resource units. Required in COUPLED mode (non-PD disaggregation) and must be an integer multiple of |
prefill_capacity | Number | body | Conditionally required | Prefill capacity. Required in PD disaggregation mode (when |
decode_capacity | Number | body | Conditionally required | Decode capacity. Required in PD disaggregation mode (when |
name | String | body | No | The display name of the service. |
suffix | String | body | No | After the model is deployed, a new model name is generated. suffix specifies the suffix of the new model name, with a maximum length of 8 characters, and it must be globally unique. The suffix can be omitted when a model is deployed for the first time, but it must be set when the same model is deployed multiple times. |
charge_type | String | body | No | Billing method: |
pre_paid_info | Object | body | Conditionally required | Upfront payment information. Required when |
pre_paid_info.auto_renewal | Boolean | body | Yes | Whether to enable auto-renewal |
pre_paid_info.duration | Integer | body | Yes | Purchase duration (Month(s)) |
pre_paid_info.auto_renewal_duration | Integer | body | Conditionally required | Auto-renewal duration (required when autoRenewal=true) |
enable_thinking | Boolean | body | No | Whether to enable thinking mode. Some models support this parameter. |
max_context_length | Number | body | No | The maximum context length. Some models support this parameter. |
quantization_precision | String | body | No | Quantization precision. |
qpm_limit | Number | body | No | QPM rate limiting, the limit on requests per minute. Only supported by some models whose |
tpm_limit | Number | body | No | TPM rate limiting, the limit on token usage per minute. Only supported by some models whose |
display_name | String | body | Conditionally required | The display name of the service, up to 50 characters. Used when |
sku_code | String | body | Conditionally required | The prepaid SKUs available for the current model. Required when |
template_code | String | body | Conditionally required | The deployment template that matches the model and SKU. Required when |
dtu_capacity | Object | body | Conditionally required | The DTU capacity to purchase. Required when |
dtu_capacity.input_tpm | Integer | body | Yes | The purchased input TPM (tokens/min). A non-negative integer with a maximum value of 2147483647. |
dtu_capacity.output_tpm | Integer | body | Yes | The purchased output TPM (tokens/min). A non-negative integer with a maximum value of 2147483647. |
pre_paid_info.pricing_cycle | String | body | Yes | The billing cycle. For DTU, this parameter is fixed to |
pre_paid_info.auto_renewal_cycle | String | body | Conditionally required | The Unified Auto Renewal Cycle. Required when auto renewal is enabled, and must comply with the product rules. |
NoteAdditional notes when plan is dtu: suffix can be up to 24 characters, and the generated full deployment identifier must not exceed 100 characters; name, random_suffix, deploy_spec, MU/PTU capacity fields, model routing, rate limiting, and publishing parameters are not supported — configure rate limits via the rate limit update API after the deployment is ready; a successful creation only indicates that the request has been accepted (the prepaid order is being processed) — poll the details until the status is RUNNING; renew and change auto renewal in the console.
Supported models
Response Example&Parameters
Click here to view
After the command is executed, the following result is returned:
{
"request_id": "f2ae64f7-83cc-410c-bc0b-840443f7eb86",
"output": {
"deployed_model": "qwen3-8b-20260115-abcd",
"name": "我的模型服务",
"model_name": "qwen3-8b",
"base_model": "qwen3-8b",
"status": "PENDING",
"capacity": 4,
"ready_capacity": 0,
"base_capacity": 4,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"plan": "mu",
"model_unit_spec": "MU1",
"creator": "16542902******",
"modifier": "16542902******",
"qpm_limit": 100000000,
"tpm_limit": 3600000,
"mu_capacity": {
"unified": {
"base_capacity": 4,
"model_unit_spec": "MU1",
"ready_capacity": 0,
"capacity": 4
}
},
"gmt_create": "2026-01-15T10:00:00",
"gmt_modified": "2026-01-15T10:00:00"
}
}
Parameter | Type | Description |
|---|---|---|
request_id | String | The ID of this request. |
output | Object | The details of this deployment task. |
deployed_model | String | The unique identifier of the new model, which must be passed in the SDK parameters when initiating a model invocation request. |
name | String | The display name of the service. |
model_name | String | The name of the model used by the deployment task. |
base_model | String | The ID of the base model corresponding to the model used by the deployment task. |
status | String | The status of the deployment task.
|
capacity | Number | The target number of resource units for the deployment task. |
ready_capacity | Number | The number of resource units that are ready and can process requests immediately. |
base_capacity | Number | The base capacity of a single instance. |
workspace_id | String | The ID of the workspace to which the deployment task belongs. |
charge_type | String |
|
plan | String | The billing mode of the deployment task. |
model_unit_spec | String | The Model Unit type. |
gmt_create | String | The time when the deployment task was created. |
gmt_modified | String | The time when the deployment task was modified. |
creator | String | The UID of the user who created the deployment task. |
modifier | String | The UID of the account that performed the last operation on the deployment task. |
fail_reason | String | The cause of the failure (returned only in the FAILED state). |
enable_thinking | Boolean | Whether thinking mode is enabled. Supported by some models. |
max_context_length | Number | The maximum context length limit. |
qpm_limit | Number | QPM rate limit, requests per minute. |
tpm_limit | Number | TPM rate limit, token usage per minute. |
quantization_precision | String | Quantization precision. |
Only returned for the DTU (dtu) deployment method | ||
dtu_capacity | Object | The purchased capacity in the deployment record; during scaling, it may still be the original capacity, which does not mean the target capacity has taken effect. |
dtu_capacity.input_tpm | Integer | The purchased input token capacity (tokens/min). |
dtu_capacity.output_tpm | Integer | The purchased output token capacity (tokens/min). |
pre_paid_info.pricing_cycle | String | The purchased billing period returned (for example, |
pre_paid_info.auto_renewal_cycle | String | The auto renewal cycle returned; returned only when it has a value. |
pre_paid_instance_id | String | The prepaid instance identifier, returned only when it has a value. It is not the deployment identifier and cannot replace |
Only returned for the Model Unit (mu) deployment method | ||
mu_capacity | Object | MU capacity details. In COUPLED mode, a |
pre_paid_info | Object | Prepaid information. |
pre_paid_info.auto_renewal | Boolean | Whether to enable auto-renewal |
pre_paid_info.duration | Integer | Purchase duration (Month(s)) |
pre_paid_info.auto_renewal_duration | Integer | Auto renewal duration |
pre_paid_instance_id | String | Prepaid instance ID. |
pre_paid_gmt_expired | String | Prepaid expiration time. |
Only returned for the Provisioned Throughput V2 (ptu_v2) deployment method | ||
ptu_capacity | Object | PTU V2 capacity information. Contains the following fields:
|
pre_paid_info | Object | Prepaid information. |
pre_paid_info.auto_renewal | Boolean | Whether to enable auto-renewal |
pre_paid_info.duration | Integer | Purchase duration (Month(s)) |
pre_paid_info.auto_renewal_duration | Integer | Auto renewal duration |
pre_paid_instance_id | String | Prepaid instance ID. |
pre_paid_gmt_expired | String | Prepaid expiration time. |
The qpm_limit and tpm_limit of a DTU deployment are gateway rate limit settings (64-bit integers, which may exceed the request upper limit of the modification API). The defaults are qpm_limit=600000 and tpm_limit=output_tpm × 100, which are not equal to the purchased input/output TPM and do not represent an actual inference throughput guarantee. The gmt_create and gmt_modified strings do not contain a timezone offset; do not treat them as UTC time on your own.
Query model deployment tasks
GET https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}
Request example
curl "https://dashscope.aliyuncs.com/api/v1/deployments/qwen3-8b-20260115-abcd" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | The unique identifier of the deployed model, which can be obtained by creating a model deployment task or listing model deployment tasks. |
Response example¶meters
Click here to view
After the command is executed, the following result is returned:
{
"request_id": "d8b8c47b-ae32-4c41-b9f4-9a1e2b3c4d5e",
"output": {
"deployed_model": "qwen3-8b-20260115-abcd",
"name": "我的模型服务",
"model_name": "qwen3-8b",
"base_model": "qwen3-8b",
"status": "RUNNING",
"capacity": 4,
"ready_capacity": 4,
"base_capacity": 4,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"plan": "mu",
"model_unit_spec": "MU1",
"creator": "16542902******",
"modifier": "16542902******",
"qpm_limit": 100000000,
"tpm_limit": 3600000,
"mu_capacity": {
"unified": {
"base_capacity": 4,
"model_unit_spec": "MU1",
"ready_capacity": 4,
"capacity": 4
}
},
"gmt_create": "2026-01-15T10:00:00",
"gmt_modified": "2026-01-15T10:30:00"
}
}
Response parameters
The response parameters are the same as those of creating a model deployment task. For more information, see the response parameter description of creating a model deployment task.
List model deployment tasks
GET https://dashscope.aliyuncs.com/api/v1/deployments
Request example
curl "https://dashscope.aliyuncs.com/api/v1/deployments?page_no=1&page_size=10" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
page_no | Number | query | No | The page number. The default value is 1. |
page_size | Number | query | No | Page size. The default value is 10, and the maximum value is 100. |
plan | String | query | No | Pass |
Response examples¶meters
Click here to view
After the command is executed, the following result is returned:
{
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"output": {
"page_no": 1,
"page_size": 10,
"total": 2,
"deployments": [
{
"deployed_model": "qwen3-8b-20260115-abcd",
"name": "我的模型服务",
"model_name": "qwen3-8b",
"base_model": "qwen3-8b",
"status": "RUNNING",
"capacity": 4,
"ready_capacity": 4,
"base_capacity": 4,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"plan": "mu",
"model_unit_spec": "MU1",
"creator": "16542902******",
"modifier": "16542902******",
"qpm_limit": 100000000,
"tpm_limit": 3600000,
"mu_capacity": {
"unified": {
"base_capacity": 4,
"model_unit_spec": "MU1",
"ready_capacity": 4,
"capacity": 4
}
},
"gmt_create": "2026-01-15T10:00:00",
"gmt_modified": "2026-01-15T10:30:00"
}
]
}
}
Response parameters
Parameter | Type | Description |
|---|---|---|
page_no | Number | The page number of the query. |
page_size | Number | The page size of the query. |
total | Long | The total number of deployment tasks that meet the query conditions. |
deployments | Array | The list of deployment tasks. The fields of each element are the same as the response parameters of creating a model deployment task. For more information, see the response parameter description of creating a model deployment task. |
Update a model deployment task
Scaling
NoteUpdating a model deployment task means scaling the deployment service. This operation can only be called when the service status is RUNNING or SCALING; calling it in other statuses returns an OperationDenied error. For DTU deployments, scaling is performed by passing dtu_capacity through this API: input and output TPM must be increased or decreased together (the range and combination limits are the same as those for creation). Success only indicates that the request has been accepted (the status first changes to WAIT_PRE_PAID_BILLING_TO_SCALING); you need to poll the details until the status is RUNNING and both input and output capacities reach the target values.
PUT https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}/scale
Request examples
Scaling in COUPLED mode:
curl -X PUT "https://dashscope.aliyuncs.com/api/v1/deployments/qwen3-8b-20260115-abcd/scale" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"capacity": 8
}'
Scaling in PD disaggregation mode:
curl -X PUT "https://dashscope.aliyuncs.com/api/v1/deployments/qwen3-8b-20260115-abcd/scale" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"prefill_capacity": 4,
"decode_capacity": 8
}'
Scaling a DTU deployment (requires the dedicated workspace host; plan can be omitted from the request body):
curl -X PUT "https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments/your-deployment-id/scale" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"dtu_capacity": {"input_tpm": 20000, "output_tpm": 20000}
}'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | The unique identifier of the deployed model. |
capacity | Number | body | Conditionally required | The target number of resource units for scaling. Required in COUPLED mode (non-PD disaggregation); it must be an integer multiple of |
prefill_capacity | Number | body | Conditionally required | The target prefill capacity. Required in PD disaggregation mode. |
decode_capacity | Number | body | Conditionally required | The target decode capacity. Required in PD disaggregation mode. |
dtu_capacity | Object | body | Conditionally required | The target DTU capacity. Required when |
Response examples¶meters
Click here to view
After the command is executed, the following result is returned:
{
"request_id": "e5f6a7b8-c9d0-1234-5678-abcdef012345",
"output": {
"deployed_model": "qwen3-8b-20260115-abcd",
"name": "我的模型服务",
"model_name": "qwen3-8b",
"base_model": "qwen3-8b",
"status": "SCALING",
"capacity": 8,
"ready_capacity": 4,
"base_capacity": 4,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"plan": "mu",
"model_unit_spec": "MU1",
"creator": "16542902******",
"modifier": "16542902******",
"qpm_limit": 100000000,
"tpm_limit": 3600000,
"mu_capacity": {
"unified": {
"base_capacity": 4,
"model_unit_spec": "MU1",
"ready_capacity": 4,
"capacity": 8
}
},
"gmt_create": "2026-01-15T10:00:00",
"gmt_modified": "2026-01-15T11:00:00"
}
}
Response parameters
The response parameters are the same as those of creating a model deployment task. For more information, see the response parameter description of creating a model deployment task.
Modify the rate limits of a DTU deployment
NoteOnly DTU (dtu) deployments support this API. The deployment must be in an idle RUNNING state; the request must provide both qpm_limit and tpm_limit as two positive integers ranging from 1 to 2147483647. rpm_limit can be used as an alias of qpm_limit; use only one name. Rate limit values are not subject to the step size of the purchased capacity or the rule that input/output must be the same multiple.
PUT https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments/{deployed_model}/config
Request examples
curl -X PUT "https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments/your-deployment-id/config" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"qpm_limit": 600,
"tpm_limit": 100000
}'
On success, the current deployment details are returned (the response parameters are the same as those of creating a model deployment task), with the top-level message being DTU rate limit configuration updated.. This API only modifies the rate limit thresholds; it does not change the purchased input and output TPM, nor does it support simultaneously updating the model or scaling.
Update the model of a DTU deployment
NoteOnly DTU (dtu) deployments support this API, and only updating a fine-tuned model to another fine-tuned model is supported: the target model and the current model must have the same base model name and version. The deployment must be in an idle RUNNING state, and the template must support model updates; requests with the same model, concurrent changes, or other unmet conditions will fail.
PUT https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments/{deployed_model}/update
Request example
curl -X PUT "https://ws-vxxx.cn-beijing.maas.aliyuncs.com/api/v1/deployments/your-deployment-id/update" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json' \
--data '{
"new_model_name": "your-new-finetuned-model"
}'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | The unique identifier of the deployed model. |
new_model_name | String | body | Yes | The name of the target fine-tuned model, which must be a model visible in the current workspace and authorized for use. |
WarningThe update is published continuously according to the minimum-batch strategy allowed by the template, without pausing for validation after the first batch. During the update, serviceable capacity may decrease, the old and new models may serve requests at the same time, and increased latency, throttling, or request failures may occur; minimum-batch publishing does not guarantee lossless or zero-downtime updates. Before initiating the update, confirm that the target model is available, and choose a time window in which these impacts are acceptable.
This API only updates the model; it does not support modifying throttling, capacity, SKU, template, purchase information, rollout ratio, or pause parameters. A successful response indicates that the request has been accepted (the top-level message is DTU model update request accepted. The model is published continuously without pausing. Poll deployment details to confirm completion.); you need to poll the details to confirm that status is RUNNING and that model_name has changed to the target model. Returning to RUNNING alone does not prove the update succeeded — if the update fails and rolls back, the old model may still be in use.
Stop a deployed model
NoteOnly the model unit (mu) deployment mode supports stopping services. This API can only be called when the service status is RUNNING or SCALING. Calling this API with the cu, ptu_v2, lora, or dtu mode returns an UnsupportedOperation error. After the service is stopped, it is no longer billed and can be restarted via the API details API. DTU deployments do not support starting or stopping via API.
POST https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}/stop
Request example
curl -X POST "https://dashscope.aliyuncs.com/api/v1/deployments/qwen3-8b-20260115-abcd/stop" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | The unique identifier of the deployed model. |
Response example¶meters
Click here to view
After the command is executed, the following result is returned:
{
"request_id": "f1a2b3c4-d5e6-7890-abcd-ef1234567890",
"output": {
"deployed_model": "qwen3-8b-20260115-abcd",
"name": "我的模型服务",
"model_name": "qwen3-8b",
"base_model": "qwen3-8b",
"status": "STOPPING",
"capacity": 4,
"ready_capacity": 4,
"base_capacity": 4,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"plan": "mu",
"model_unit_spec": "MU1",
"creator": "16542902******",
"modifier": "16542902******",
"qpm_limit": 100000000,
"tpm_limit": 3600000,
"mu_capacity": {
"unified": {
"base_capacity": 4,
"model_unit_spec": "MU1",
"ready_capacity": 4,
"capacity": 4
}
},
"gmt_create": "2026-01-15T10:00:00",
"gmt_modified": "2026-01-15T12:00:00"
}
}
Response parameters
The response parameters are the same as those of creating a model deployment task. For more information, see the response parameter description of creating a model deployment task.
Restart a deployed model
NoteDTU (dtu) deployments do not currently support starting services through this API.
POST https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}/start
Request example
curl -X POST "https://dashscope.aliyuncs.com/api/v1/deployments/qwen3-8b-20260115-abcd/start" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | The unique identifier of the deployed model, which can be obtained by creating a model deployment task or listing model deployment tasks. |
Response example¶meters
Click here to view
After the command is executed, the following result is returned:
After startup, the status is
STARTING, and it changes toRUNNINGonce the model is ready for calls
{
"request_id": "xxx-xxx-xxx",
"output": {
"deployed_model": "qwen-7b-chat-ft-20240101-abcd",
"model_name": "qwen-7b-chat-ft",
"base_model": "qwen-7b-chat",
"status": "STARTING",
"capacity": 1,
"ready_capacity": 0,
"base_capacity": 1,
"plan": "mu",
"model_unit_spec": "MU5",
"workspace_id": "workspace-xxx",
"charge_type": "post_paid",
"creator": "user123",
"modifier": "user123",
"qpm_limit": 100000000,
"tpm_limit": 3600000,
"mu_capacity": {
"unified": {
"base_capacity": 1,
"model_unit_spec": "",
"ready_capacity": 0,
"capacity": 1
}
},
"gmt_create": "2024-01-01T10:00:00",
"gmt_modified": "2024-01-01T13:00:00"
}
}
Response parameters
The response parameters are the same as those of creating a model deployment task. For more information, see the response parameter description of creating a model deployment task.
Delete a model deployment task
NoteDeletion can only be called when the service status is STOPPED or FAILED. For a service in RUNNING status, call the API details API first. DTU (dtu) deployments do not currently support deletion through this API; unsubscribe in the console instead. For more information, see Dedicated throughput (DTU).
DELETE https://dashscope.aliyuncs.com/api/v1/deployments/{deployed_model}
Request example
curl -X DELETE "https://dashscope.aliyuncs.com/api/v1/deployments/qwen3-8b-20260115-abcd" \
--header "Authorization: Bearer ${DASHSCOPE_API_KEY}" \
--header 'Content-Type: application/json'
Request parameters
Parameter | Type | Passing Method | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | The unique identifier of the deployed model. |
Response example¶meters
Click here to view
After the command is executed, the following result is returned:
{
"request_id": "g1h2i3j4-k5l6-7890-mnop-qr1234567890",
"output": {
"deployed_model": "qwen3-8b-20260115-abcd",
"name": "我的模型服务",
"model_name": "qwen3-8b",
"base_model": "qwen3-8b",
"status": "DELETING",
"capacity": 4,
"ready_capacity": 0,
"base_capacity": 4,
"workspace_id": "llm-8v53e*******",
"charge_type": "post_paid",
"plan": "mu",
"model_unit_spec": "MU1",
"creator": "16542902******",
"modifier": "16542902******",
"gmt_create": "2026-01-15T10:00:00",
"gmt_modified": "2026-01-15T14:00:00"
}
}
Response parameters
The response parameters are the same as those of creating a model deployment task. For more information, see the response parameter description of creating a model deployment task.
Error responses
{
"request_id": "6fec0a3f-a1df-4f89-8c8f-33cb0db9f5b0",
"code": "InvalidParameter",
"message": "capacity is required when template_type is COUPLED"
}
Response parameters
Parameter | Type | Description |
|---|---|---|
request_id | String | The system-generated ID of this request. |
code | String | The error code, which identifies the error type. |
message | String | Error details, used for troubleshooting. |
Common errors
Cause of Error | Description |
|---|---|
| Parameter error, such as missing required parameters, invalid parameter values, or passing template_id and deploy_spec at the same time. |
| Insufficient permissions or the resource does not exist. |
| The operation is not allowed in the current state, such as performing scaling when the deployment is not in the RUNNING state, or deleting a deployment that is not in the STOPPED/FAILED state. |
| The operation is not supported by the current deployment solution. For example, the CU-based method does not support stopping the service. |
| Insufficient resource inventory. The scale-out or deployment cannot be completed. |
| Internal error. |
| The specified deployment task does not exist. |
| Operation conflict, such as the service is performing another operation. |
| Insufficient Quota (common in DTU upfront purchases). Check the available quota or contact service support. |
| Insufficient resources to complete the deployment or scale-out. You can adjust the capacity or contact service support. |
| The service is temporarily unavailable. Retry after a backoff. |