ChatGPT API 中文文档
  1. 💬 聊天接口(支持多种格式)
ChatGPT API 中文文档
  • 导言
  • 发出请求
  • 模型(Models)
    • 模型对象
    • 列出模型
      GET
  • 💬 聊天接口(支持多种格式)
    • API聊天完成响应对象
    • 聊天接口
      POST
    • OpenAI 格式(Chat Completions)
      POST
    • Chat(多模态图片识别)
      POST
    • Chat(流式回复)
      POST
    • Chat(视频识别分析)
      POST
    • Chat(结构化输出)
      POST
    • OpenAI 格式(Responses)
      POST
    • OpenAI Deep-research
      POST
    • Anthropic 对话格式(Messages)
      POST
    • Anthropic 图片识别(Messages)
      POST
    • Anthropic 工具调用(Messages)
      POST
    • Anthropic 流式回复(Messages)
      POST
    • Deepseek reasoning 对话格式(Reasoning Content)
      POST
  • 自动补全接口(Completions)
    • API完成响应对象
    • 内容补全接口
      POST
  • 图像接口(Images)
    • DALL·E 3
      POST
    • Stable-Diffusion
      POST
  • 向量生成接口(Embeddings)
    • 嵌入对象
    • 创建嵌入
      POST
  • 音频接口(Audio)
    • 创建转录
    • 创建翻译
    • TTS文本转语音
  • Midjourney
    • 提交Imagine任务(文生图、文图生图)
    • 上传图片至discord
    • 绘图变化(UPSCALE; VARIATION; REROLL)
    • 执行动作(所有的关联按钮动作UPSCALE; VARIATION; REROLL; ZOOM等)
    • 提交Blend任务(图生图)
    • 提交Describe任务(图生文)
    • 提交Modal(提交局部重绘、ZOOM)
    • 提交Shorten任务(prompt分析)
    • 提交swap_face任务
    • 根据ID获取图片
    • 根据ID列表查询任务
    • 指定ID获取任务
    • 获取任务图片的seed
  • 帮助中心
    • 常见问题及解决办法
  1. 💬 聊天接口(支持多种格式)

Deepseek reasoning 对话格式(Reasoning Content)

POST
/v1/chat/completions
📌
官方文档
推理模型 (deepseek-reasoner)

📝 简介#

Deepseek-reasoner 是 DeepSeek 推出的推理模型。在输出最终回答之前,模型会先输出一段思维链内容,以提升最终答案的准确性。API 向用户开放 deepseek-reasoner 思维链的内容,以供用户查看、展示、蒸馏使用。

请求参数

Header 参数

Body 参数application/json

示例
{
  "model": "deepseek-reasoner",
  "messages": [
    {
      "role": "user",
      "content": "9.11 and 9.8, which is greater?"
    }
  ],
  "stream": false
  "max_tokens": 4096
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.pro365.top/v1/chat/completions' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "deepseek-reasoner",
  "messages": [
    {
      "role": "user",
      "content": "9.11 and 9.8, which is greater?"
    }
  ],
  "stream": false
  "max_tokens": 4096
}'

返回响应

🟢200OK
application/json
Body

