Cost levers - verified
How to cut your Alibaba Qwen API bill
Prompt caching: automatic and explicit. Cache lifetime: explicit: 5 min, reset on hit; implicit: indeterminate. A cache hit typically saves 90% on input across 17 current Alibaba Cloud (Qwen) models. Batch: 50% off, 24h to 336h (14d). Batch and caching stack: no. Service tiers: none documented.
Read from alibabacloud.com. Compare every provider's cost levers
- Caching
- Automatic and explicit
- Cache hit saves
- 90%
- Batch
- 50% off
- Service tiers
- 0
Prompt caching
- Mode
Both: automatic caching by default, plus explicit breakpoints you control
Implicit cache always on (cannot be disabled, hits not guaranteed); explicit cache via cache_control markers (deterministic hits). Mutually exclusive per request. Responses API has separate Session cache settings.
- Cache lifetime
Explicit: 5 minutes, reset on each hit. Implicit: indeterminate, old unused data cleared periodically.
- Minimum prompt
1,024 tokens for both modes (512 for Zhipu-deployed GLM models on implicit cache)
- Cache write cost
Explicit: typically 125% of standard input (only the incremental portion when extending an existing cache). Implicit: 100% of standard input (no premium).
- Cache read cost
Explicit hits typically 10% of standard input (exceptions: qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b). Implicit hits typically 20% (model exceptions listed).
- Storage cost
- Not stated
- How to enable
Implicit: automatic. Explicit: add a cache_control marker to a messages content block (up to four markers; 20-block lookback).
Request fragment"cache_control": {"type": "ephemeral"}- From the docs
“Explicit cache: A mode that you enable manually. You create a cache for specific content to ensure a deterministic hit within its 5-minute validity period.”
alibabacloud.com “Implicit cache: This automatic mode requires no extra configuration and cannot be disabled, ideal for scenarios that prioritize convenience.”
alibabacloud.com “| Billing for cache creation tokens | Typically 125% of the standard input token price | 100% of the standard input token price |”
alibabacloud.com “| Billing for cached input tokens | Typically 10% of the standard input token price (see Billing) | Typically 20% of the standard input token price (see Billing) |”
alibabacloud.com “| Minimum tokens for caching | 1024 | 1024 |”
alibabacloud.com “| Cache validity period | 5 minutes (resets on hit) | Indeterminate. The system periodically clears old, unused cache data. |”
alibabacloud.com “Explicit cache and implicit cache are mutually exclusive.”
alibabacloud.com “For Zhipu-deployed GLM models, the minimum is 512.”
alibabacloud.com “Add a`"cache_control": {"type": "ephemeral"}` marker to the messages array.”
alibabacloud.com “A single request supports up to four cache markers.”
alibabacloud.com
Batch API
- Discount
50% off
50% of real-time price (input and output, successful requests only)
- Window
completion_window 24h to 336h (14d); unfinished requests in expired tasks are not executed or charged
- Limits
Max 50,000 requests per file, max 500 MB; each line max 6 MB; one model and thinking mode per file; does not support context cache
- Endpoint
OpenAI-compatible Batch File API: client.batches.create (endpoint /v1/chat/completions or /v1/embeddings)
- Stacks with caching
No: you get one discount or the other, not both
“It also does not support features such as context cache.”
alibabacloud.com - From the docs
“The input and output tokens for all successful requests are charged at 50% of the real-time inference price for the corresponding model.”
alibabacloud.com “completion_window | String | Body | Yes | Maximum wait time. Range: 24h-336h, integers only.”
alibabacloud.com “Size limits: Maximum 50,000 requests per file, maximum 500 MB.”
alibabacloud.com “Line limit: Each JSON object must not exceed 6 MB and must fit within the model's context window.”
alibabacloud.com “It also does not support features such as context cache.”
alibabacloud.com “If a task does not complete within the completion_window, it expires. Unprocessed requests in expired tasks are not executed and do not incur charges.”
alibabacloud.com
Service tiers
Flex trades speed or availability for a lower price; Priority and Fast cost more for lower latency or reserved capacity.
Service tiers on the pages checked: Not stated
Other discounts and surcharges
AI general-purpose savings plan (also applies to batch)
“It supports AI general-purpose savings plan, but not discounts, such as subscription (other savings plans) or free quotas for new users.”
alibabacloud.com Subscription / other savings plans and free quotas for new users (real-time only)
“It supports AI general-purpose savings plan, but not discounts, such as subscription (other savings plans) or free quotas for new users.”
alibabacloud.com
Alibaba Cloud (Qwen) per-model prices
USD per 1M tokens from the provider's own pricing page, newest release first. A dash means the model has no such rate. These are the Alibaba Cloud (Qwen) models billed through Alibaba Qwen. Muted rows are scheduled for shutdown or deprecated.
| Model | Input | Cached input | Cache write | Batch input | Output | Batch output |
|---|---|---|---|---|---|---|
| Qwen3.8-Omni-Flash | $0.15 | $0.01689.3% off | - | - | $0.47 | - |
| Qwen3.8-Flash | $0.15 | $0.01689.3% off | $0.20 | - | $0.47 | - |
| Qwen3.8-27B | $0.50 | $0.0590% off | $0.625 | - | $3 | - |
| Qwen3.8-2.4T-A95B | $2 | $0.1791.5% off | $2.50 | - | $6 | - |
| Qwen3.8-Max | $2 | $0.1791.5% off | $2.50 | - | $6 | - |
| Qwen3.7-Flash | $0.03 | $0.00390% off | $0.038 | - | $0.13 | - |
| Qwen3.7-Plus | $0.40 | $0.0490% off | $0.50 | $0.20 | $1.60 | $0.80 |
| Qwen3.7-Max | $2.50 | $0.2590% off | $3.125 | - | $7.50 | - |
| Qwen3.6-27B | $0.60 | - | - | - | $3.60 | - |
| Qwen3.6-35B-A3B | $0.375 | - | - | - | $2.25 | - |
| Qwen3.6-Flash | $0.25 | $0.02590% off | $0.3125 | - | $1.50 | - |
| Qwen3.6-Plus | $0.50 | $0.0590% off | $0.625 | - | $3 | - |
| Qwen3.5-Omni-Flash | $0.40 | - | - | - | $2.20 | - |
| Qwen3.5-Omni-Plus | $1.40 | - | - | - | $8.30 | - |
| Qwen3.5-122B-A10B | $0.40 | - | - | - | $3.20 | - |
| Qwen3.5-27B | $0.30 | - | - | - | $2.40 | - |
| Qwen3.5-35B-A3B | $0.25 | - | - | - | $2 | - |
| Qwen3.5-Flash | $0.10 | $0.0190% off | $0.125 | - | $0.40 | - |
| Qwen3.5-397B-A17B | $0.60 | - | - | - | $3.60 | - |
| Qwen3.5-Plus | $0.40 | $0.0490% off | $0.50 | - | $2.40 | - |
| Qwen-MT-Lite | $0.12 | - | - | - | $0.36 | - |
| Qwen-MT-Flash | $0.16 | - | - | - | $0.49 | - |
| Qwen3-VL-Plus | $0.20 | $0.0290% off | $0.25 | - | $1.60 | - |
| Qwen-Flash | $0.05 | $0.00590% off | $0.063 | $0.025 | $0.40 | $0.20 |
| Qwen3-Coder-Flash | $0.30 | $0.0390% off | $0.375 | - | $1.50 | - |
| Qwen-Max | $1.60 | $0.3280% off | - | $0.80 | $6.40 | $3.20 |
| Qwen-Plus | $0.40 | $0.0490% off | $0.50 | $0.20 | $1.20 | $0.60 |
Research notes
facts.json cacheRead for most Qwen models is the explicit-cache hit price (10%); qwen-max records the implicit price (20%) because it has no explicit cache.
FAQ
Does Alibaba Qwen cache prompts automatically?
Both: automatic caching by default, plus explicit breakpoints you control. Implicit cache always on (cannot be disabled, hits not guaranteed); explicit cache via cache_control markers (deterministic hits). Mutually exclusive per request. Responses API has separate Session cache settings. How to enable: Implicit: automatic. Explicit: add a cache_control marker to a messages content block (up to four markers; 20-block lookback).
How much does a cache hit cost on Alibaba Qwen?
Across 17 current models with a cache read price, a hit saves 90% (80% to 91.5%) off the input price. The docs say: Explicit hits typically 10% of standard input (exceptions: qwen3.8-max, qwen3.8-max-0902, qwen3.8-flash, qwen3.8-2.4t-a95b). Implicit hits typically 20% (model exceptions listed)..
Does Alibaba Qwen have a batch API discount?
50% of real-time price (input and output, successful requests only). Window: completion_window 24h to 336h (14d); unfinished requests in expired tasks are not executed or charged. Stacks with caching: no: you get one discount or the other, not both.
Sources
Last verified from Alibaba Cloud Model Studio (Qwen)'s own pages below. Quotes are verbatim; each was matched against the live page.
Newsletter
Know when a provider changes its prices
One email per week. New model releases, pricing changes and what they mean for what you build.