Model deployment

更新时间:
复制 MD 格式

You can deploy pre-trained platform models or your own fine-tuned models to obtain an independent, dedicated inference service. This service is designed to meet business needs for high concurrency, low latency, and other performance requirements.

Billing methods

Before you deploy a model, you can view the estimated hourly cost for different models in the Model Deployment console.
Note

The billing method cannot be changed after the service is created. To switch the billing method, you must unpublish the deployed model and then redeploy it.

Provisioned Throughput (PTU)

(High throughput and high performance)

Model Unit

(Custom performance metrics and resource isolation)

Token Usage

(Pay-as-you-go for fine-tuned models and performance validation)

Definition

A model deployment method that reserves platform resources to guarantee a specific Tokens Per Minute (TPM) throughput. No rate limiting is applied within the guaranteed quota.

A model deployment method that allocates computing power based on usage duration and the number of model units. Resources are dedicated.

A model deployment method where usage is metered based on the input and output tokens of each API call.

Advantages

  1. Provides stable throughput capacity, lower latency, and greater resource certainty for high-load production environments.

  2. Compared to token usage billing, Tokens Per Second (TPS) is typically 1.5 to 2.0 times higher.

  3. Supports auto-renewal.

  1. Performance metrics such as latency and throughput can be customized.

  2. Supports auto-renewal.

  3. Supports Prefill-Decode (PD) separation mode.

No charge if not used.

Supported models

Some pre-trained models

Some pre-trained models and all fine-tuned models

Some models fine-tuned with LoRA

Scenarios

  1. Intelligent customer service for a banking app (stable traffic, requires guaranteed concurrent experience).

  2. Real-time content moderation for a social media platform (requires stable processing of predictable pipeline tasks).

  3. Public cloud translation API (provides baseline service guarantee for standard plan users).

  1. E-commerce-specific fine-tuned large model (deploy a private model and manually scale out during sales promotions).

  2. Molecule screening model for a pharmaceutical company (requires dedicated resources for long-running tasks).

  3. Autonomous driving simulation (requires long-term continuous computation).

Validating the performance of a fine-tuned model

Billing diagram

image

image

image

Billing method

Billed based on usage duration and provisioned throughput.

Supports pay-as-you-go and daily subscription.

Billed based on usage duration and the number of model units.

Supports pay-as-you-go and monthly subscription.

Token usage by model

Supports pay-as-you-go.

Scaling method

You can manually increase or decrease throughput.

You can manually increase or decrease the number of model units.

You can submit a request in the console and wait for manual review.

Product constraints

  1. Subscription is billed daily. Early termination refunds are not available.

  2. If usage exceeds the purchased throughput within a time unit, the service automatically switches to the model invocation service provided by Model Studio.

For subscriptions, if you unsubscribe within the first month, the daily unit price (≈ monthly unit price / 30) is charged at a rate of 1.2 times the standard price.

  1. Only supports some models fine-tuned with LoRA.

  2. Resources are automatically released if not used for one month.

To view the token usage and call history for a single invocation, go to Model Monitoring.

Billing details

Time-based billing (Provisioned Throughput)

Cost = Usage Duration × (Input TPM Unit Price × Input TPM + Output TPM Unit Price × Output TPM)

For the pay-as-you-go method, usage is billed hourly, and the unit price is based on the hourly rates in the table below. For the subscription method, usage is billed daily, and the unit price is based on the daily rates in the table below.

  • Subscription orders take effect immediately after payment. An N-day subscription is valid until 23:59 on the Nth day. If an order is placed after 22:00, the expiration date is automatically extended by one day.

  • After a subscription order expires, the service is stopped after a 2-hour grace period. After the service is stopped, the resources are retained for 14 hours and then released.

  • Subscription orders cannot be terminated early.

  • For the pay-as-you-go method, if your account has an overdue payment, the deployed resources are retained and continue to be billed for 24 hours, during which the service remains available. After 24 hours, the system stops billing, and the model deployment enters an overdue state. The underlying resources are deleted, but the model deployment task is retained. After you pay the overdue amount, the system reallocates resources, restores the service, and resumes billing. To stop incurring charges, you must delete the model deployment task. Billing stops after the task is successfully deleted.

