Skip to main content

Rate limiting

Model Studio rate limiting rules and the rate limits of each model. Major text generation models use dynamic rate limiting (soft rate limiting): the TPM rate limit value is adjusted monthly based on your Model Studio monthly consumption tier, and the actual available TPM is no lower than the rate limit value. Other models and regions use static rate limiting: requests are rejected when the limit is exceeded and typically recover automatically within one minute. Rate limits are applied at the account level, aggregating usage across RAM users, workspaces, and API keys.

Rate limiting rules

  • Account-level rate limiting: Rate limits are calculated at the root account level. The call volumes of all RAM users, workspaces, and API Keys under the account are combined.
  • Model-specific rate limiting: Rate limit quotas of different models are independent of each other. See the tables below for details.
  • Rate limiting types: Major generative models (such as qwen3.8-max, qwen3.8-flash, deepseek-v4-pro-0813, and kimi-k3) use dynamic rate limiting, where the TPM rate limit value is dynamically adjusted monthly based on the Bailian monthly consumption tier, and the actual available TPM is no lower than the rate limit value. For more information, see Dynamic rate limiting. Other models and regions use static rate limiting; for rules, see Static rate limiting rules.

Dynamic rate limiting

Dynamic rate limiting mechanism

Bailian applies a dynamic rate limiting mechanism to some models. The key points are as follows:
  • Rate limit: Determined by tier based on the user's monthly spending in Model Studio, serving as the guaranteed throughput baseline, and adjusted monthly.
  • Soft rate limiting: When the call volume reaches the rate limit, if the platform still has spare resources, rate limiting is not triggered, so the actual available TPM is no lower than the rate limit; the actual rate limit observed during calls may be higher than the rate limit, which is expected behavior.
  • Rate limit granularity: Per account + model. The call volume of all RAM sub-accounts, Workspaces, and API Keys under the primary account is combined into that account's TPM quota for the model, and they share the same limit.
  • Workspace: A separate rate limit can be set for a model; Workspaces without a separate setting share the account-level quota.
  • Error symptoms: When platform resources are insufficient, Model Studio protectively rejects some requests and returns a 429 error (with the error message Too many requests.). This type of error reflects the resource status on the platform side rather than a call volume issue on the user side; the service itself keeps running normally, rejected requests are not delivered and not billed, and you can simply retry later.
  • Error code distinction: Requests that are rejected without exceeding the rate limit return Throttling.ResourceExhausted; requests that exceed the rate limit continue to be attempted at a lower priority and return Throttling.ServiceOverloaded when rejected. For error handling suggestions, see Error codes.
  • More information: For Workspace rate limit settings, see Permission management.

Models and rate limit tiers

The TPM rate limit value is tiered based on the monthly consumption amount on the Bailian platform. The tiers for supported models in different regions are as follows (values are subject to the actual display in the console):
  • China (Beijing)
  • Singapore

Monthly spending on the Bailian platform:

Level 1 (current) ≤¥100,000

Level 2 ¥100,000~¥1,000,000

Level 3 >¥1,000,000

Supported models

TPM rate limit tier

qwen4-max

5 million

10 million

20 million

qwen3.8-max

5 million

10 million

20 million

qwen3.8-max-0902

1.5 million

1.5 million

1.5 million

qwen3.8-flash

5 million

10 million

20 million

qwen3.8-omni-flash

2 million

5 million

10 million

qwen3.8-2.4t-a95b

5 million

5 million

5 million

deepseek-v4.1-flash-1017

1.2 million

1.2 million

1.2 million

deepseek-v4.1-flash

1.2 million

1.2 million

1.2 million

deepseek-v4-pro-0813

1.2 million

10 million

20 million

kimi-k3.1-pro-prime

1.2 million

5 million

10 million

kimi-k3.1-pro

1.2 million

5 million

10 million

kimi-k3

1.2 million

5 million

10 million

glm-5.3

5 million

5 million

5 million

glm-5.3-prime

2 million

2 million

2 million

qwen3.8-27b

5 million

5 million

5 million

Take China (Beijing) as an example: if an account's Bailian consumption amount in the previous calendar month was ¥500,000, it falls into the Level 2 (¥100,000~¥1,000,000) tier, and the corresponding TPM rate limit value for qwen4-max is 10 million.

Quota display

Log in to the Bailian console. In the left-side navigation pane, choose Model rate limits to go to the model rate limits page. The model rate limits page is a read-only page that displays the models that support dynamic rate limiting, the current TPM rate limit value, and the Bailian consumption tier. The top of the page shows the current effective period (such as 2026-08-15 to 2026-09-15), last month's consumption (calculated by the previous calendar month, such as August 1 to August 31), and this month's consumption amount. You can click View consumption details to view consumption details, and click View rules to view the rate limit tier rules. The table below lists the TPM rate limit tiers for each model.
If the TPM rate limit value cannot meet your business needs, contact your account manager to apply for a quota increase.
image

Dynamic rate limit adjustment strategy

Rate limit tiers are dynamically adjusted according to the following rules:
  • Tiering basis: Bailian platform consumption amount.
  • Calculation cycle: Calculated by calendar-month billing cycle.
  • Notification: A notification is sent to the affected users on the 10th of each month.
  • Effective time: The new tier takes effect on the 15th of each month and is valid until the 15th of the following month.
  • Adjustment direction: Lower tier → higher tier (upgrade) or remain unchanged.

