This document uses the Qwen model deployment as an example to demonstrate how to use the model deployment feature of Alibaba Cloud Model Studio through HTTP API calls.
Prerequisites
- You have read Dedicated Deployment Overview and Deploy Models Using APIs to understand how to use model deployment APIs and the basic steps for deploying models on Alibaba Cloud Model Studio.
- You have configured your Model Studio API key. For more information, see Obtain an API Key.
- DTU (dedicated compute) deployments use the same set of deployment APIs. Set
plan="dtu"in requests to distinguish the deployment type. DTU requests must use the workspace-scopedmaas.aliyuncs.comdomain of the region and workspace where the deployment resides (for example,ws-vxxx.cn-beijing.maas.aliyuncs.com) together with the API key of that workspace, instead ofdashscope.aliyuncs.com. - Intelligent routing (mr) services also call the deployment APIs on this page (requests are distinguished by
plan="mr", pay-as-you-go only). The complete API reference is provided separately in Intelligent Routing API Reference. - The request domain varies by region: use
dashscope.aliyuncs.comfor the China (Beijing) region anddashscope-intl.aliyuncs.comfor the Singapore region. The workspace-specific domain ({WorkspaceId}.{region}.maas.aliyuncs.com) is available in all regions. For the complete regional domain information, see Regional access information. - DTU deployments support pre-paid billing only (
charge_type="pre_paid"); post-paid creation is not supported. Renewal and auto-renewal changes are currently supported only in the console. The DTU APIs do not support theAssumedRoleUserrole. Before using DTU, enable 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
Request example
Run the following command to list deployable models. Use version=v1.0 to retrieve a full response that includes deployment plans and templates.
plan=dtu is passed, only DTU pre-paid templates are returned and the version parameter is not required; DTU uses the workspace-scoped domain):
Request parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
page_no | Number | query | No | Page number. Default is 1. |
page_size | Number | query | No | Page size. Default is 50. Maximum is 100. Minimum is 1. |
model_source | String | query | No | Model source. |
version | String | query | No | API version. Use |
plan | String | query | No | Pass |
Response example¶meters
Click to view the details.
Click to view the details.
Response Parameters
Parameter | Type | Description |
|---|---|---|
models | Array | List of deployable models. |
models[].model_name | String | Model name. |
models[].plans | Array | List of supported deployment plans for this model. Returned when using |
models[].plans[].plan | String | Deployment plan type: |
models[].plans[].templates | Array | List of deployment templates. Returned when |
page_no | Number | Page number of the query. |
page_size | Number | Page size of the query. |
total | Long | Total number of models that match the query criteria. |
Template field description (templates)
Parameter | Type | Description |
|---|---|---|
template_id | String | Template ID. Pass it as the |
template_name | String | Template display name. |
template_type | String | Template type: |
template_version | String | Template version. |
template_desc | String | Template description. |
roles | Object | Node role configuration. COUPLED mode has a |
Roles Node Fields
Parameter | Type | Description |
|---|---|---|
model_unit_spec | String | Model unit specification. |
capacity_unit_per_instance | Number | Capacity units per instance, also called base_capacity. When you create a deployment, |
DTU Template Fields (returned when plan=dtu)
Parameter | Type | Description |
|---|---|---|
charge_type | String | Always |
sku_code | String | SKU used when you create the deployment. |
template_code | String | Deployment template used when you create the deployment. It must belong to the same template item as |
input_tpm_quota | Object | Purchasable range and step for input TPM. See the table below. |
output_tpm_quota | Object | Purchasable range and step for output TPM. See the table below. |
display_meta | Object | Display information such as plan name, description, and tags. Returned when available. |
standard_workload | Object | Standard workload provided by the template (TPM units and workload tiers). Returned when available. |
input_tpm_quota and output_tpm_quota specify the purchase rules for input and output TPM respectively. Capacity is measured in tokens/min. They include the following fields:Field | Type | Description |
|---|---|---|
init | Integer | Minimum purchasable TPM for this dimension. The purchased capacity must not be less than this value. |
max | Integer | Maximum purchasable TPM. If max=0 for either dimension, no quota is currently available. Contact sales to apply for resources; 0 does not mean unlimited. |
step | Integer | Purchase step for this dimension. The purchased TPM must be an integer multiple of this step (not an offset added on top of init). |
dtu_capacity.input_tpm and dtu_capacity.output_tpm you pass must meet all of the following requirements:- Input and output TPM are each within their own [init, max] range.
- Input TPM is an integer multiple of
input_tpm_quota.step, and output TPM is an integer multiple ofoutput_tpm_quota.step. - Input and output must use the same step multiple:
input_tpm / input_tpm_quota.step = output_tpm / output_tpm_quota.step = n(n is a positive integer). You cannot choose different multiples independently.
init=10000, max=100000, step=10000 and the output range is init=1000, max=10000, step=1000: buying input 30000 and output 3000 (both 3 times the step, valid); buying input 30000 and output 2000 (multiples 3 and 2, invalid); buying input 15000 and output 1500 (not integer multiples of the steps, invalid).Create a model deployment task
Request Example
- DTU Dedicated Compute Deployment
- Model Unit Deployment (COUPLED Mode)
- Model Unit Deployment (PD-Separated Mode)
sku_code, template_code, and the capacity range with plan=dtu in Get a List of Deployable Models). DTU is the successor to model unit (MU) deployment and is recommended for new dedicated deployments:Request Parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
model_name | String | body | Yes | Name of the model to deploy. |
plan | String | body | Yes | Deployment plan: |
template_id | String | body | This parameter is required. | Template ID. Must match the |
deploy_spec (deprecated) | String | body | No | Model unit spec. Deprecated. |
capacity | Number | body | This parameter is required. | Target number of capacity units. Required for COUPLED mode (non-PD-separated). Must be a multiple of |
prefill_capacity | Number | body | This parameter is required. | Prefill capacity. Required for PD-separated mode ( |
decode_capacity | Number | body | This parameter is required. | Decode capacity. Required for PD-separated mode ( |
name | String | body | No | Service display name. |
suffix | String | body | No | When you deploy a model, a new model name is generated. The suffix sets the suffix for the new model name. Max length is 8 characters. Must be globally unique. You can omit the suffix for the first deployment of a model. You must set it for later deployments of the same model. |
charge_type | String | body | No | Billing method: |
pre_paid_info | Object | body | This parameter is required. | Subscription info. Required when |
pre_paid_info.auto_renewal | Boolean | body | Yes | Enable auto-renewal. |
pre_paid_info.duration | Integer | body | Yes | Subscription duration in months. |
pre_paid_info.auto_renewal_duration | Integer | body | This parameter is required. | Auto-renewal duration in months. Required when autoRenewal=true. |
enable_thinking | Boolean | body | No | Enable thinking mode. Supported by some models. |
max_context_length | Number | body | No | Maximum context length. Supported by some models. |
quantization_precision | String | body | No | Quantization precision. |
qpm_limit | Number | body | No | QPM rate limit. Requests per minute. Supported only by some models with |
tpm_limit | Number | body | No | TPM rate limit. Tokens per minute. Supported only by some models with |
display_name | String | body | This parameter is required. | Service display name. Max length is 50 characters. Used when |
sku_code | String | body | This parameter is required. | Pre-paid SKU available for the current model. Required when |
template_code | String | body | This parameter is required. | Deployment template that matches the model and SKU. Required when |
dtu_capacity | Object | body | This parameter is required. | DTU capacity to purchase. Required when |
dtu_capacity.input_tpm | Integer | body | Yes | Purchased input TPM (tokens/min). Non-negative integer. Maximum is 2147483647. |
dtu_capacity.output_tpm | Integer | body | Yes | Purchased output TPM (tokens/min). Non-negative integer. Maximum is 2147483647. |
pre_paid_info.pricing_cycle | String | body | Yes | Billing cycle. For DTU, set it to |
pre_paid_info.auto_renewal_cycle | String | body | This parameter is required. | Auto-renewal cycle. Required when auto-renewal is enabled. Must conform to the product rules. |
plan = 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 limit, and publishing parameters are not supported — configure rate limits through the rate limit API after the deployment is ready; a successful create response only indicates that the request is accepted (the pre-paid order is processing) — poll the deployment details until the status is RUNNING; renewal and auto-renewal changes must be performed in the console.Supported Models
Model Unit deployment supports features such as rate limiting and inference acceleration. This table shows which features are supported.
Model Unit deployment supports features such as rate limiting and inference acceleration. This table shows which features are supported.
- Text generation
- Multimodal
- speech synthesis
- Qwen
- GLM
- DeepSeek
- More models
Model name | Model code | Model unit specification | Hourly unit price (CNY) Minimum billing: minute | Monthly unit price (CNY) Minimum billing: day |
|---|---|---|---|---|
Qwen3.6-35B-A3B | qwen3.6-35b-a3b | MU1 x 8 | ¥432 | ¥208,944 |
MU2 x 8 | ¥504 | ¥240,288 | ||
MU3 x 8 | ¥1,096 | ¥527,752 | ||
MU9 x 1 | ¥51 | ¥24,600 | ||
Qwen3.6-27B | qwen3.6-27b | MU9 x 1 | ¥51 | ¥24,600 |
Qwen3.6-Flash-2026-04-16 | qwen3.6-flash-2026-04-16 | MU1 x 2 | ¥108 | ¥52,236 |
MU3 x 8 | ¥1,096 | ¥527,752 | ||
Qwen3.6-Plus-2026-04-02 | qwen3.6-plus-2026-04-02 | MU1 x 8 MU1 x 16 (PD separation mode) | ¥432 PD separation mode: ¥864 | ¥208,944 PD separation mode: ¥417,888 |
Qwen3.5-397B-A17B | qwen3.5-397b-a17b | MU3 x 8 MU3 x 16 (PD separation mode) | ¥1,096 PD separation mode: ¥2,192 | ¥527,752 PD separation mode: ¥1,055,504 |
MU6 x 16 | ¥400 | ¥193,424 | ||
Qwen3.5-122B-A10B | qwen3.5-122b-a10b | MU1 x 4 | ¥216 | ¥104,472 |
MU6 x 16 | ¥400 | ¥193,424 | ||
Qwen3.5-35B-A3B | qwen3.5-35b-a3b | MU1 x 2 | ¥108 | ¥52,236 |
MU2 x 8 | ¥504 | ¥240,288 | ||
MU3 x 8 | ¥1,096 | ¥527,752 | ||
MU9 x 1 | ¥51 | ¥24,600 | ||
Qwen3.5-27B | qwen3.5-27b | MU2 x 8 | ¥504 | ¥240,288 |
MU3 x 8 | ¥1,096 | ¥527,752 | ||
MU8 x 1 | ¥47 | ¥22,400 | ||
MU9 x 1 | ¥51 | ¥24,600 | ||
Qwen3.5-9B | qwen3.5-9b | MU2 x 2 | ¥126 | ¥60,072 |
Qwen3.5-Flash-2026-02-23 | qwen3.5-flash-2026-02-23 | MU1 x 2 | ¥108 | ¥52,236 |
Qwen3.5-Plus-2026-02-15 | qwen3.5-plus-2026-02-15 | MU1 x 8 MU1 x 16 (PD separation mode) | ¥432 PD separation mode: ¥864 | ¥208,944 PD separation mode: ¥417,888 |
MU2 x 8 | ¥504 | ¥240,288 | ||
MU3 x 8 MU3 x 16 (PD separation mode) | ¥1,096 PD separation mode: ¥2,192 | ¥527,752 PD separation mode: ¥1,055,504 | ||
Qwen3-235B-A22B-Instruct-2507 | qwen3-235b-a22b-instruct-2507 | MU1 x 4 | ¥216 | ¥104,472 |
MU2 x 8 | ¥504 | ¥240,288 | ||
MU3 x 8 | ¥1,096 | ¥527,752 | ||
Qwen3-32B | qwen3-32b | MU6 x 16 | ¥400 | ¥193,424 |
Qwen3-30B-A3B-Thinking-2507 | qwen3-30b-a3b-thinking-2507 | MU1 x 2 | ¥108 | ¥52,236 |
Qwen3-8B | qwen3-8b | MU1 x 2 | ¥108 | ¥52,236 |
MU2 x 2 | ¥126 | ¥60,072 | ||
Qwen3-4B | qwen3-4b | MU1 x 2 | ¥108 | ¥52,236 |
MU5 x 1 | ¥21 | ¥10,139 | ||
Qwen3-Embedding-0.6B | qwen3-embedding-0.6b | MU5 x 1 | ¥21 | ¥10,139 |
MU6 x 1 | ¥25 | ¥12,089 | ||
Qwen3-MoE-Rerank-0.6B | qwen3-moe-rerank-0.6b | MU5 x 1 | ¥21 | ¥10,139 |
Qwen3-Rerank-0.6B | qwen3-rerank-0.6b | MU5 x 1 | ¥21 | ¥10,139 |
MU6 x 1 | ¥25 | ¥12,089 | ||
Qwen3-Max-2025-09-23 | qwen3-max-2025-09-23 | MU2 x 8 | ¥504 | ¥240,288 |
MU3 x 8 | ¥1,096 | ¥527,752 | ||
Qwen3-Rerank | qwen3-rerank | MU5 x 1 | ¥21 | ¥10,139 |
Qwen2.5-72B (Open Source) | qwen2.5-72b-instruct | MU1 x 8 | ¥432 | ¥208,944 |
Qwen2.5-14B (Open Source) | qwen2.5-14b-instruct | MU1 x 2 | ¥108 | ¥52,236 |
Qwen2.5-7B (Open Source) | qwen2.5-7b-instruct | MU1 x 2 | ¥108 | ¥52,236 |
MU5 x 1 | ¥21 | ¥10,139 | ||
Qwen-Plus-2025-07-28 | qwen-plus-2025-07-28 | MU1 x 4 MU1 x 16 (PD separation mode) | ¥216 PD separation mode: ¥864 | ¥104,472 PD separation mode: ¥417,888 |
Qwen-Plus-2025-12-01 | qwen-plus-2025-12-01 | MU1 x 4 | ¥216 | ¥104,472 |
Qwen-Plus-Character-2025-11-06 | qwen-plus-character-2025-11-06 | MU1 x 4 | ¥216 | ¥104,472 |
- Instruct - After deployment, the model performs inference in non-thinking mode.
- Thinking - After deployment, the model performs inference in thinking mode.
- PD separation mode - Reduces first-token latency and increases throughput. For models deployed in this mode, during inference the first-token computation (Prefill) and subsequent-token computation (Decode) — two computation phases — are split onto different compute nodes.
Response example¶meters
Click to view the details.
Click to view the details.
Parameter | Type | Description |
|---|---|---|
request_id | String | The ID of this request. |
output | Object | The detailed information 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 | Service display name. |
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 immediately process requests. |
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 | Model unit specification. |
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 account that created the deployment task. |
modifier | String | The UID of the account that last operated 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. |
Returned only 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 and cannot be used to conclude that the target 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 (such as |
pre_paid_info.auto_renewal_cycle | String | The auto-renewal cycle returned; returned when a value is available. |
pre_paid_instance_id | String | The identifier of the upfront instance, returned only when it has a value. It is not a deployment identifier and cannot replace |
Returned only for Model Unit (mu) deployments | ||
mu_capacity | Object | MU capacity details. The COUPLED mode contains |
pre_paid_info | Object | Upfront payment information. |
pre_paid_info.auto_renewal | Boolean | Enable auto-renewal. |
pre_paid_info.duration | Integer | Subscription duration in months. |
pre_paid_info.auto_renewal_duration | Integer | Auto renewal duration |
pre_paid_instance_id | String | The ID of the upfront instance. |
pre_paid_gmt_expired | String | The expiration time of the upfront instance. |
Returned only for provisioned throughput V2 (ptu_v2) deployments | ||
ptu_capacity | Object | PTU V2 capacity information. It contains the following fields:
|
pre_paid_info | Object | Upfront payment information. |
pre_paid_info.auto_renewal | Boolean | Enable auto-renewal. |
pre_paid_info.duration | Integer | Subscription duration in months. |
pre_paid_info.auto_renewal_duration | Integer | Auto renewal duration |
pre_paid_instance_id | String | The ID of the upfront instance. |
pre_paid_gmt_expired | String | The expiration time of the upfront instance. |
qpm_limit and tpm_limit are gateway rate limit settings (64-bit integers, which may exceed the request limit of the modification API). The default values are qpm_limit=600000 and tpm_limit=output_tpm × 100. They are not equal to the purchased input/output TPM and do not represent a guarantee of actual inference throughput. The gmt_create and gmt_modified strings do not include a timezone offset; do not treat them as UTC time on your own.Query a model deployment task
Request example
Request parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | Unique identifier for the deployed model. Get it from Create a Model Deployment Task or List Model Deployment Tasks. |
Response example¶meters
Click to view the details.
Click to view the details.
Response parameters
The response parameters are the same as those for creating a model deployment task. For more information, see the response parameters for Create a Model Deployment Task.List model deployment tasks
Request example
Request parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
page_no | Number | query | No | Page number. Default 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 example¶meters
Click to view the details.
Click to view the details.
Response parameters
Parameter | Type | Description |
|---|---|---|
page_no | Number | Page number of the query. |
page_size | Number | Page size of the query. |
total | Long | The total number of deployment tasks that match 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 description of the response parameters of creating a model deployment task. |
Update a model deployment task
- Scaling
- Modify the rate limits of a DTU deployment
- Update the model of a DTU deployment
dtu_capacity through this API: input and output TPM must be scaled up or down together (the range and combination limits are the same as those for creation). A success response only indicates that the request has been accepted (the status first changes to WAIT_PRE_PAID_BILLING_TO_SCALING); you must poll the details until the status becomes RUNNING and both the input and output capacities reach the target values.Request example
Scaling in COUPLED mode:plan can be omitted from the request body):Request parameters
Parameter | Type | Passing parameters | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | Unique identifier for the deployed model. |
capacity | Number | body | This parameter is required. | The target number of resource units after scaling. Required in COUPLED mode (non-PD disaggregated), and must be an integer multiple of |
prefill_capacity | Number | body | This parameter is required. | The target prefill capacity. Required in PD disaggregated mode. |
decode_capacity | Number | body | This parameter is required. | The target decode capacity. Required in PD disaggregated mode. |
dtu_capacity | Object | body | This parameter is required. | The target DTU capacity. Required when |
Response example¶meters
Click to view the details.
Click to view the details.
Response parameters
The response parameters are the same as those for creating a model deployment task. For more information, see the response parameters for Create a Model Deployment Task.Stop a deployed model
Request example
Request parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | Unique identifier for the deployed model. |
Response example¶meters
Click to view the details.
Click to view the details.
Response Parameters
The response parameters are the same as those for creating a model deployment task. For more information, see the response parameters for Create a Model Deployment Task.Restart a deployed model
Request example
Request parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | Unique identifier for the deployed model. Get it from Create a Model Deployment Task or List Model Deployment Tasks. |
Response example¶meters
Click to view the details.
Click to view the details.
After the service starts, the status isSTARTINGand then changes toRUNNING
Response Parameters
The response parameters are the same as those for creating a model deployment task. For more information, see the response parameters for Create a Model Deployment Task.Delete a model deployment task
Request Example
Request Parameters
Parameter | Type | Passing Parameters | Required | Description |
|---|---|---|---|---|
deployed_model | String | path | Yes | Unique identifier for the deployed model. |
Response Example and Parameters
Click to view the details.
Click to view the details.
Response Parameters
The response parameters are the same as those for creating a model deployment task. For more information, see the response parameters for Create a Model Deployment Task.Error responses
Response Parameters
Parameter | Type | Description |
|---|---|---|
request_id | String | System-generated ID for this request. |
code | String | Error code that identifies the error type. |
message | String | Error details for troubleshooting. |
Common Errors
Error Reason | Description |
|---|---|
| Parameter error. For example, a required parameter is missing, a parameter value is invalid, or template_id and deploy_spec are passed at the same time. |
| Insufficient permissions or resource does not exist. |
| The operation is not allowed in the current state. For example, scaling a service that is not in the RUNNING state, or deleting a service that is not in the STOPPED or FAILED state. |
| The current deployment plan does not support this operation. For example, cu deployments do not support stopping the service. |
| Insufficient resource stock. Cannot complete scaling or deployment. |
| Internal error. |
| The specified deployment task does not exist. |
| Operation conflict. For example, the service is performing another operation. |
| Insufficient quota (common for DTU pre-paid purchases). Check the available quota or contact support. |
| Insufficient resources. Deployment or scaling cannot be completed. Adjust the capacity or contact support. |
| The service is temporarily unavailable. Retry after a backoff. |