1. Qwen 模型
Maas 接口文档
  • 快速开始
  • GLM 模型
    • 文本生成
      POST
    • 图片理解
      POST
  • DeepSeek 模型
    • 文本生成
      POST
    • 图片理解
      POST
  • Qwen 模型
    • 文本生成
      POST
    • 图片理解
      POST
  • Kimi 模型
    • 文本生成
      POST
    • 图片理解
      POST
  • 火山引擎
    • OpenAI 兼容接口
      • doubao-seedance-2-0视频生成
      • doubao-seedance-2-0视频状态获取
      • doubao-seedance-2-0视频预览
    • 原生接口
      • doubao-seedance-2-0视频生成
      • doubao-seedance-2-0视频获取
  • claude code配置
    • 快速开始
    • 最佳实践
  • 龙虾系列配置
    • OpenClaw接入
    • NanoBot接入
  1. Qwen 模型

文本生成

POST
/v1/chat/completions

请求参数

Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
Header 参数

Body 参数application/json必填

示例
{
  "model": "qwen3.6-flash",
  "messages": [
    {
      "role": "user",
      "content": "你好"
    }
  ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/v1/chat/completions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
  "model": "qwen3.6-flash",
  "messages": [
    {
      "role": "user",
      "content": "你好"
    }
  ]
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "id": "611511b9-2fd0-43a4-97ee-7d405f7b06b3",
    "created": 1790583815,
    "model": "qwen3.6-flash",
    "object": "chat.completion",
    "choices": [
        {
            "finish_reason": "stop",
            "index": 0,
            "message": {
                "content": "你好!很高兴为你提供帮助。请问今天有什么我可以为你解答或协助的吗?",
                "role": "assistant",
                "reasoning_content": "Thinking Process:\n\n1.  **Analyze the User's Input**: The user said \"你好\" (Hello).\n2.  **Determine the Intent**: This is a standard greeting.\n3.  **Formulate the Response**:\n    *   Acknowledge the greeting warmly.\n    *   Offer assistance.\n    *   Keep it concise and polite.\n4.  **Drafting the response (Internal Monologue/Trial)**:\n    *   *Option 1*: 你好!有什么我可以帮你的吗? (Standard, friendly)\n    *   *Option 2*: 您好!很高兴为您服务。请问今天有什么需要我帮忙的吗? (More formal)\n5.  **Final Polish (Chinese)**: \"你好!很高兴见到你。请问有什么我可以帮你的吗?\" or simply \"你好!有什么我可以帮你的吗?\" Let's go with a warm, helpful tone.\n6.  **Output Generation**: \"你好!很高兴为你服务,请问有什么我可以帮你的吗?\" (Hello! Glad to serve you, how can I help you today?) -> Actually, keep it natural: \"你好!有什么我可以帮你的吗?\" (Hello! Is there anything I can help you with?)\n\nLet's use a friendly and open-ended response.\n\"你好!很高兴和你聊天。请问今天有什么我可以帮你的吗?\" (Hello! Nice chatting with you. How can I help you today?)\n\nWait, let's keep it simple and direct.\n\"你好!有什么我可以帮你的吗?\" (Hello! How can I help you?)\n\nLet's add a bit of warmth.\n\"你好!很高兴为你提供帮助。请问有什么我可以为你做的吗?\" (Hello! Glad to provide help. Is there anything I can do for you?)\n\nOkay, final decision: \"你好!很高兴为你服务。请问有什么我可以帮你的吗?\" (Hello! Happy to serve you. How can I help you?) - Wait, \"Happy to serve you\" sounds a bit like customer service. Let's just say \"Hello! How can I help you today?\"\n\n\"你好!有什么我可以帮你的吗?\" (Hello! Is there anything I can help you with?)\n\nLet's go with: \"你好!很高兴认识你。请问有什么我可以帮你的吗?\" (Hello! Nice to meet you. How can I help you?)\n\nActually, the simplest and best is:\n\"你好!有什么我可以帮你的吗?\" (Hello! How can I help you?)\n\nLet's output that.",
                "provider_specific_fields": {
                    "reasoning_content": "Thinking Process:\n\n1.  **Analyze the User's Input**: The user said \"你好\" (Hello).\n2.  **Determine the Intent**: This is a standard greeting.\n3.  **Formulate the Response**:\n    *   Acknowledge the greeting warmly.\n    *   Offer assistance.\n    *   Keep it concise and polite.\n4.  **Drafting the response (Internal Monologue/Trial)**:\n    *   *Option 1*: 你好!有什么我可以帮你的吗? (Standard, friendly)\n    *   *Option 2*: 您好!很高兴为您服务。请问今天有什么需要我帮忙的吗? (More formal)\n5.  **Final Polish (Chinese)**: \"你好!很高兴见到你。请问有什么我可以帮你的吗?\" or simply \"你好!有什么我可以帮你的吗?\" Let's go with a warm, helpful tone.\n6.  **Output Generation**: \"你好!很高兴为你服务,请问有什么我可以帮你的吗?\" (Hello! Glad to serve you, how can I help you today?) -> Actually, keep it natural: \"你好!有什么我可以帮你的吗?\" (Hello! Is there anything I can help you with?)\n\nLet's use a friendly and open-ended response.\n\"你好!很高兴和你聊天。请问今天有什么我可以帮你的吗?\" (Hello! Nice chatting with you. How can I help you today?)\n\nWait, let's keep it simple and direct.\n\"你好!有什么我可以帮你的吗?\" (Hello! How can I help you?)\n\nLet's add a bit of warmth.\n\"你好!很高兴为你提供帮助。请问有什么我可以为你做的吗?\" (Hello! Glad to provide help. Is there anything I can do for you?)\n\nOkay, final decision: \"你好!很高兴为你服务。请问有什么我可以帮你的吗?\" (Hello! Happy to serve you. How can I help you?) - Wait, \"Happy to serve you\" sounds a bit like customer service. Let's just say \"Hello! How can I help you today?\"\n\n\"你好!有什么我可以帮你的吗?\" (Hello! Is there anything I can help you with?)\n\nLet's go with: \"你好!很高兴认识你。请问有什么我可以帮你的吗?\" (Hello! Nice to meet you. How can I help you?)\n\nActually, the simplest and best is:\n\"你好!有什么我可以帮你的吗?\" (Hello! How can I help you?)\n\nLet's output that."
                }
            }
        }
    ],
    "usage": {
        "completion_tokens": 554,
        "prompt_tokens": 11,
        "total_tokens": 565,
        "completion_tokens_details": {
            "reasoning_tokens": 533,
            "text_tokens": 21
        }
    }
}
修改于 2026-10-08 09:14:18
上一页
图片理解
下一页
图片理解
Built with