Static rate limits

The following lists the rate limits of each model by model category: For models marked with dynamic rate limits, the TPM rate limit adjusts with the Model Studio monthly spending tier. For more information, see Models and rate limit tiers. The other models use static rate limits. For the rules, see Static rate limit rules.

Static rate limit rules

Models not covered by dynamic rate limits use static rate limits. The rules are as follows:
  • Fixed rate limits: Each model has fixed RPM and TPM rate limits, and the limits of each model are independent of each other.
  • Second-level enforcement: In addition to the per-minute RPM/TPM, rate limiting may also be enforced at the per-second RPS (RPM/60) and TPS (TPM/60). A burst of requests within a short period may trigger rate limiting even if the per-minute limit is not exceeded.
  • Triggering and recovery: When a limit is exceeded, requests are rejected and a 429 error is returned. The limits usually recover automatically within one minute. For the classification of specific error messages, see Why is rate limiting triggered? and Error codes.

Text generation

Qwen language models

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
  • Japan (Tokyo)
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen4-maxDynamic rate limits
qwen3.8-max
Rate limiting does not apply when calling the service with the Batch API.
Dynamic rate limits
qwen3.8-max-0902Dynamic rate limits
qwen3.8-flash
Rate limiting does not apply when calling the service with the Batch API.
Dynamic rate limits
qwen3.7-max
Rate limiting does not apply when calling the service with the Batch API.
30,0005,000,000
qwen3.7-max-2026-06-086001,000,000
qwen3.7-max-2026-05-206001,000,000
qwen3.7-max-preview60500,000
qwen3.7-max-2026-05-1760500,000
qwen-max
Rate limiting does not apply when calling the service with the Batch API.
1,2001,000,000
qwen3.7-plus30,0005,000,000
qwen3.7-plus-2026-05-266001,000,000
qwen3.6-plus
Rate limiting does not apply when calling the service with the Batch API.
30,0005,000,000
qwen3.6-plus-2026-04-026001,000,000
qwen3.7-flash
Rate limiting does not apply when calling the service with the Batch API.
30,0005,000,000
qwen3.7-flash-2026-07-1530,0005,000,000
qwen3.6-flash
Rate limiting does not apply when calling the service with the Batch API.
30,00010,000,000
qwen3.6-flash-2026-04-166001,000,000
qwen3.5-plus
Rate limiting does not apply when calling the service with the Batch API.
30,0005,000,000
qwen3.5-plus-2026-04-206001,000,000
qwen3.5-plus-2026-02-156001,000,000
qwen-plus
Rate limiting does not apply when calling the service with the Batch API.
30,0005,000,000
qwen-plus-latest
Rate limiting does not apply when calling the service with the Batch API.
15,0001,200,000
qwen-plus-2025-12-011201,000,000
qwen-plus-2025-07-14(qwen-plus-0714)60100,000
qwen-plus-2025-04-28(qwen-plus-0428)601,000,000
qwen-plus-2025-01-25(qwen-plus-0125)60150,000
qwen3.5-flash
Rate limiting does not apply when calling the service with the Batch API.
30,00010,000,000
qwen3.5-flash-2026-02-236001,000,000
qwen-flash
Rate limiting does not apply when calling the service with the Batch API.
30,00010,000,000
qwen-flash-2025-07-28601,000,000
qwen-long
Rate limiting does not apply when calling the service with the Batch API.
1,2003,000,000

Qwen VL (visual understanding/image-to-text)

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3-vl-plus
Rate limiting does not apply when calling the service with the Batch API.
3,0005,000,000

Qwen Omni

  • China (Beijing)
  • Singapore
  • Hong Kong (China)
  • Japan (Tokyo)
  • Germany (Frankfurt)
  • US (Virginia)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3.8-omni-flash30000Dynamic rate limits
qwen3.5-omni-plus60100,000
qwen3.5-omni-plus-2026-03-1560100,000
qwen3.5-omni-flash60100,000
qwen3.5-omni-flash-2026-03-1560100,000
qwen3-omni-flash60100,000

Qwen Omni-Realtime

When connected via WebSocket, RPM limits the number of connection requests per minute. Multiple rounds of responses within the same connection are not counted separately; reconnections are counted as new requests. Currently, there is no separate limit on the total number of connections kept active at the same time, but the TPM limit still applies. For the limits of each model, see the table below.
  • China (Beijing)
  • Singapore
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3.8-omni-flash-realtime602,000,000
qwen3.5-omni-plus-realtime60100,000
qwen3.5-omni-plus-realtime-2026-03-1560100,000
qwen3.5-omni-flash-realtime60100,000
qwen3.5-omni-flash-realtime-2026-03-1560100,000
qwen3-omni-flash-realtime-2025-09-1560100,000

Qwen OCR (text extraction)

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3.5-ocr6,00030,000,000
qwen-vl-ocr
Rate limiting does not apply when calling the service with the Batch API.
6006,000,000
qwen-vl-ocr-2025-11-206,00030,000,000
qwen-vl-ocr-2024-10-286006,000,000

Qwen Audio (audio understanding)

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen-audio-turbo120100,000
qwen-audio-turbo-latest60No TPM limit

Qwen Coder

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3-coder-flash5,0005,000,000
qwen3-coder-flash-2025-07-28601,000,000