If the model input exceeds the maximum input tokens or the purchased TPM, the call automatically switches to the pay-as-you-go mode for the current model. In this case, inference performance may decrease and will be subject to the public traffic control of the current snapshot model in the workspace. Costs are charged based on the model invocation (pay-as-you-go) standard.

  • In this case, the API call returns a header that contains x-dashscope-ptu-overflow:true.

  • To view TPM statistics, go to Model Monitoring (Beijing).

For the specific refund rules for scale-in scenarios (downgrades), see Refund rules for downgrades.

Qwen

Model name

Model code

Max input tokens

Pay-as-you-go input

Per 10k TPM/hour

Pay-as-you-go output

Per 1k TPM/hour

Subscription input

Per 10k TPM/day

Subscription output

Per 1k TPM/day

Qwen3.7-Max-2026-05-20

qwen3.7-max-2026-05-20

256K

CNY 28.8

CNY 8.64

CNY 345.6

CNY 103.68

Qwen3.7-Plus-2026-05-26

qwen3.7-plus-2026-05-26

256K

CNY 4.8

CNY 1.92

CNY 57.6

CNY 23.04

Qwen3.6-Plus-2026-04-02

qwen3.6-plus-2026-04-02

128K

CNY 4.8

CNY 2.88

CNY 57.6

CNY 34.56

Qwen3.5-Plus-2026-04-20

qwen3.5-plus-2026-04-20

128K

CNY 1.92

CNY 1.15

CNY 23.04

CNY 13.82

Qwen3-Max-2025-09-23

qwen3-max-2025-09-23

128K

CNY 7.68

CNY 3.08

CNY 92.16

CNY 36.96

Qwen-Flash-2025-07-28

qwen-flash-2025-07-28

128K

CNY 0.36

CNY 0.36

CNY 4.32

CNY 4.32

Qwen-Plus-2025-12-01

qwen-plus-2025-12-01

128K

CNY 1.92

Non-thinking mode: CNY 0.48

Thinking mode: CNY 1.92

CNY 23.04

Non-thinking mode: CNY 5.76

Thinking mode: CNY 23.04

DeepSeek

Model name

Model code

Max input tokens

Pay-as-you-go input

Per 10k TPM/hour

Pay-as-you-go output

Per 1k TPM/hour

Subscription input

Per 10k TPM/day

Subscription output

Per 1k TPM/day

DeepSeek-v4-Flash

deepseek-v4-flash

256K

CNY 3.6

CNY 0.72

CNY 43.2

CNY 8.64

DeepSeek-v4-Pro

deepseek-v4-pro

256K

CNY 43.2

CNY 8.64

CNY 518.4

CNY 103.68

DeepSeek-v3.2

deepseek-v3.2

64K

CNY 7.2

CNY 1.08

CNY 86.4

CNY 12.96

DeepSeek-v3

deepseek-v3

64K

CNY 7.2

CNY 2.88

CNY 86.4

CNY 34.56

Qwen-VL

Model name

Model code

Max input tokens

Pay-as-you-go input

Per 10k TPM/hour

Pay-as-you-go output

Per 1k TPM/hour

Subscription input

Per 10k TPM/day

Subscription output

Per 1k TPM/day

Qwen3-VL-Plus-2025-09-23

qwen3-vl-plus-2025-09-23

128K

CNY 2.4

CNY 2.4

CNY 28.8

CNY 28.8

More models

Model name

Model code

Max input tokens

Pay-as-you-go input

Per 10k TPM/hour

Pay-as-you-go output

Per 1k TPM/hour

Subscription input

Per 10k TPM/day

Subscription output

Per 1k TPM/day

GLM-5.1

glm-5.1

64K

CNY 21.6

CNY 8.64

CNY 259.2

CNY 103.68

Time-based billing (Model Unit)

Cost = Usage Duration (hours) × Number of Model Units × Model Unit Price

