What This Guide Covers
Both Qwen (Alibaba Cloud Model Studio, Singapore international region) and GLM (Z.ai International) expose OpenAI-compatible REST APIs that developers outside mainland China can access today — no Chinese company registration or domestic bank account required. This guide explains the base_url configuration for each provider, walks through official published pricing, shows a worked cost example, and addresses common payment friction points including USDT settlement.
How OpenAI Compatibility Works
Both providers implement the /v1/chat/completions endpoint with standard request and response schemas. Migrating an existing OpenAI SDK integration requires changing only base_url and api_key. The Python and Node.js openai libraries work without modification.
Qwen — Alibaba Cloud Model Studio (International, Singapore)
- Base URL:
https://dashscope-intl.aliyuncs.com/compatible-mode/v1 - Auth: Dashscope API key, created inside an Alibaba Cloud International account
- Free tier: 1 million tokens per model, valid 90 days after activation
- Pricing structure: Tiered by per-request input length (0–256K vs 256K–1M for most models; flat 0–1M for Max tier). Source: Alibaba Cloud Model Studio pricing page
GLM — Z.ai International
- Base URL:
https://api.z.ai/api/paas/v4/ - Auth: Z.ai API key from the Z.ai developer portal
- Free tier:
glm-4.7-flashis permanently free (rate-limited); useful for evaluation and low-stakes routing - Pricing structure: Flat per-million-token rate, no length-tiered splits. Source: Z.ai pricing docs
SDK Integration — Step-by-Step
- Install the OpenAI SDK:
pip install openai(Python) ornpm install openai(Node.js). - Create an account at Alibaba Cloud International or Z.ai and generate an API key.
- Set
base_urlto the provider endpoint and pass your key asapi_key. - Set the
modelparameter to a supported model identifier (see pricing table below). - Send a standard
chat.completions.createcall — no other changes needed.
# Python — OpenAI SDK pointed at Qwen or GLM
from openai import OpenAI
# --- Qwen (Alibaba Cloud Model Studio, Singapore) ---
qwen_client = OpenAI(
api_key="YOUR_DASHSCOPE_API_KEY",
base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1"
)
qwen_response = qwen_client.chat.completions.create(
model="qwen-flash", # or "qwen3.8-max", "qwen3.7-plus", etc.
messages=[{"role": "user", "content": "Summarise this contract in 3 bullet points."}]
)
print(qwen_response.choices[0].message.content)
# --- GLM (Z.ai International) ---
glm_client = OpenAI(
api_key="YOUR_Z_AI_API_KEY",
base_url="https://api.z.ai/api/paas/v4/"
)
glm_response = glm_client.chat.completions.create(
model="glm-5.2", # or "glm-4.7", "glm-5.3", etc.
messages=[{"role": "user", "content": "Hello, world!"}]
)
print(glm_response.choices[0].message.content)
# curl — GLM example
curl https://api.z.ai/api/paas/v4/chat/completions \
-H "Authorization: Bearer YOUR_Z_AI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-4.7",
"messages": [{"role": "user", "content": "Hello, world!"}]
}'
Official Published Pricing (USD / 1M tokens)
All figures below are original provider list prices, not VantixCloud prices. Sources: Alibaba Cloud Model Studio pricing page and Z.ai pricing docs. Verified 2026-10-25 — check those pages before production budgeting, as rates can change.
| Model | Input (USD / 1M tokens) | Output (USD / 1M tokens) | Notes |
|---|---|---|---|
| qwen3.8-max (0–1M) | $2.00 | $6.00 | Flagship reasoning tier |
| qwen3.7-max (0–1M) | $2.50 | $7.50 | Max tier, prior generation |
| qwen3.7-plus (0–256K) | $0.40 | $1.60 | 256K–1M: $1.20 / $4.80 |
| qwen-flash (0–256K) | $0.05 | $0.40 | High-volume, short-context tasks |
| glm-5.2 / glm-5.3 | $1.40 (cache: $0.26) | $4.40 | GLM flagship tier |
| glm-4.7 | $0.60 | $2.20 | Mid-tier GLM |
| glm-4.7-flash | Free (rate-limited) | Free | Evaluation and fallback routing |
Provider Comparison at a Glance
| Dimension | Qwen (Alibaba Cloud International) | GLM (Z.ai International) |
|---|---|---|
| OpenAI compatibility | Yes — /v1/chat/completions |
Yes — api.z.ai/api/paas/v4/ |
| Free evaluation option | 1M tokens / model, 90-day window | glm-4.7-flash permanently free |
| Direct payment (card) | International credit/debit via Alibaba Cloud | International credit/debit via Z.ai portal |
| USDT payment (direct) | Not natively supported | Not natively supported |
| Pricing structure | Tiered by request input length | Flat per-million-token rate |
| Prompt caching | Supported on select models (cache hit ~10% of standard input rate) | Supported: glm-5.2/5.3 cache input $0.26/1M |
| Suitable workloads | Long-context retrieval, document processing, multi-turn chat | Mixed routing: free flash for triage, flagship for quality-sensitive output |
Worked Cost Example
Assumptions: 500M input tokens/month + 150M output tokens/month; input requests stay in the 0–256K bracket; no prompt caching applied; figures use original provider list prices verified 2026-10-25.
- qwen-flash: (500 × $0.05) + (150 × $0.40) = $25.00 + $60.00 = $85.00 / month
- qwen3.7-plus: (500 × $0.40) + (150 × $1.60) = $200.00 + $240.00 = $440.00 / month
- glm-4.7: (500 × $0.60) + (150 × $2.20) = $300.00 + $330.00 = $630.00 / month
- glm-5.2 / glm-5.3: (500 × $1.40) + (150 × $4.40) = $700.00 + $660.00 = $1,360.00 / month
Enabling prompt caching where your application reuses large system prompts or document contexts can reduce input costs materially. For GLM flagship, the cache hit rate of $0.26/1M vs $1.40/1M standard means significant savings on repetitive-context workloads. Actual costs will vary with your cache-hit ratio and input length distribution.
The USDT and Payment Friction Problem
Developers in Southeast Asia, Taiwan, Hong Kong, and other regions frequently encounter payment barriers when funding cloud API accounts directly. Alibaba Cloud International and Z.ai both require an international credit or debit card — if your team cannot provide one, or your finance department requires an alternative settlement channel, direct access is blocked.
VantixCloud AI API accepts USDT payments and provides a single OpenAI-compatible endpoint covering Qwen, GLM, and DeepSeek models. Pricing is quoted per usage — fill in the quote form or contact via Telegram. No registration required.
Multi-Model Routing Considerations
Because both Qwen and GLM are OpenAI-compatible, any LLM gateway that supports base_url overrides — such as LiteLLM or a custom router — can route to both within the same pipeline. A common pattern for cost-aware platforms:
- Route short classification or triage tasks to glm-4.7-flash (free, rate-limited) or qwen-flash ($0.05/$0.40).
- Route quality-sensitive generation to glm-5.2/5.3 or qwen3.8-max.
- Apply prompt caching on both providers when system prompts or document contexts repeat across requests.
Q&A
Do I need a Chinese entity to access Qwen or GLM?
No. Alibaba Cloud Model Studio's Singapore international region and Z.ai International are both accessible to individuals and companies worldwide using an international email and payment card.
Can I pay for Qwen or GLM API access with USDT?
Not directly through Alibaba Cloud or Z.ai. For USDT settlement, an intermediary platform such as VantixCloud is currently the practical route — enquire via the quote form or Telegram for usage-based pricing.
How does Qwen prompt caching work?
When enabled, repeated prefix content (e.g. a long system prompt or document context) is stored server-side. Cache-hit tokens are billed at approximately 10% of the standard input rate for that model tier. Savings depend on your cache-hit ratio and how consistently your prompts share a common prefix.
Which tier suits high-turn conversational applications?
For volume-heavy chat where per-turn token counts are modest, qwen-flash ($0.05 input / $0.40 output per 1M tokens) and glm-4.7-flash (free, rate-limited) are practical starting points. For quality-sensitive conversations — customer support, legal or financial queries — glm-5.2/5.3 or qwen3.8-max offer stronger output quality at higher per-token cost.
Do these APIs support code generation?
Yes. Both the Qwen and GLM model families support code generation and completion tasks. Interactive autocomplete scenarios benefit from flash-tier latency and cost; complex refactoring or pull-request review may justify a Max or flagship-tier model.
Enquire About Access and Pricing
If your team needs USDT settlement, consolidated multi-model access, or usage-based pricing across Qwen, GLM, and DeepSeek, VantixCloud provides a single OpenAI-compatible endpoint with no registration requirement.
→ Submit a quote request at vantixcloud.com/ai-api
→ Telegram: @sapporo168 for direct enquiries and usage-based pricing discussions.