Qwen translation models

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen-mt-plus6025,000
qwen-mt-flash6035,000
qwen-mt-lite60100,000

Qwen-MT-Uni

  • China (Beijing)

Model name

Rate limits (triggered if any value is exceeded)

Requests per minute (RPM)

Tokens per minute (TPM)

Asynchronous concurrency

Asynchronous queue size

qwen-mt-uni

162

2,592,000

3

500

Qwen data mining models

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen-doc-turbo6003,000,000

Qwen deep research models

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen-deep-research1201,200,000

Tongyi Xiaomi dialogue analysis models

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
tongyi-xiaomi-analysis-flash6001,000,000
tongyi-xiaomi-analysis-pro6001,000,000

Qwen language models (open-source editions)

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3.8-2.4t-a95bDynamic rate limits
qwen3.8-27bDynamic rate limits
qwen3.6-35b-a3b6001,000,000
qwen3.6-27b6001,000,000
qwen3.5-397b-a17b6001,000,000
qwen3.5-122b-a10b6001,000,000
qwen3.5-27b6001,000,000
qwen3.5-35b-a3b6001,000,000

DeepSeek

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
  • Japan (Tokyo)
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
deepseek-v4.1-flash-1017Dynamic rate limits
deepseek-v4.1-flashDynamic rate limits
deepseek-v4-pro15,0001,200,000
deepseek-v4-pro-0813Dynamic rate limits
deepseek-v4-flash-073115,0001,200,000
deepseek-r1-distill-qwen-1.5b60100,000
deepseek-r1-distill-llama-70b60100,000

DeepSeek direct supply from SiliconFlow

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
siliconflow/deepseek-v3.2500500,000
siliconflow/deepseek-v3.1-terminus500500,000
siliconflow/deepseek-r1-0528500500,000
siliconflow/deepseek-v3-0324500500,000

DeepSeek direct supply from Kuaishou Wanqing

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
vanchin/deepseek-v3.2-think30600,000
vanchin/deepseek-v3.1-terminus5001,000,000
vanchin/deepseek-r15001,000,000
vanchin/deepseek-v35001,000,000
vanchin/deepseek-ocr5001,000,000
vanchin/deepseek-v4-pro60300,000
vanchin/deepseek-v4-pro-081330600,000
vanchin/deepseek-v4.1-flash30600,000

Kimi

  • China (Beijing)
  • US (Virginia)
  • Germany (Frankfurt)
  • Japan (Tokyo)
  • Singapore
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
kimi-k3.1-pro15,000Dynamic rate limits
kimi-k3.1-pro-prime15,000Dynamic rate limits
kimi-k3Dynamic rate limits
kimi-k2.7-code5001,000,000
kimi-k2.65001,000,000
kimi-k2.55001,000,000

Kimi direct supply from Moonshot AI

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
kimi/kimi-k3.1-pro-highspeed500
Under the same Alibaba Cloud Bailian API Key, the 500 RPM rate limit quota is shared among the 7 models. That is, the total number of requests per minute for these 7 models combined cannot exceed 500.
3,000,000
Under the same Alibaba Cloud Bailian API Key, the 3,000,000 TPM rate limit quota is shared among the 7 models. That is, the total number of tokens consumed per minute by these 7 models combined cannot exceed 3,000,000.
kimi/kimi-k3.1-pro
kimi/kimi-k3
kimi/kimi-k2.7-code-highspeed
kimi/kimi-k2.7-code
kimi/kimi-k2.6
kimi/kimi-k2.5

GLM

  • China (Beijing)
  • US (Virginia)
  • Germany (Frankfurt)
  • Japan (Tokyo)
  • Singapore
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
glm-5.3Dynamic rate limits
glm-5.25002,000,000
glm-5.15001,000,000
glm-55001,000,000

GLM-Zhipu direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
ZHIPU/GLM-5.32003,000,000
ZHIPU/GLM-5.3-Flash2003,000,000
ZHIPU/GLM-5.3-FlashX2003,000,000
ZHIPU/GLM-5.22003,000,000
ZHIPU/GLM-5.12003,000,000
ZHIPU/GLM-52003,000,000

MiniMax

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
MiniMax-M2.55001,000,000

MiniMax-Xiyu Technology direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
MiniMax/MiniMax-M3.1-Flash20010,000,000
MiniMax/MiniMax-M350020,000,000
MiniMax/MiniMax-M2.750020,000,000
MiniMax/MiniMax-M2.550020,000,000
MiniMax/MiniMax-M2.150020,000,000

MiMo-Xiaomi direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
xiaomi/mimo-v2.6-pro-ultraspeed1005,000,000
xiaomi/mimo-v2.5-pro10010,000,000

Stepfun-StepFun direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
stepfun/step-3.7-flash50020,000,000
stepfun/step-5-preview50010,000,000

Unisound direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
unisound/unisound-u23003,000,000

Ling-Ant Digital direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
antdigital/Ling-3.1-flash30010,000,000

Xing direct supply

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
Xing/Xing4.1-Preview3001,000,000

Image Generation

Qwen (Qwen-Image)

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
  • Japan (Tokyo)
  • Hong Kong (China)

Model name

Rate limits (triggered if any value is exceeded)

Task submission API call limit

Number of concurrent processing tasks (concurrency)

qwen-image-3.0-pro

5 times/minute

No limit on the synchronous API / 10 for the asynchronous API