For the pay-as-you-go method, the "Model Unit Price" is the "Hourly Price" from the table below. For the monthly subscription method, the formula is: Number of Months × Number of Model Units × Monthly Price.

  • For subscriptions, if you unsubscribe within the first month, the daily unit price (≈ monthly unit price / 30) is charged at 1.2 times the standard rate. Usage for less than a day is billed as a full day.

Note

For the Model Unit pay-as-you-go method, computing power resources are allocated on a first-come, first-served basis. A full refund is issued if the purchase is unsuccessful.

Text generation

Qwen

Model name

Model code

Model unit specification

Hourly price (CNY)

Minimum billing unit: minute

Monthly price (CNY)

Minimum billing unit: day

Qwen3.7-Plus-2026-05-26

qwen3.7-plus-2026-05-26

MU3 x 8

CNY 1,096

CNY 527,752

Qwen3.6-35B-A3B

qwen3.6-35b-a3b

MU8 x 1

CNY 47

CNY 22,400

MU9 x 1

CNY 51

CNY 24,600

Qwen3.6-27B

qwen3.6-27b

MU9 x 1

CNY 51

CNY 24,600

Qwen3.6-Flash-2026-04-16

qwen3.6-flash-2026-04-16

MU1 x 2

CNY 108

CNY 52,236

Qwen3.6-Plus-2026-04-02

qwen3.6-plus-2026-04-02

MU1 x 8

MU1 x 16 (PD separation mode)

CNY 432

PD separation mode: CNY 864

CNY 208,944

PD separation mode: CNY 417,888

Qwen3.5-397B-A17B

qwen3.5-397b-a17b

MU2 x 8

CNY 504

CNY 240,288

MU3 x 8

MU3 x 16 (PD separation mode)

CNY 1,096

PD separation mode: CNY 2,192

CNY 527,752

PD separation mode: CNY 1,055,504

MU6 x 16

CNY 400

CNY 193,424

Qwen3.5-122B-A10B

qwen3.5-122b-a10b

MU1 x 4

CNY 216

CNY 104,472

MU2 x 8

CNY 504

CNY 240,288

MU6 x 16

CNY 400

CNY 193,424

MU9 x 2

CNY 102

CNY 49,200

Qwen3.5-35B-A3B

qwen3.5-35b-a3b

MU1 x 2

CNY 108

CNY 52,236

MU2 x 8

CNY 504

CNY 240,288

MU8 x 1

CNY 47

CNY 22,400

MU9 x 1

CNY 51

CNY 24,600

Qwen3.5-27B

qwen3.5-27b

MU9 x 1

CNY 51

CNY 24,600

Qwen3.5-9B

qwen3.5-9b

MU8 x 1

CNY 47

CNY 22,400

MU9 x 1

CNY 51

CNY 24,600

Qwen3.5-Flash-2026-02-23

qwen3.5-flash-2026-02-23

MU1 x 2

CNY 108

CNY 52,236

Qwen3.5-Plus-2026-02-15

qwen3.5-plus-2026-02-15

MU1 x 16 (PD separation mode)

PD separation mode: CNY 864

PD separation mode: CNY 417,888

MU3 x 8

MU3 x 16 (PD separation mode)

CNY 1,096

PD separation mode: CNY 2,192

CNY 527,752

PD separation mode: CNY 1,055,504

Qwen3-235B-A22B-Instruct-2507

qwen3-235b-a22b-instruct-2507

MU1 x 4

CNY 216

CNY 104,472

MU2 x 8

CNY 504

CNY 240,288

Qwen3-Next-80B-A3B-Instruct

qwen3-next-80b-a3b-instruct

MU1 x 2

CNY 108

CNY 52,236

Qwen3-32B

qwen3-32b

MU1 x 4

CNY 216

CNY 104,472

MU6 x 4

CNY 100

CNY 48,356

Qwen3-30B-A3B

qwen3-30b-a3b

MU9 x 2

CNY 102

CNY 49,200

Qwen3-30B-A3B-Instruct-2507

qwen3-30b-a3b-instruct-2507

MU1 x 4