示例
{
    "id": "as-2dsx2bca32",
    "object": "chat.completion",
    "created": 1760797817,
    "model": "deepseek-r1-250528",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "To determine which number is greater between 9.11 and 9.8, compare them by aligning the decimal places.\n\n- Write 9.8 as 9.80 (since adding a zero does not change its value).\n- Now compare 9.11 and 9.80.\n- The decimal part of 9.11 is 0.11 (eleven hundredths).\n- The decimal part of 9.80 is 0.80 (eighty hundredths).\n- Since 0.80 is greater than 0.11, 9.80 is greater than 9.11.\n\nTherefore, **9.8 is greater than 9.11**.\n\n**Additional verification:**\n- As fractions:  \n  - 9.11 = 911/100  \n  - 9.8 = 98/10 = 980/100  \n  - Since 980/100 > 911/100, 9.8 > 9.11.\n- Subtraction:  \n  - 9.8 - 9.11 = 9.80 - 9.11 = 0.69 (positive, so 9.8 is larger).\n\nOn a number line, 9.11 is between 9.1 and 9.2, while 9.8 is closer to 9.8, confirming that 9.8 is greater.",
                "reasoning_content": "I have the numbers 9.11 and 9.8, and I need to figure out which one is greater. Both are decimals, so I should compare them digit by digit.\n\nFirst, I'll look at the whole number part. Both have 9 as the whole number part, so that doesn't help. Now, I need to compare the decimal parts.\n\n9.11 has a decimal part of .11, and 9.8 has .8. But .8 is the same as .80, right? Because adding a zero at the end doesn't change the value. So, I can write 9.8 as 9.80 to make it easier to compare.\n\nSo now I have 9.11 and 9.80. Comparing the decimal parts: .11 and .80.\n\n.11 is eleven hundredths, and .80 is eighty hundredths. Since eighty is greater than eleven, .80 is greater than .11.\n\nTherefore, 9.80 is greater than 9.11, which means 9.8 is greater than 9.11.\n\nI can also think of it in terms of fractions. 9.11 is 911/100, and 9.8 is 98/10. To compare them, I should have a common denominator.\n\n9.8 is 98/10, which is the same as 980/100. Because multiplying numerator and denominator by 10.\n\n98/10 = (98 * 10)/(10 * 10) = 980/100.\n\nAnd 9.11 is 911/100.\n\nSo now, comparing 911/100 and 980/100. Since the denominators are the same, I just look at the numerators: 911 vs. 980.\n\n980 is greater than 911, so 980/100 > 911/100, meaning 9.8 > 9.11.\n\nAnother way: subtract them. 9.8 minus 9.11.\n\n9.8 - 9.11 = ? Well, 9.80 - 9.11 = 0.69, which is positive, so 9.8 is larger.\n\nIf I think about money: $9.11 is nine dollars and eleven cents, $9.80 is nine dollars and eighty cents. Eighty cents is more than eleven cents, so $9.80 is greater.\n\nI think I'm confident that 9.8 is greater than 9.11.\n\nBut just to be thorough, is there any chance that 9.11 could be misinterpreted? Like, sometimes people might think 9.11 is nine point eleven, which is larger, but no, in decimals, it's always the digits after the decimal point that represent tenths, hundredths, etc.\n\nSo for 9.11, it's 9 + 1/10 + 1/100 = 9 + 0.1 + 0.01 = 9.11.\n\n9.8 is 9 + 8/10 = 9 + 0.8.\n\n0.8 is 0.80, which is 80/100, while 0.11 is 11/100, so clearly 0.80 > 0.11.\n\nTherefore, 9.8 > 9.11.\n\nThe question is: \"9.11 and 9.8, which is greater?\" So I need to say 9.8 is greater.\n\nBut let me write it properly.\n\nSo, 9.8 is greater than 9.11.\n\nIn the number line, 9.8 would be to the right of 9.11.\n\nFor example, 9.0, then 9.1, 9.2, ..., 9.8, then 9.9, 10.0, etc. 9.11 is between 9.1 and 9.2, specifically closer to 9.1.\n\n9.1 is 9.10, so 9.11 is just a bit more than 9.10, while 9.8 is 9.80, which is way beyond that.\n\nSo yes.\n\nI think I've confirmed it multiple ways.\n\nSo the answer should be that 9.8 is greater.\n"
            },
            "finish_reason": "stop",
            "flag": 0
        }
    ],
    "usage": {
        "prompt_tokens": 16,
        "completion_tokens": 1169,
        "total_tokens": 1185,
        "completion_tokens_details": {
            "reasoning_tokens": 883
        }
    }
}
修改于 2025-10-18 14:34:37
上一页
Anthropic 流式回复(Messages)
下一页
API完成响应对象
Built with