qwen-image-3.0

20 times/minute

No limit on the synchronous API / 10 for the asynchronous API

qwen-image-2.1-pro

20 times/minute

No limit on the synchronous API / 10 for the asynchronous API

qwen-image-2.1-turbo

120 times/minute

No limit on the synchronous API / 10 for the asynchronous API

qwen-image-2.0-pro

2 times/minute

No limit on the synchronous API

qwen-image-2.0-pro-2026-06-22

2 times/minute

No limit on the synchronous API

qwen-image-2.0-pro-2026-04-22

2 times/minute

No limit on the synchronous API

qwen-image-2.0-pro-2026-03-03

2 times/minute

No limit on the synchronous API

qwen-image-2.0

2 times/second

No limit on the synchronous API

qwen-image-2.0-2026-03-03

2 times/second

No limit on the synchronous API

qwen-mt-image-2.0

60 times/minute

No limit on the synchronous API / 2 for the asynchronous API

qwen-mt-image

1 time/second

No limit on the synchronous API / 2 for the asynchronous API

Text-to-Image-Z-Image

  • China (Beijing)
  • Singapore

Model name

Rate limits (triggered if any value is exceeded)

Requests per second (RPS)

Number of concurrent processing tasks (concurrency)

z-image-turbo

2

No limit on the synchronous API

Wanx

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)

Model name

Rate limits (triggered if any value is exceeded)

Requests per second (RPS)

Number of concurrent processing tasks (concurrency)

wan2.7-image-pro

5

5

wan2.7-image

5

5

wan2.6-image

5

5

wan2.6-t2i

1

5

wan2.5-t2i-preview

5

5

wan2.2-t2i-plus

2

2

wan2.2-t2i-flash

2

2

wanx2.1-t2i-plus

2

2

wanx2.1-t2i-turbo

2

2

wanx2.0-t2i-turbo

2

2

wan2.5-i2i-preview

5

5

wanx2.1-imageedit

2

2

wanx-v1

2

1

wanx-x-painting

2

1

wanx-sketch-to-image-lite

2

1

Image Editing and Generation

  • China (Beijing)

Model name

Rate limits (triggered if any value is exceeded)

Requests per second (RPS)

Number of concurrent processing tasks (concurrency)

shoemodel-v1

2

1

wanx-virtualmodel

2

1

wanx-style-repaint-v1

2

2

wanx-poster-generation-v1

2

1

virtualmodel-v2

2

1

image-instance-segmentation

2

1

image-erase-completion

2

1

Portrait Generation-FaceChain

  • China (Beijing)

Model name

Rate limits (triggered if any value is exceeded)

Requests per second (RPS)

Number of tasks being processed at the same time

facechain-facedetect

5

No limit on the synchronous API

facechain-finetune

1

1

Kling series

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Requests per second (RPS)Number of concurrent processing tasks (concurrency)
kling/kling-v3-omni-image-generation510
The seven models in the Kling series (image and video) share a concurrency of 10 under the same Model Studio API key. This means that the total number of running tasks for these seven models cannot exceed 10.
kling/kling-v3-image-generation

Vidu series

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Requests per minute (RPM) limitNumber of concurrent processing tasks (concurrency)
vidu/viduq3.1-fast_reference2image3005
Under the same Alibaba Cloud Bailian API Key, the models in the Vidu reference-based image generation series share 5 concurrent slots. That is, the total number of tasks in the running state for all these models combined cannot exceed 5.
vidu/vidu-image-lite_reference2image
vidu/vidu-image_reference2image
vidu/viduq3-fast_reference2image
vidu/viduq2-pro_reference2image
vidu/viduq2-fast_reference2image
vidu/vidu-image-pro_reference2image

Speech recognition

Qwen-Audio-ASR

  • China (Beijing)
  • Singapore

Model name

Requests per minute (RPM)

qwen-audio-3.1-asr-flash

600

qwen-audio-3.0-asr-flash

600

Qwen-Audio-ASR-Streaming

  • China (Beijing)
  • Singapore
ModelCalls per minute (RPM)
qwen-audio-3.1-asr-flash-streaming1200
qwen-audio-3.0-asr-flash-streaming

Qwen-Audio-ASR-Filetrans

  • China (Beijing)
  • Singapore

Model name

Requests per minute (RPM)

qwen-audio-3.1-asr-flash-filetrans

600

qwen-audio-3.0-asr-flash-filetrans

600

Qwen-Audio-ASR-Message

  • China (Beijing)
  • Singapore
ModelCalls per minute (RPM)
qwen-audio-3.1-asr-flash-message1200

Qwen3-ASR

  • China (Beijing)
  • Singapore
  • US (Virginia)
  • Qwen3-ASR-Flash-Filetrans
  • Qwen3-ASR-Flash

Model name

Requests per minute (RPM)

qwen3-asr-flash-filetrans

100

Qwen3-ASR-Realtime

  • China (Beijing)
  • Singapore

Model name

Requests per second (RPS)

qwen3-asr-flash-realtime

20

Fun-ASR

  • China (Beijing)
  • Singapore

Model name

Requests per minute (RPM)

fun-asr

600

fun-asr-flash-2026-06-15

Fun-ASR-Realtime

  • China (Beijing)
  • Singapore

Model name

Requests per second (RPS)

fun-asr-realtime

20