CNY 216

CNY 104,472

MU2 x 8

CNY 504

CNY 240,288

Qwen3-8B

qwen3-8b

MU1 x 2

CNY 108

CNY 52,236

MU2 x 2

CNY 126

CNY 60,072

MU5 x 1

CNY 21

CNY 10,139

Qwen3-4B

qwen3-4b

MU1 x 2

CNY 108

CNY 52,236

MU5 x 1

CNY 21

CNY 10,139

Qwen3-1.7B

qwen3-1.7b

MU1 x 2

CNY 108

CNY 52,236

MU5 x 1

CNY 21

CNY 10,139

Qwen3-Embedding-0.6B

qwen3-embedding-0.6b

MU5 x 1

CNY 21

CNY 10,139

MU6 x 1

CNY 25

CNY 12,089

Qwen3-MoE-Rerank-0.6B

qwen3-moe-rerank-0.6b

MU5 x 1

CNY 21

CNY 10,139

Qwen3-Rerank-0.6B

qwen3-rerank-0.6b

MU5 x 1

CNY 21

CNY 10,139

MU6 x 1

CNY 25

CNY 12,089

Qwen3-Max-2025-09-23

qwen3-max-2025-09-23

MU2 x 8

CNY 504

CNY 240,288

MU3 x 8

CNY 1,096

CNY 527,752

Qwen3-Rerank

qwen3-rerank

MU5 x 1

CNY 21

CNY 10,139

Qwen2.5-72B

qwen2.5-72b-instruct

MU1 x 4

CNY 216

CNY 104,472

Qwen2.5-Open-Source-32B

qwen2.5-32b-instruct

MU1 x 4

CNY 216

CNY 104,472

Qwen2.5-open-source-14B

qwen2.5-14b-instruct

MU1 x 2

CNY 108

CNY 52,236

Qwen2.5-7B

qwen2.5-7b-instruct

MU1 x 2

CNY 108

CNY 52,236

MU5 x 1

CNY 21

CNY 10,139

Qwen2.5-3B

qwen2.5-3b-instruct

MU5 x 1

CNY 21

CNY 10,139

Qwen-Flash-2025-07-28

qwen-flash-2025-07-28

MU1 x 4

CNY 216

CNY 104,472

Qwen-Plus-2025-07-28

qwen-plus-2025-07-28

MU1 x 4

MU1 x 16 (PD separation mode)

CNY 216

PD separation mode: CNY 864

CNY 104,472

PD separation mode: CNY 417,888

Qwen-Plus-2025-12-01

qwen-plus-2025-12-01

MU1 x 4

CNY 216

CNY 104,472

GLM

Model name

Model code

Model unit specification

Hourly price (CNY)

Minimum billing unit: minute

Monthly price (CNY)

Minimum billing unit: day

GLM-5.1

glm-5.1

MU2 x 8

MU2 x 16 (PD separation mode)

CNY 504

PD separation mode: CNY 1,008

CNY 240,288

PD separation mode: CNY 480,576

MU3 x 16 (PD separation mode)

PD separation mode: CNY 2,192

PD separation mode: CNY 1,055,504

MU6 x 16

CNY 400

CNY 193,424

GLM-5

glm-5

MU3 x 16 (PD separation mode)

PD separation mode: CNY 2,192

PD separation mode: CNY 1,055,504

GLM-4.7

glm-4.7

MU6 x 32 (PD separation mode)

PD separation mode: CNY 800

PD separation mode: CNY 386,848

DeepSeek

Model name

Model code

Model unit specification

Hourly price (CNY)

Minimum billing unit: minute

Monthly price (CNY)

Minimum billing unit: day

DeepSeek-v4-Flash

deepseek-v4-flash

MU1 x 8

CNY 432

CNY 208,944

DeepSeek-v3.2

deepseek-v3.2

MU2 x 16 (PD separation mode)

PD separation mode: CNY 1,008

PD separation mode: CNY 480,576

More models

Model name

Model code

Model unit specification

Hourly price (CNY)

Minimum billing unit: minute

