Qwen3 32B
API guide
Chat completion
Standard OpenAI-compatible chat completions. Omit the reasoning parameter for non-thinking (fast) mode; set reasoning: {} or a budget to enable thinking mode.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-32b",
"messages": [
{"role": "user", "content": "Explain the tradeoffs between dense and MoE architectures for inference."}
],
"temperature": 0.7,
"max_tokens": 2048
}'Thinking mode
Enable deep chain-of-thought reasoning via the reasoning parameter. The model emits a <think>β¦</think> block before the final answer β parse or strip it before showing to end users.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-32b",
"messages": [
{"role": "user", "content": "Prove that the sum of two odd numbers is even."}
],
"reasoning": {},
"temperature": 0.6,
"max_tokens": 8192
}'Streaming
Stream responses for interactive UIs. Thinking mode streams the <think> block first, then the answer β handle both segments in your reader loop.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-32b",
"messages": [{"role": "user", "content": "Summarize the key points of the Qwen3 technical report."}],
"stream": true
}'Tool calling
Qwen3-32B supports tools in both thinking and non-thinking modes β useful for agentic pipelines that need reasoning traces alongside tool execution.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-32b",
"messages": [{"role": "user", "content": "What is the weather in Shanghai right now?"}],
"tools": [{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather for a location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string", "description": "City name"}
},
"required": ["location"]
}
}
}],
"tool_choice": "auto"
}'JSON mode
Use JSON mode for structured extraction, classification pipelines, and RAG ranking that need machine-readable output.
curl https://api.therouter.ai/v1/chat/completions \
-H "Authorization: Bearer $THEROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "qwen/qwen3-32b",
"messages": [
{"role": "system", "content": "Return only JSON with keys: summary, sentiment, keywords."},
{"role": "user", "content": "Analyze this product review: The battery life is amazing but the screen is dim."}
],
"response_format": {"type": "json_object"}
}'Fact ledger β every claim on this page traces here
| source | URL | retrieved | |
|---|---|---|---|
| Architecture | huggingface.co β | 2026-06-08 | verified |
| Parameters | huggingface.co β | 2026-06-08 | verified |
| Layers | huggingface.co β | 2026-06-08 | verified |
| Attention heads (GQA) | huggingface.co β | 2026-06-08 | verified |
| Native context window | huggingface.co β | 2026-06-08 | verified |
| Thinking mode | huggingface.co β | 2026-06-08 | verified |
| Language support | qwenlm.github.io β | 2026-06-08 | verified |
| License | huggingface.co β | 2026-06-08 | verified |
| Pretraining data | qwenlm.github.io β | 2026-06-08 | verified |
| AIME 2024 | qwenlm.github.io β | 2026-06-08 | verified |
| MATH-500 | qwenlm.github.io β | 2026-06-08 | verified |
| LiveCodeBench | qwenlm.github.io β | 2026-06-08 | verified |
| BFCL (Berkeley Function-Calling Leaderboard) | qwenlm.github.io β | 2026-06-08 | verified |
| MMLU-Pro | qwenlm.github.io β | 2026-06-08 | verified |
| C-Eval | qwenlm.github.io β | 2026-06-08 | verified |
| Qwen3 launches dense 32B open-weight model with hybrid thinking modes | Qwen3 announcement β | 2026-06-08 | verified |