fun-asr-realtime-2026-02-28

fun-asr-flash-8k-realtime

fun-asr-flash-8k-realtime-2026-01-28

Paraformer

  • China (Beijing)

Model name

Requests per second (RPS)

paraformer-realtime-v2

20

paraformer-realtime-8k-v2

Model name

Requests per minute (RPM)

paraformer-v2

1,200

Model name

Requests per second (RPS)

Number of concurrent processing tasks (concurrency)

paraformer-8k-v2

20

100

Speech synthesis

Qwen-Audio-TTS

  • China (Beijing)
  • Singapore

Model name

Requests per minute (RPM)

qwen-audio-3.1-tts-plus

180

qwen-audio-3.1-tts-flash

180

qwen-audio-3.0-tts-plus

180

qwen-audio-3.0-tts-flash

180

CosyVoice

  • China (Beijing)
  • Singapore

Model name

Requests per second (RPS)

cosyvoice-v3.5-plus

3

cosyvoice-v3.5-flash

cosyvoice-v3-plus

cosyvoice-v3-flash

cosyvoice-v2

MiniMax (directly supplied by Xiyu Technology)

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Requests per minute (RPM)Characters consumed per minute
Input characters only
MiniMax/speech-2.8-hd2020,000
MiniMax/speech-02-hd2020,000
MiniMax/speech-2.8-turbo2020,000
MiniMax/speech-02-turbo2020,000

Qwen3-TTS

  • China (Beijing)
  • Singapore
  • Qwen3-TTS-Flash

Model name

Requests per minute (RPM)

qwen3-tts-flash

180

Qwen3-TTS-Realtime

  • China (Beijing)
  • Singapore
  • Qwen3-TTS-Flash-Realtime

Model name

Requests per minute (RPM)

qwen3-tts-flash-realtime

180

Sambert

  • China (Beijing)

Model Service

Requests per second (RPS)

Sambert series models

20

Audio tagging

Qwen-Audio-Captioner

  • China (Beijing)
Model nameRequests per minute (RPM)
qwen-audio-3.1-captioner600

Audio generation

Qwen-Audio-TTS-Next

  • China (Beijing)
  • Singapore
ModelCalls per minute (RPM)
qwen-audio-3.1-tts-next180

Voice conversation

Qwen-Audio-Live

You can keep up to 5 WebSocket connections open at the same time.

Qwen-Audio-Realtime

When connected via WebSocket, RPM limits the number of connection requests per minute. Multiple rounds of responses within the same connection are not counted separately; reconnections are counted as new requests. Currently, there is no separate limit on the total number of connections kept active at the same time, but the TPM limit still applies. For the limits of each model, see the table below.
  • China (Beijing)
  • Singapore
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen-audio-3.1-realtime-plus60100,000
qwen-audio-3.1-realtime-flash60100,000
qwen-audio-3.0-realtime-plus60100,000
qwen-audio-3.0-realtime-flash60100,000

Audio and video translation

Qwen3-LiveTranslate-Flash

  • China (Beijing)
  • Singapore
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3-livetranslate-flash100100,000
qwen3-livetranslate-flash-2025-12-01

Qwen-LiveTranslate-Flash-Realtime

When connected via WebSocket, RPM limits the number of connection requests per minute. Multiple rounds of responses within the same connection are not counted separately; reconnections are counted as new requests. Currently, there is no separate limit on the total number of connections kept active at the same time, but the TPM limit still applies. For the limits of each model, see the table below.
  • China (Beijing)
  • Singapore
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3.8-livetranslate-flash-realtime10100,000
qwen3.5-livetranslate-flash-realtime
qwen3.5-livetranslate-flash-realtime-2026-05-19

Voice cloning/design

Qwen-Audio-TTS/CosyVoice voice cloning/design

Qwen-Audio-TTS/CosyVoice voice cloning/design share one model and share the rate limit quota.
  • China (Beijing)
  • Singapore

Model name

Requests per second (RPS)

voice-enrollment

10

Qwen3-TTS voice cloning

  • China (Beijing)
  • Singapore

Model name

Requests per minute (RPM)

qwen-voice-enrollment

180

Music generation

Fun-Music

Fun-Music is available by invitation only. To request access, contact your account manager or submit a support ticket.
  • China (Beijing)

Model name

Requests per minute (RPM)

fun-music-preview

180

fun-music-v1

180

Video generation

HappyHorse series

  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)
  • Japan (Tokyo)

Model name

Rate limits (triggered if any value is exceeded)

Requests per second (RPS)

Number of concurrent processing tasks (concurrency)

happyhorse-1.1-t2v

5

5

happyhorse-1.1-i2v

5

5

happyhorse-1.1-r2v

5

5

happyhorse-1.0-t2v

5

5

happyhorse-1.0-i2v

5

5

happyhorse-1.0-r2v

5

5

happyhorse-1.0-video-edit

5

5

Wanxiang series

For the rate limits of wan3.0-video and wan3.0-video-prime, go to the Bailian console model square, switch to the region where you actually make the calls, and view the corresponding model details.
  • China (Beijing)
  • US (Virginia)
  • Singapore
  • Germany (Frankfurt)

Model name

Rate limits (triggered if any value is exceeded)

Requests per second (RPS)

Number of concurrent processing tasks (concurrency)

wan2.7-r2v-2026-06-12

5

5

wan2.7-t2v-2026-06-12