Monthly price (CNY)

Minimum billing unit: day

MiniMax-M2.5

MiniMax-M2.5

MU1 x 16 (PD separation mode)

PD separation mode: CNY 864

PD separation mode: CNY 417,888

Kimi-K2.5

kimi-k2.5

MU2 x 8

CNY 504

CNY 240,288

Model types:

  • Instruct - The deployed model performs inference in non-thinking mode.

  • Thinking - The deployed model performs inference in thinking mode.

Model deployment types:

  • PD separation mode - Reduces first-token latency and improves throughput.

    In this deployment mode, the model inference process splits the first-token calculation (Prefill) and subsequent token calculation (Decode) stages to run on different compute nodes.

Multimodal

Qwen-VL

Model name

Model code

Model unit specification

Hourly price (CNY)

Minimum billing unit: minute

Monthly price (CNY)

Minimum billing unit: day

Qwen3-VL-235B-A22B-Instruct

qwen3-vl-235b-a22b-instruct

MU1 x 4

CNY 216

CNY 104,472

Qwen3-VL-235B-A22B-Thinking

qwen3-vl-235b-a22b-thinking

MU1 x 4

CNY 216

CNY 104,472

Qwen3-VL-32B-Instruct

qwen3-vl-32b-instruct

MU2 x 8

CNY 504

CNY 240,288

Qwen3-VL-8B-Instruct

qwen3-vl-8b-instruct

MU1 x 2

CNY 108

CNY 52,236

Qwen3-VL-4B-Instruct

qwen3-vl-4b-instruct

MU1 x 2

CNY 108

CNY 52,236

Qwen3-VL-2B-Instruct

qwen3-vl-2b-instruct

MU5 x 1

CNY 21

CNY 10,139

Qwen3-VL-Embedding-2B

qwen3-vl-embedding-2b

MU5 x 1

CNY 21

CNY 10,139

Qwen3-VL-Flash-2025-10-15

qwen3-vl-flash-2025-10-15

MU1 x 4

CNY 216

CNY 104,472

Qwen3-VL-Plus-2025-09-23

qwen3-vl-plus-2025-09-23

MU1 x 4

CNY 216

CNY 104,472

Qwen-VL-Max-2025-08-13

qwen-vl-max-2025-08-13

MU6 x 4

CNY 100

CNY 48,356

Qwen-VL-OCR-2025-11-20

qwen-vl-ocr-2025-11-20

MU6 x 4

CNY 100

CNY 48,356

Qwen Omni

Model name

Model code

Model unit specification

Hourly price (CNY)

Minimum billing unit: minute

Monthly price (CNY)

Minimum billing unit: day

Qwen3.5-Omni-Flash

qwen3.5-omni-flash

MU8 x 1

CNY 47

CNY 22,400

MU9 x 1

CNY 51

CNY 24,600

Qwen3.5-Omni-Plus

qwen3.5-omni-plus

MU9 x 8

CNY 408

CNY 196,800

Model types:

  • Instruct - The deployed model performs inference in non-thinking mode.

  • Thinking - The deployed model performs inference in thinking mode.

  • Instruct/Thinking - You can choose whether to enable thinking mode when deploying the model.

Speech synthesis

CosyVoice

Model name

Model code

Model unit specification

Hourly price (CNY)

Monthly price (CNY)

cosyvoice-v3-flash

cosyvoice-v3-flash

MU5

CNY 21

CNY 10,139

By model token usage

Cost = Number of Input Tokens × Input Unit Price + Number of Output Tokens × Output Unit Price (Minimum billing unit: 1 token)

  • Billing by model token usage is only supported after you have completed Supervised Fine-Tuning (SFT) for the following foundation models and you have obtained a custom model.

Qwen

Foundation model

Model code

Input

CNY/1k tokens

Output

CNY/1k tokens

Qwen3-32B

qwen3-32b

CNY 0.002

Non-thinking mode: CNY 0.008

Thinking mode: CNY 0.02

Qwen3-14B

qwen3-14b

CNY 0.001

Non-thinking mode: CNY 0.004

