跳到主要内容

DeepSeek-V3.2

在 DeepSeek-V3.2 上进行对话补全,OpenAI 兼容端点:deepseek-reasoner 连同推理过程一起返回答案,deepseek-chat 直接回答。

POST/v3/llm/deepseek-3p2/chat/completions试一试

输入

model
deepseek-reasoner
messages
role: user content: สวัสดีครับ คุณช่วยอะไรได้บ้าง?
max_tokens
4096
temperature
0.7
top_p
0.9

输出POST /v3/llm/deepseek-3p2/chat/completions

{
  "id": "233c1fa8-e6ea-4b4f-86b5-2bbccb39fd9e",
  "object": "chat.completion",
  "created": 1764635256,
  "model": "deepseek-reasoner",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello there! How can I assist you today?",
        "reasoning_content": "Hmm, the user just greeted me with "Hello!". This is a straightforward opening greeting, so I should respond warmly and invitingly. I can start with a cheerful "Hello there!" to mirror their friendly tone, then offer my assistance to encourage them to share what they need. Keeping it simple and open-ended works best here since they haven't specified a request yet."
      },
      "logprobs": null,
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 12,
    "completion_tokens": 109,
    "total_tokens": 121,
    "prompt_tokens_details": {
      "cached_tokens": 0
    },
    "completion_tokens_details": {
      "reasoning_tokens": 96
    },
    "prompt_cache_hit_tokens": 0,
    "prompt_cache_miss_tokens": 12
  },
  "system_fingerprint": "fp_eaab8d114b_prod0820_fp8_kvcache"
}

全部字段见“响应”一节

请求​

响应​

OpenAI 聊天补全对象,如右侧面板所示:答案在 choices[0].message.content,usage 为计费的词元数。使用 deepseek-reasoner 时,message.reasoning_content 为推理内容,usage.completion_tokens_details.reasoning_tokens 为其计数。stream: true 时以 data: 行逐块返回,每块含 choices[0].delta,以 data: [DONE] 结束。

详情​

© 2026 iApp Technology Co., Ltd.服务条款隐私政策系统状态sale@iapp.co.th