5

5

wan2.7-t2v-2026-04-25

5

5

wan2.7-t2v

5

5

wan2.6-t2v

5

5

wan2.5-t2v-preview

5

5

wan2.2-t2v-plus

2

2

wanx2.1-t2v-turbo

2

2

wanx2.1-t2v-plus

2

2

wan2.7-i2v-2026-04-25

5

5

wan2.7-i2v

5

5

wan2.6-i2v-flash

5

5

wan2.6-i2v

5

5

wan2.5-i2v-preview

5

5

wan2.2-i2v-flash

2

2

wan2.2-i2v-plus

2

2

wanx2.1-i2v-turbo

2

2

wanx2.1-i2v-plus

2

2

wan2.2-kf2v-flash

2

2

wanx2.1-kf2v-plus

2

2

wanx2.1-vace-plus

2

2

wan2.7-videoedit

5

5

wan2.7-r2v

5

5

wan2.6-r2v-flash

5

5

wan2.6-r2v

5

5

wan2.2-s2v-detect

5

No limit on the synchronous API

wan2.2-s2v

5

1

wan2.2-animate-move

5

1

wan2.2-animate-mix

5

1

Audio-driven talking portrait VideoRetalk

  • China (Beijing)

Model name

Requests per second (RPS)

Number of tasks being processed at the same time

videoretalk

1

1

At any given time, only 1 job is actually running, while other jobs in the queue are waiting.

Video style repainting

  • China (Beijing)

Model name

Requests per second (RPS)

Number of tasks being processed at the same time

video-style-transform

20

2

At any given time, only 1 job is actually running, while other jobs in the queue are waiting.

Aishi series

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Task submission API RPM limitNumber of concurrent processing tasks (concurrency)
pixverse/pixverse-lipsync3005
Under the same Alibaba Cloud Bailian API key, these 3 models share 5 concurrent requests. That is, the total number of running tasks across these 3 models cannot exceed 5.
pixverse/pixverse-motioncontrol300
pixverse/pixverse-upscale300
Model nameRate limits (triggered if any value is exceeded)
Requests per Minute (RPM)Number of concurrent processing tasks (concurrency)
pixverse/pixverse-c1-t2v3005
Under the same Alibaba Cloud Bailian API key, these 4 models share 5 concurrent requests. That is, the total number of running tasks across these 4 models cannot exceed 5.
pixverse/pixverse-c1-it2v
pixverse/pixverse-c1-kf2v
pixverse/pixverse-c1-r2v
pixverse/pixverse-v6-r2v-omni3005
Under the same Alibaba Cloud Bailian API key, these 7 models share 5 concurrent requests. That is, the total number of running tasks across these 7 models cannot exceed 5.
pixverse/pixverse-v6-max-t2v
pixverse/pixverse-v6-max-it2v
pixverse/pixverse-v6-t2v
pixverse/pixverse-v6-it2v
pixverse/pixverse-v6-kf2v
pixverse/pixverse-v6-r2v
pixverse/pixverse-v5.6-t2v3005
Under the same Alibaba Cloud Bailian API key, these 4 models share 5 concurrent requests. That is, the total number of running tasks across these 4 models cannot exceed 5.
pixverse/pixverse-v5.6-it2v
pixverse/pixverse-v5.6-kf2v
pixverse/pixverse-v5.6-r2v

Kling series

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Requests per second (RPS)Number of concurrent processing tasks (concurrency)
kling/kling-v3-omni-video-generation510
The seven models in the Kling series (image and video) share a concurrency of 10 under the same Model Studio API key. This means that the total number of running tasks for these seven models cannot exceed 10.
kling/kling-v3-turbo-video-generation
kling/kling-v3-video-generation
kling/kling-v4-video-generation
kling/kling-v4-omni-reference-video-generation

Vidu series

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Requests per second (RPS)Number of concurrent processing tasks (concurrency)
vidu/viduq3-ad_reference2video55
The concurrency quota is shared among the 20 models under the same Model Studio API key. The total number of running tasks for these 20 models cannot exceed 5.
vidu/viduq3-drama_reference2video5
vidu/viduq3-pro-fast_img2video5
vidu/viduq3-turbo_text2video5
vidu/viduq3-pro_text2video5
vidu/viduq2_text2video5
vidu/viduq3-turbo_img2video5
vidu/viduq3-pro_img2video5
vidu/viduq2-turbo_img2video5
vidu/viduq2-pro_img2video5
vidu/viduq2-pro-fast_img2video5
vidu/viduq3-turbo_start-end2video5
vidu/viduq3-pro_start-end2video5
vidu/viduq2-turbo_start-end2video5
vidu/viduq2-pro_start-end2video5
vidu/viduq3-mix_reference2video5
vidu/viduq3_reference2video5
vidu/viduq3-turbo_reference2video5
vidu/viduq2-pro_reference2video5
vidu/viduq2_reference2video5

MiniMax series

  • China (Beijing)

Model name

Rate limits (triggered if any value is exceeded)

Task submission API RPM limit

Number of concurrent processing tasks (concurrency)

MiniMax/MiniMax-H3

300

5

3D model generation