Thinking mode: CNY 0.01

Qwen3-8B

qwen3-8b

CNY 0.0005

Non-thinking mode: CNY 0.002

Thinking mode: CNY 0.005

Qwen2.5-72B

qwen2.5-72b-instruct

CNY 0.004

CNY 0.012

Qwen2.5-32B

qwen2.5-32b-instruct

CNY 0.002

CNY 0.006

Qwen2.5-Open-Source-14B

qwen2.5-14b-instruct

¥0.001

CNY 0.003

Qwen2.5-Open-Source-7B

qwen2.5-7b-instruct

CNY 0.0005

CNY 0.001

Qwen-VL

Foundation model

Model code

Input

CNY/1k tokens

Output

CNY/1k tokens

Qwen3-VL-8B-Instruct

qwen3-vl-8b-instruct

CNY 0.0005

CNY 0.002

Qwen2.5-VL-72B

qwen2.5-vl-72b-instruct

CNY 0.016

CNY 0.048

Qwen2.5-VL-32B

qwen2.5-vl-32b-instruct

CNY 0.008

CNY 0.024

Qwen2.5-VL-7B

qwen2.5-vl-7b-instruct

CNY 0.002

CNY 0.005

To deploy more models, see this solution and choose the most suitable deployment plan for your business needs.

Deployment method

You can deploy models in the console by following these steps:

If you receive a permission error, see What do I do if I receive a permission error during deployment?
  1. Go to the Model Deployment console.

image

image

  1. Enter a service name, select a model and billing method, leave the other settings at their default values, and click Confirm.

    You must first complete model fine-tuning before you can deploy most models.
  1. When the deployment status is Running, the model is successfully deployed.

Important

Charges are incurred after the model is successfully deployed.

Deployment configuration

Model unit

Configuration

Details

Service Name

The custom name of the deployment service.

Select Model

Select the model to deploy, including pre-trained platform models and fine-tuned models.

Model Unit Type

Select the deployment specification. Different specifications correspond to different computing power and performance.

Number of Replicas

Set the initial number of deployment replicas, which affects the service's concurrent processing capability.

Deployment Template

Select a deployment template, such as "Single-Machine Deployment". Different templates correspond to different resource configuration plans. This is only available in the model unit billing mode.

Configure Model Inference Mode

When some models are deployed using the Model Unit method, you can configure the inference mode, maximum context length, and other settings.

  • Instruct - The deployed model performs inference in non-thinking mode.

  • Thinking - The deployed model performs inference in thinking mode.

Maximum Context

This setting is supported for the Model Unit deployment mode of some models. The maximum context length is based on the model type.

Service Throttling

This setting is supported for the Model Unit deployment mode of some models. You can limit the RPM and TPM of model calls.

Deployment list page

After a successful deployment, you can view and manage all deployed services on the deployment list page. The page contains the following information:

  • Service Name: The name of the deployment service. Click the name to view deployment details.

  • Model Name: The model used for the deployment.

  • Model Code: A unique identifier generated after the model is successfully deployed. It is used to specify the model in API calls.

  • Deployment Status/Event Status: Includes states such as Pending Deployment, Deploying, Running, Deployment Failed, Unpublishing, Service Paused, Stopped, Deleting, Unsubscribed/Overdue, Resuming, Running (Upgrading/Downgrading), and Running (Upgrade/Downgrade Failed).

  • Billing Method: The current billing method for the deployment service.

  • Deployment Details: Configuration information such as model unit type and number of replicas.

  • Rate Limiting Details: Displays the rate limiting configuration for the current deployment service, such as requests per minute (RPM) and tokens per minute (TPM).

  • Service Time: Displays the creation and expiration times of the deployment service.

  • Operation: Depending on the deployment status and billing method, you can perform operations such as Update, Monitoring, Scaling, Renewal, Unpublish, Delete, and Experience.

Post-deployment calls

After a model is successfully deployed, you can call it using OpenAI compatible, Dashscope, and Assistant SDK.

When calling a successfully deployed model, the value of model should be the model code generated after the model is successfully deployed. Go to the Model Deployment console (Beijing) to obtain the Model Code.

