返回模型列表

Qwen3 32B

qwenqwen/qwen3-32b

API 使用指南

Chat 调用

标准 OpenAI 兼容 Chat Completions。省略 reasoning 参数使用非思考(快速)模式;设置 reasoning: {} 或预算以启用思考模式。

cURL
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
  }'

思考模式

通过 reasoning 参数启用深度链式推理。模型在最终答案前输出 <think>…</think> 块——在展示给终端用户前需解析或过滤。

cURL
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
  }'

流式输出

为交互式 UI 流式输出响应。思考模式先流式输出 <think> 块,再输出答案——在读取循环中处理两个片段。

cURL
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
  }'

工具调用

Qwen3-32B 在思考和非思考两种模式下均支持工具调用——适合需要在工具执行同时保留推理轨迹的 agentic 管道。

cURL
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 模式

JSON 模式适合结构化提取、分类管道和需要机器可读输出的 RAG 排名任务。

cURL
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"}
  }'
事实档案 — 本页每条断言可在此回溯来源
来源URL采集于
架构huggingface.co ↗2026-06-08已核实
参数规模huggingface.co ↗2026-06-08已核实
层数huggingface.co ↗2026-06-08已核实
注意力头(GQA)huggingface.co ↗2026-06-08已核实
原生上下文窗口huggingface.co ↗2026-06-08已核实
思考模式huggingface.co ↗2026-06-08已核实
语言支持qwenlm.github.io ↗2026-06-08已核实
许可证huggingface.co ↗2026-06-08已核实
预训练数据qwenlm.github.io ↗2026-06-08已核实
AIME 2024qwenlm.github.io ↗2026-06-08已核实
MATH-500qwenlm.github.io ↗2026-06-08已核实
LiveCodeBenchqwenlm.github.io ↗2026-06-08已核实
BFCL (Berkeley Function-Calling Leaderboard)qwenlm.github.io ↗2026-06-08已核实
MMLU-Proqwenlm.github.io ↗2026-06-08已核实
C-Evalqwenlm.github.io ↗2026-06-08已核实
Qwen3 发布 32B 稠密开源权重模型,支持混合思考模式Qwen3 announcement ↗2026-06-08已核实
帮助与联系