Tripo series

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
Task submission API RPM limitNumber of concurrent processing tasks (concurrency)
Tripo/Tripo-H3.130010
Tripo/Tripo-P1.03005
Tripo/Tripo-ImageToSplat3005
Tripo/Tripo-AutoRig30010
Auto rigging, rig check and animation retargeting share the same concurrency quota. The total number of running tasks for these three models cannot exceed 10.
Tripo/Tripo-RigCheck300
Tripo/Tripo-AnimationRetarget300
Tripo/Tripo-Texture3005
Texturing and format conversion share the same concurrency quota. The total number of running tasks for these two models cannot exceed 5.
Tripo/Tripo-ConvertFormat300
Tripo/Tripo-Segmentation30010
Segmentation, smart segmentation, mesh completion and retopology share the same concurrency quota. The total number of running tasks for these four models cannot exceed 10.
Tripo/Tripo-SmartSegmentation300
Tripo/Tripo-MeshCompletion300
Tripo/Tripo-Retopology300

Embedding and sorting models

Text embedding

  • China (Beijing)
  • Singapore
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
Requests per minute (RPM)Tokens per minute (TPM)/Jobs
Input tokens only
qwen3.7-text-embedding24,0001,000,000
qwen3.7-text-embedding-flash24,0001,000,000
text-embedding-v1
Rate limiting does not apply when calling the service with the Batch API.
1,8001,200,000
text-embedding-v2
Rate limiting does not apply when calling the service with the Batch API.
1,8001,200,000
text-embedding-v3
Rate limiting does not apply when calling the service with the Batch API.
1,8001,200,000
text-embedding-v4
Rate limiting does not apply when calling the service with the Batch API.
1,8001,200,000
text-embedding-async-v160The number of queued and running asynchronous text embedding jobs for a user cannot exceed 50.To prevent resource contention from burst jobs, the number of concurrent jobs is limited to 3. This means a single user can have a maximum of 3 asynchronous text embedding jobs running at the same time. Other jobs will be queued.
text-embedding-async-v260The number of queued and running asynchronous text embedding jobs for a user cannot exceed 50.To prevent resource contention from burst jobs, the number of concurrent jobs is limited to 3. This means a single user can have a maximum of 3 asynchronous text embedding jobs running at the same time. Other jobs will be queued.

Multimodal embedding

  • China (Beijing)
Model nameRate Limiting Conditions
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Input tokens only
qwen3-vl-embedding2,4001,200,000
qwen2.5-vl-embedding1,200600,000
tongyi-embedding-vision-plus600200,000
tongyi-embedding-vision-flash600200,000
tongyi-embedding-vision-flash-2026-03-061,2009,600,000
tongyi-embedding-vision-plus-2026-03-061,2009,600,000
multimodal-embedding-v11201,000,000

Reranking Models

  • China (Beijing)
  • Singapore
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen3.7-text-rerank3,0009,000,000
qwen3-rerank5,4005,000,000,000
qwen3-vl-rerank6009,000,000
gte-rerank-v25,0404,980,000,000

Industry

Intention recognition

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
tongyi-intent-detect-v31,2001,000,000

Role assumption

  • China (Beijing)
  • Singapore
  • US (Virginia)
  • Germany (Frankfurt)
  • Japan (Tokyo)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
qwen-plus-character120500,000
qwen-flash-character120500,000
qwen-flash-character-2026-02-26120500,000

Interface interaction

  • China (Beijing)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
gui-plus80540,000
gui-plus-2026-02-26100540,000

Decision model

  • China (Beijing)
  • Singapore
  • US (Virginia)
  • Germany (Frankfurt)
  • Japan (Tokyo)
  • Hong Kong (China)
Model nameRate limits (triggered if any value is exceeded)
The following are the limits per minute. The service may also enforce limits based on requests per second (RPS = RPM/60) and tokens per second (TPS = TPM/60).
Requests per minute (RPM)Tokens per minute (TPM)
Includes input and output tokens
decision-model-preview1,2002,000,000
decision-model5,0005,000,000

Unpublished models

For more information, see Model unpublishing policy.

FAQ

Why is rate limiting triggered?

You can identify the type of rate limit triggered based on the error message:
  • Requests rate limit exceeded or You exceeded your current requests list: The requests per minute (RPM) limit was triggered.
  • Allocated quota exceeded or You exceeded your current quota: The tokens per minute (TPM) limit was triggered.
  • Request rate increased too quickly: The request frequency surged within a short period, triggering the system stability protection—this can be triggered even if the total call volume has not reached the RPM or TPM limit.
  • Too many requests. (error code Throttling.ResourceExhausted or Throttling.ServiceOverloaded): A protective rejection on models subject to dynamic rate limiting, caused by insufficient platform resources rather than by exceeding the rate limit; rejected requests are not billed, and you can simply retry later. See Dynamic rate limiting mechanism; for supported models, see Models and rate limit tiers.
  • For other errors, see Error codes to identify the cause.
A burst of requests in a short period can trigger rate limiting even if the per-minute limits are not exceeded. For the per-second enforcement details, see Static rate limiting rules.

How to view model usage

You can view the data in the monitoring charts within minutes after calling a model. Log in to the Model Monitoring page (Beijing or Singapore), select O&M Management > Model Monitoring in the left navigation to enter the monitoring overview page. Set the query conditions (such as time range and workspace). Then, in the Models area, find the target model and click View Details to view the model's call statistics. For more information, see the Monitoring and Alert document.
Monitoring data is updated at minute-level and is for reference only, not for billing.

How long does it take to recover from rate limiting?

