Qwen4 35B A3B overview
Qwen4 35B A3B by Alibaba Cloud
Qwen4 35B A3B is the open-weight sparse mixture-of-experts model of Alibaba Cloud's Qwen4 series. It has 35B total parameters with about 3B active per token.
Qwen4 35B A3B specs
- Model ID
alibaba/qwen4-35b-a3b- Developer
- Alibaba Cloud
- Context window
- 1,000,000 tokens
- Max output
- 262,144 tokens
- Input
- Image, Text, Video
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Long inputs and long answers in one request
The 1M-token context window lets a long report, many images or video inputs sit in a single request. A response can run up to 262,144 tokens, so long summaries and extractions fit in one call.
Alibaba Cloud lists hybrid thinking for this model. On this endpoint the request option that touches reasoning is reasoning effort.
Reasoning effort is the setting to test
Reasoning effort constrains how much effort the model spends on reasoning. The supported values are low, medium and high. Reducing it can result in faster responses and fewer tokens used on reasoning.
Run the same set of prompts at low and at high. Compare the correctness of the answers with the response time and the reasoning tokens, then keep the lowest setting whose output still passes your checks.
Use cases
Answer questions about a long report or codebase placed in a single request.
Extract fields from images or video and return them as structured output.
Run an agent that makes parallel tool calls and streams its replies to a user.
Classify or summarize incoming text at a low reasoning effort to check response time.
Capabilities
- Reasoning
- Streaming
- Structured outputs
- Function calling
- Vision
Qwen4 35B A3B API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $0.06 | 1M tokens |
| Output | $0.36 | 1M tokens |
| Cached input | $0.003 | 1M tokens |
Prices from the AI/ML API price list, checked on Dec 4, 2026.
Qwen4 35B A3B vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $0.06 | $0.36 | |
| $0.15 | $0.47 | |
| $0.16 | $0.47 | |
| $0.4761 | $3.3856 | |
| $4.232 | $12.696 |
How to use the Qwen4 35B A3B API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "alibaba/qwen4-35b-a3b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "alibaba/qwen4-35b-a3b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "alibaba/qwen4-35b-a3b",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Qwen4 35B A3B FAQ
How much does Qwen4 35B A3B cost?
Qwen4 35B A3B costs $0.06 / 1M tokens for input and $0.36 / 1M tokens for output on AI/ML API. Cached input is billed at $0.003 / 1M tokens.
Which inputs does Qwen4 35B A3B accept?
It accepts text, image and video inputs. It returns text only.
How do I change how much the model reasons?
Use the reasoning effort option with low, medium or high. A lower value can result in faster responses and fewer reasoning tokens, so compare settings on your own prompts.
How long can a single response be?
The maximum output is 262,144 tokens. Streaming is supported if you want to read the text as it is generated.
Can it call tools and return structured output?
Yes. The model supports function calling, parallel tool calls and structured output. Check that returned arguments and fields match your schema before acting on them.
What is the Qwen4 35B A3B model ID?
Use alibaba/qwen4-35b-a3b as the model parameter. Requests go to the OpenAI-compatible endpoint with your AI/ML API key.
What is the context window of Qwen4 35B A3B?
Qwen4 35B A3B accepts up to 1,000,000 tokens of context and returns up to 262,144 output tokens.