image

The following example code shows how to call a fine-tuned qwen3-8b model:

Note

Model attributes, such as support for non-streaming output and structured output, are consistent with those of the pre-fine-tuned model.

When calling a fine-tuned deep thinking model, we recommend that you align the use of deep thinking with the fine-tuning data format:

  • If the fine-tuning data includes deep thinking, enable the enable_thinking parameter when calling the model.

  • If the fine-tuning data does not include deep thinking, do not enable the enable_thinking parameter when calling the model.

DashScope

import os
import dashscope

messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Who are you?"},
]
response = dashscope.Generation.call(
    # If the environment variable is not configured, replace the next line with: api_key="sk-xxx",
    api_key=os.getenv("DASHSCOPE_API_KEY"),
    model="qwen3-14b-xxx-xxx",  # Replace with the code generated after the model is successfully deployed
    messages=messages,
    result_format="message",
    enable_thinking=False,
)
print(response)

OpenAI compatible interface

import os
from openai import OpenAI


client = OpenAI(
    # If the environment variable is not configured, replace the next line with: api_key="sk-xxx",
    api_key=os.getenv('DASHSCOPE_API_KEY'),
    base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)

completion = client.chat.completions.create(
    model="qwen3-14b-xxx-xxx",  # Replace with the code generated after the model is successfully deployed
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Who are you?"},
    ],
    extra_body={"enable_thinking": False},
)
print(completion)

Scale deployment services

  • Provisioned Throughput (Time-based): Click the Scaling button to manually adjust the number of instances. For specific refund rules for downgrades, see Refund rules for downgrades.

  • Model Unit (Time-based): Click the Scaling button to manually adjust the number of instances.

  • Token-based Invocation: Click the Scale Out button, fill out and submit the scale-out request form, and wait for manual review.

You can also click the Scaling Configuration button in the Operation column to configure auto-scaling policies, including scaling thresholds, minimum/maximum number of replicas, and scheduled scaling.

Unpublish a service

Go to the Model Deployment console, find the deployment service to stop, and click the corresponding operation based on the billing method:

  • Model Unit (Subscription): Click Deactivate and confirm.

  • Pay-as-you-go: Click Delete and confirm.

Billing stops after the operation is complete.

image

Other operations

In addition to unpublishing, the Operation column on the deployment list page supports the following operations:

  • Update: Update the model version of a deployed service. You can update all at once or in batches (canary release).

  • Delete: Pay-as-you-go services can be deleted directly to stop billing.

  • Renewal: Subscription services can be renewed to extend the service time. Auto-renewal is supported.

  • Purchase Capacity Package: Purchase a capacity package for a provisioned throughput deployment.

FAQ

Can I upload and deploy my own models?

You can import some open source models in the My Models console (Beijing). For a detailed list of supported models, see Model import.

In addition, Alibaba Cloud Platform for AI (PAI) provides the functionality to deploy your own models. For more information, see PAI-LLM large language model deployment.

What do I do if I get a permission error during deployment?

  1. If you see the message "You do not have the required permissions for this module", make sure your account has the Model Deployment - Operation permission on the permission management page of the workspace.

    PixPin_2025-11-27_15-09-44

    If you cannot perform the operation, contact your organization or IT administrator to add the required permissions or to check for permission issues.

  2. If the deployment fails with the error "Workspace xxx does not have deployment privilege for model xxxx", go to the Workspace Management page in Model Studio and add the deployment permission for the corresponding model to the workspace.

    API call error: Workspace xxx does not have deployment privilege for model xxxx.

    PixPin_2025-11-27_15-03-57

    PixPin_2025-11-27_15-06-41

    If you receive a permission error, contact your organization or IT administrator to add the required permissions or to perform the operation for you.

How do I switch to a different billing method?

You must release the original resources and then create new resources with the desired billing method.

We recommend the following steps to switch:

  1. Deploy new resources using the desired billing method.

  2. Switch the API and test the service availability.

  3. Unpublish and release the original resources.