Rate limiting on requests per minute (RPM) or tokens per minute (TPM) usually recovers within one minute; the protective rejection of dynamic rate limiting (Too many requests.) depends on platform resource status and has no fixed recovery time, so you can simply retry later. For other errors, see Error codes for handling. Model output speed is independent of whether you pay. Free quota and paid calls use the same model service infrastructure, and the same model generates at the same speed. The free quota only controls whether requests are accepted—when the quota is exhausted, a 403 error is returned (after Free Quota Only is enabled), which does not reduce the generation speed of accepted requests.

What factors affect model response speed?

  • Model type: lightweight models (such as qwen-flash) generate responses faster than larger models (such as qwen-max).
  • Output length: the more tokens a response contains, the longer the total generation time.
  • Server load: response speed may fluctuate slightly during peak periods.

Does rate limiting reduce the generation speed of accepted requests?

No. Rate limiting (RPM/TPM) only causes requests that exceed the limits to be rejected (returning a 429 error). When the free quota is exhausted (with Free Quota Only enabled), a 403 error is returned, which likewise does not affect the speed of accepted requests. 429 indicates rate limiting and 403 indicates quota exhaustion; both are rejection mechanisms.

How to avoid rate limiting

  1. Choose models with higher rate limits
    • Prioritize models with higher rate limits, such as qwen-plus.
    • Stable or latest versions have more lenient rate limits than dated snapshot versions.
  2. Optimize your call strategy
    • Reduce call frequency: If you receive a Requests rate limit exceeded or You exceeded your current requests list error, lower the API call frequency.
    • Reduce token consumption: If you receive an Allocated quota exceeded or You exceeded your current quota error, shorten the input or limit the output length.
    • Smooth the request rate: If you receive a Request rate increased too quickly error, use uniform scheduling, exponential backoff, or a request queue to distribute requests evenly and avoid sudden peaks.
  3. Add a backup model If rate limiting is triggered, you can switch to a backup model to continue generation. This can reduce the probability of failure and increase throughput. The following code automatically retries with qwen-flash after a rate limit is triggered for qwen-plus. You can also choose a model from a different series (such as qwen-flash) as the backup model to further reduce the risk that the primary and backup models are rate limited at the same time.
    import os
    import asyncio
    from openai import AsyncOpenAI, APIStatusError
    
    # 配置
    API_KEY = os.getenv("DASHSCOPE_API_KEY")
    # 主用模型
    MODEL = "qwen-plus"
    # 备选模型
    BACKUP_MODEL = "qwen-flash"
    # 测试问题
    QUESTION = "你是谁?"
    # 并发设置
    NUM_REQUESTS = 10
    
    client = AsyncOpenAI(
        api_key=API_KEY,
        # 以下为华北2(北京)地域的URL,请将WorkspaceId替换为真实的业务空间ID。
        base_url="https://{WorkspaceId}.cn-beijing.maas.aliyuncs.com/compatible-mode/v1"
    )
    
    async def send_request(model):
        """发送单个请求"""
        try:
            await client.chat.completions.create(
                model=model,
                messages=[{"role": "user", "content": QUESTION}]
            )
            return True
        except APIStatusError as e:
            if e.status_code == 429:
                print(f"[限流触发] 模型 {model}")
                return False
            raise
        except Exception as e:
            print(f"[请求失败] 模型 {model},错误:{e}")
            return False
    
    async def task(i):
        # 尝试主模型
        if await send_request(MODEL):
            return True
        # 限流时尝试备用模型
        return await send_request(BACKUP_MODEL)
    
    async def main():
        results = await asyncio.gather(*(task(i) for i in range(NUM_REQUESTS)))
        print(f"成功请求: {sum(results)}, 失败请求: {len(results) - sum(results)}")
    
    if __name__ == "__main__":
        asyncio.run(main())
    
  4. Split tasks: Long conversations or large documents can consume many tokens quickly. You can split large batch tasks into smaller batches and submit them at different times.
  5. Use batch inference: For tasks that do not require real-time responses, you can use the Batch API. Batch requests are not subject to real-time rate limits, but you must consider queuing and processing time.

How to control token usage or costs

Rate limiting only restricts the request rate per unit of time; it does not cap cumulative usage. To control token usage or costs, use the following methods:
  • Set a spending limit and cost alerts: On the Billing card, configure Cost alerts to enable a monthly spending limit and threshold notifications. You are notified when the threshold is reached, which helps you avoid overspending. For more information, see Query bills and manage costs.
  • Enable stop when the free quota is used up: For models that offer a free quota, you can enable stop when the free quota is used up so that calls stop automatically once the free quota is exhausted, which prevents additional charges. For more information, see Free quota.
  • Monitor model usage: Regularly check the token usage of each model to detect abnormal growth in time. See How to view model usage above.

Will I still be rate limited after topping up?

Topping up your account does not change the RPM and TPM rate limits of models that use static rate limiting. Rate limits are configured at the Alibaba Cloud account level and are independent of billing. Topping up (pay-as-you-go) only ensures that your account is not suspended for overdue payments; it does not raise static rate limits. For models that use dynamic rate limiting, the TPM rate limit tier is automatically adjusted based on your monthly consumption amount, and the tier can be upgraded as consumption increases. For the adjustment rules, see Dynamic rate limit adjustment strategy. To obtain higher rate limits, contact your account manager.