The Qwen API gives developers programmatic access to Alibaba Cloud’s Qwen model family—spanning the limited-time Qwen4-Max Preview (1M context, 393,216 max output, multimodal text/image/video input) alongside production workhorses Qwen3-Max, Qwen3-Plus, Qwen3-Flash, and Qwen3-Coder. While official Alibaba Cloud Model Studio (DashScope) gates Qwen4-Max Preview behind monthly Token Plan subscriptions (RMB 39–312/month) and ends the preview window on November 25, 2026, teams building cross-vendor apps can pair OpenAI-compatible Qwen endpoints with GPT-6.2 Sol and DeepSeek via the API Hop Model Catalog with pay-as-you-go billing.
Key Takeaways
- Qwen4-Max Preview closes November 25, 2026: Opened November 11 with a 1M-token context window and 393K shared thinking+output budget, the preview is strictly a regression-testing window—do not hardcode its preview ID into long-term production pipelines. See our Qwen4-Max Preview Deep Dive for full mechanics.
- Two distinct billing models on DashScope: Production Qwen3 and Qwen3-Coder models support standard pay-as-you-go per-1M-token billing ($0.05–$1.60/1M input), whereas Qwen4-Max Preview requires a Token Plan subscription (RMB 39–312/month) with unpublished Credits-to-token ratios.
- OpenAI SDK compatibility out of the box: Both Alibaba Cloud Model Studio (
dashscope-intl.aliyuncs.com/compatible-mode/v1) and multi-model gateways accept standardopenaiPython/Node SDK calls—just swapbase_urlandapi_key. - Strong price-to-performance on coding and multilingual tasks:
qwen3-coder-plusandqwen3-plusundercut Western flagships by 60%–85% on per-task bills while preserving strong CJK, Southeast Asian, and structured-JSON fidelity. - Avoiding Alibaba Cloud onboarding friction: Official Model Studio international accounts require regional verification and USD cards, while China-mainland Token Plans require Alipay/WeChat Pay and real-name KYC. Developers outside China can use API Hop Pricing for pay-as-you-go multi-model routing via USDT/USDC crypto, Brazil PIX, or Indonesian QRIS/GoPay/DANA.
Qwen Model Lineup & API Pricing at a Glance
Verified as of 2026-11-23 across Alibaba Cloud Model Studio (International / Mainland China) and cross-vendor reference baselines (GPT-6.2 Sol and DeepSeek V4.1-Flash):
| Model ID | Context / Max Output | Input ($/1M) | Output ($/1M) | Billing Mode | Best Production Use Case |
|---|---|---|---|---|---|
qwen4-max-preview | 1M / 393K (shared) | Token Plan only | Token Plan only | RMB 39–312/mo (ends Nov 25) | Complex reasoning, video+image+text eval |
qwen3-max | 256K / 32K | $1.60 | $6.40 | Pay-as-you-go | Flagship multilingual reasoning & agents |
qwen3-plus | 1M / 32K | $0.40 | $1.20 | Pay-as-you-go | High-volume RAG, long-doc summarization |
qwen3-flash | 1M / 16K | $0.05 | $0.40 | Pay-as-you-go | Fast classification, extraction, chat |
qwen3-coder-plus | 1M / 64K | $1.00 | $5.00 | Pay-as-you-go | Repo-wide code generation, IDE autocomplete |
| GPT-6.2 Sol (ref) | 1.05M / 128K | $2.00 ($0.10 cache) | $10.00 | Pay-as-you-go | Daily coding, 3D/UI, low-verbosity agents |
| DeepSeek V4.1-Flash (ref) | 128K / 16K | $0.14 | $0.28 | Pay-as-you-go | Ultra-low-cost batch pipelines |
Pricing verified on 2026-11-23. DashScope international rates apply tiered pricing for inputs above 128K/256K tokens on qwen3-plus and qwen3-coder-plus. Qwen4-Max Preview Token Plan tiers (Lite RMB 39, Essential RMB 79, Standard RMB 139, Pro RMB 312) include 20,000–200,000 monthly Credits with promotional 20% burn (8% during 22:00–08:00 UTC+8).
DashScope (Model Studio) vs. OpenAI-Compatible Gateway Access
Choosing how to connect to the Qwen API depends on your geography, payment rail, and whether you run Qwen alone or alongside OpenAI, Claude, and Gemini:
| Dimension | Alibaba Cloud Model Studio (DashScope) | Unified OpenAI-Compatible Gateway (API Hop) |
|---|---|---|
| Endpoints | Separate Mainland (dashscope.aliyuncs.com) vs. International (dashscope-intl.aliyuncs.com) | Single global endpoint (https://api.apihop.ai/v1) |
| Qwen4-Max Preview | Available via Mainland Token Plan (until Nov 25, 2026) | Watch Model Catalog for GA qwen4-max pay-as-you-go listing |
| Account & KYC | Alibaba Cloud account + phone/card or Mainland real-name KYC | Email signup, zero corporate KYC |
| Multi-Vendor Failover | Qwen & Alibaba ecosystem only | Single key routes to Qwen, GPT-6.2 Sol, Claude Opus 5.5, Gemini 4 Argon |
| Rate Tiers | Account-tier RPM/TPM limits; Token Plan caps concurrent agents (1–8) | Unified gateway pooling without per-vendor cold-start caps |
| Payment Methods | International credit card or Alipay/WeChat Pay | Pay-as-you-go via USDT/USDC crypto, Brazil PIX, Indonesian QRIS/GoPay/DANA |
Crucial Migration Caveat for Qwen4-Max Preview
If you are testing qwen4-max-preview before the November 25, 2026 (24:00 UTC+8) cutoff, watch two parameter rules from Alibaba’s official docs:
reasoning_effortdefaults toxhigh: Default requests trigger maximum internal thinking, which eats into the shared 393,216-token output ceiling and raises latency. Explicitly setreasoning_effort: "medium"or"low"for routine workloads.- Mutual exclusion with
thinking_budget: Passing bothreasoning_effortand the older Qwen3thinking_budgetparameter throws a 400 validation error. Stripthinking_budgetfrom legacy Qwen3 wrappers before calling Qwen4.
Worked Workload Cost: Qwen API vs. GPT-6.2 Sol vs. DeepSeek
Let’s calculate the exact monthly invoice for a codebase documentation & PR review pipeline running 3,000 tasks/month. Each task sends 40,000 input tokens (30,000 cached repo prefix + 10,000 fresh diff) and generates 8,000 output tokens (visible review + reasoning), with 10% retry overhead ($R_{\text{retry}} = 1.10$).
$$\text{Monthly Cost} = 3,000 \times 1.10 \times \frac{I_{\text{uncached}} \cdot P_{\text{in}} + I_{\text{cached}} \cdot P_{\text{cache}} + O_{\text{total}} \cdot P_{\text{out}}}{1,000,000}$$
Using standard 50%-off cached reads on Qwen3 (and 95%-off on GPT-6.2 Sol, 90%-off on DeepSeek):
qwen3-plus($0.40 in / $0.20 cache / $1.20 out):- Per task: $\frac{10000(0.40) + 30000(0.20) + 8000(1.20)}{1,000,000} = $0.0196$
- Monthly (3,300 effective runs): $64.68 / month
qwen3-coder-plus($1.00 in / $0.50 cache / $5.00 out):- Per task: $\frac{10000(1.00) + 30000(0.50) + 8000(5.00)}{1,000,000} = $0.0650$
- Monthly (3,300 effective runs): $214.50 / month
- GPT-6.2 Sol ($2.00 in / $0.10 cache / $10.00 out):
- Per task: $\frac{10000(2.00) + 30000(0.10) + 8000(10.00)}{1,000,000} = $0.1030$
- Monthly (3,300 effective runs): $339.90 / month
- DeepSeek V4.1-Flash ($0.14 in / $0.014 cache / $0.28 out):
- Per task: $\frac{10000(0.14) + 30000(0.014) + 8000(0.28)}{1,000,000} = $0.00406$
- Monthly (3,300 effective runs): $13.40 / month
Engineering takeaway: qwen3-coder-plus saves 37% over GPT-6.2 Sol on identical token volume while offering a native 1M-token window, and qwen3-plus cuts the bill by 81%. When a PR fails automated unit tests, route only the failed ticket to GPT-6.2 Sol or Claude Opus 5.5.
Python SDK Quickstart (OpenAI-Compatible)
Because both Alibaba Cloud Model Studio and API Hop expose an OpenAI-compatible /v1/chat/completions interface, you can switch between DashScope direct access and multi-model gateway routing with a two-line environment variable change.
import os
from openai import OpenAI
# Option A: Alibaba Cloud Model Studio International
# BASE_URL = "https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
# Option B: Unified multi-vendor routing via API Hop
BASE_URL = os.getenv("API_BASE_URL", "https://api.apihop.ai/v1")
client = OpenAI(
api_key=os.environ["API_KEY"],
base_url=BASE_URL,
)
def review_code(diff_text: str, model: str = "qwen3-coder-plus") -> dict:
resp = client.chat.completions.create(
model=model,
messages=[
{
"role": "system",
"content": "You are a senior code reviewer. Return concise bugs and fixes in JSON."
},
{"role": "user", "content": diff_text},
],
temperature=0.2,
max_tokens=2048,
)
usage = resp.usage
return {
"model": model,
"reply": resp.choices[0].message.content,
"prompt_tokens": usage.prompt_tokens,
"completion_tokens": usage.completion_tokens,
}
if __name__ == "__main__":
sample_diff = "def divide(a, b):\n return a / b # missing zero check"
result = review_code(sample_diff, model="qwen3-coder-plus")
print(result["reply"])
print(f"Tokens -> in: {result['prompt_tokens']}, out: {result['completion_tokens']}")
For quick terminal testing with curl:
curl -s https://api.apihop.ai/v1/chat/completions \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen3-plus",
"messages": [{"role": "user", "content": "Summarize REST vs GraphQL in 3 bullet points."}]
}'
Free Tier Reality, Minimum Deposit, and Regional Payments
- What Alibaba’s free quota actually gives you: New Alibaba Cloud Model Studio accounts typically receive a one-time promotional free token allowance (often 1 million tokens per eligible Qwen3 model, valid for 90–180 days after activation). However,
qwen4-max-previewis excluded from free quotas—it requires a paid Token Plan starting at RMB 39/month (RMB 19.5/month for eligible first-time personal subscribers through November 30, 2026). Once the free quota expires, API calls halt unless a valid billing method is attached. - No monthly subscription or USD credit card on API Hop: Teams in India, Indonesia, Brazil, Latin America, Turkey, and Russia frequently hit card declines or Mainland KYC blocks on Alibaba Cloud. Through the API Hop Pricing Page, you can top up a small pay-as-you-go balance with zero monthly subscription, paying via USDT/USDC crypto, Brazil PIX, or Indonesian QRIS/GoPay/DANA, and keep Qwen, OpenAI, Claude, and Gemini on one unified ledger.
What We Don’t Know Yet
- Qwen4-Max GA pricing and release date: Alibaba has not announced the exact launch date, final model ID, or per-million-token pay-as-you-go pricing for general availability after the preview closes on November 25, 2026.
- Official Qwen4-Max benchmark scores: Neither Alibaba Cloud nor independent trackers (Artificial Analysis, Scale HSS) have published verified benchmark tables for
qwen4-max-previewas of November 23, 2026. - Exact Token Plan Credits-to-token formula: DashScope has not disclosed how many input or output tokens correspond to 1 Credit under the RMB 39–312 monthly plans.
What to Watch Next
- November 25, 2026 preview cutoff & GA announcement: Watch for Alibaba’s post-preview announcement transitioning Qwen4-Max from Token Plan subscriptions to standard pay-as-you-go API billing.
- Qwen4-Plus and Qwen4-Flash rollouts: Announced at Apsara Conference alongside Qwen4-Max, the mid-tier and lightweight Qwen4 endpoints will determine whether Qwen can hold its price lead against DeepSeek V4.1-Flash and GPT-6.2 Sol. Track new listings on the API Hop Model Catalog.
Frequently Asked Questions
How do I get a Qwen API key?
You can generate a direct key in Alibaba Cloud Model Studio (DashScope) under API-Key Management, choosing either the International (Singapore) or Mainland China region. If you want a single OpenAI-compatible key that also covers OpenAI, Claude, and Gemini without Alibaba Cloud KYC, sign up via the API Hop Model Catalog.
What is the current Qwen API pricing?
As of November 23, 2026, pay-as-you-go DashScope international rates are roughly $0.05/$0.40 per 1M tokens for qwen3-flash, $0.40/$1.20 for qwen3-plus, $1.00/$5.00 for qwen3-coder-plus, and $1.60/$6.40 for qwen3-max. qwen4-max-preview is billed exclusively through monthly Token Plans (RMB 39–312/month) until November 25.
Is the Qwen API free to use?
Alibaba Cloud Model Studio offers a time-limited one-time free token quota for new accounts on select Qwen3 models, but it is not a permanent free production tier and excludes qwen4-max-preview. For low-budget ongoing testing without monthly subscriptions, use pay-as-you-go billing on the API Hop Pricing Page.
Is the Qwen API compatible with the OpenAI Python SDK?
Yes. Both Alibaba Cloud Model Studio (compatible-mode/v1) and API Hop (https://api.apihop.ai/v1) implement the OpenAI Chat Completions specification, including streaming, tool calling, and structured JSON outputs.
Should I build production features on qwen4-max-preview today?
No. Alibaba’s documentation explicitly states that qwen4-max-preview goes offline on November 25, 2026 at 24:00 (UTC+8). Use it for evaluation only, and run production traffic on qwen3-max, qwen3-coder-plus, or GPT-6.2 Sol until Qwen4-Max GA launches.
Can I pay for Qwen and other LLM APIs without an international USD credit card?
Yes. If you cannot pass Mainland Alipay/WeChat KYC or prefer not to bind a USD credit card to Alibaba Cloud, you can fund a pay-as-you-go balance on API Hop using USDT/USDC crypto, Brazil PIX, or Indonesian QRIS/GoPay/DANA.
How does Qwen3-Coder compare to GPT-6.2 Sol for coding workflows?
qwen3-coder-plus ($1.00/$5.00 per 1M) is roughly 37%–50% cheaper per token than GPT-6.2 Sol ($2.00/$10.00) with a 1M context window, making it strong for high-volume autocomplete and boilerplate generation. GPT-6.2 Sol wins on complex multi-file PR merges, frontend/3D UI generation, and 95%-off prompt caching ($0.10/1M).