wenwen
  1. 对话(openai, gemini, claude, deepseek...)
wenwen
  • (必读)使用说明
  • Base URL地址
  • 列出模型
    • Models(列出模型)
      GET
  • OpenAI 格式(支持各大原厂模型)
    • OpenAI SDK使用指南
    • Responses API 接口使用指南
    • 对话(openai, gemini, claude, deepseek...)
      • 聊天(chat)
        POST
      • 流式返回(chat)
        POST
      • 思考模式(chat)
        POST
      • 结构化输出(chat)
        POST
      • 工具调用(chat)
        POST
      • MCP调用(chat)
        POST
      • web search(chat)
        POST
      • 聊天(responses)
        POST
      • 流式返回(responses)
        POST
      • 思考模式(responses)
        POST
      • web search(responses)
        POST
    • 图像(gpt, dalle, banana, jimeng)
      • 生成图片(chat)
      • 分析图片(chat)
      • 修改图片(chat)
      • 生成图片(images)
      • 修改图片(images)
    • 视频(sora, veo, 可灵)
      • VEO, SORA 接口参数信息汇总
      • 文生视频-同步 (sora, veo)
      • 图生视频-同步 (sora, veo)
      • 首尾帧视频-同步 (veo)
      • 文生视频-异步 (sora, veo)
      • 图生视频-异步 (sora, veo)
      • 查询视频状态 (sora, veo)
      • 获取视频内容 (sora, veo)
      • 文生视频-异步 (可灵)
      • 图生视频-异步 (可灵)
    • 语音
      • 语音回复(chat)
      • 语音识别(audio)
      • 语音合成(audio)
    • 向量化
      • 文本向量化
  • Anthropic 格式
    • Anthropic SDK使用指南
    • 聊天
      POST
    • 聊天(prompt cache)
      POST
    • 流式返回
      POST
    • 聊天(深度思考)
      POST
    • 工具调用(function call)
      POST
    • 工具调用(MCP)-目前不支持
      POST
    • 分析图片
      POST
  • Gemini 格式
    • Gemini SDK使用指南
    • 聊天
    • 生成图片(nano banana)
    • 编辑图片(nano banana)
  • Midjourney 格式
    • 任务查询接口
    • 获取种子(Seed)
    • 文生图(Imagine)
    • 图片融合(Blend)
    • 图生文(Describe)
    • 换脸(FaceSwap)
    • 上传(upload)
    • 任务批量查询接口
    • 按钮点击(Action)
    • 窗口执行(Modal)
    • 刷新链接(Refresh)
    • 编辑图片(Edit)
  • 数据模型
    • 示例数据模型
      • Pet
      • Category
      • Tag
  1. 对话(openai, gemini, claude, deepseek...)

思考模式(responses)

POST
/v1/chat/completions
大模型思考模式

请求参数

Header 参数

Body 参数application/json

示例
{
   "model": "gpt-5",
   "reasoning": {
      "effort": "medium"
   },
   "input": [
      {
         "role": "user",
         "content": "Write a bash script that takes a matrix represented as a string with format \"[1,2],[3,4],[5,6]\" and prints the transpose in the same format."
      }
   ]
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl https://api.wenwen-ai.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $YOUR_API_KEY" \
  -d '{
    "model": "gpt-5",
    "reasoning": {"effort": "medium"},
    "input": [
      {
        "role": "user",
        "content": "Write a bash script that takes a matrix represented as a string with format \"[1,2],[3,4],[5,6]\" and prints the transpose in the same format."
      }
    ]
  }'

返回响应

🟢200成功
application/json
Body

示例
{
    "id": "resp_0625f239259db9930069120a9812bc81979d13846353bb5c76",
    "object": "response",
    "created_at": 1762790040,
    "status": "completed",
    "background": false,
    "content_filters": null,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "max_tool_calls": null,
    "model": "gpt-5",
    "output": [
        {
            "id": "rs_0625f239259db9930069120a9889248197a7145915501544e2",
            "type": "reasoning",
            "summary": []
        },
        {
            "id": "msg_0625f239259db9930069120a9a1fbc819791adae4cd9be68d8",
            "type": "message",
            "status": "completed",
            "content": [
                {
                    "type": "output_text",
                    "annotations": [],
                    "logprobs": [],
                    "text": "\u4f60\u597d\uff01\u6211\u662f\u4f60\u7684AI\u52a9\u7406\u3002\u6709\u4ec0\u4e48\u53ef\u4ee5\u5e2e\u5230\u4f60\u5417\uff1f"
                }
            ],
            "role": "assistant"
        }
    ],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "prompt_cache_key": null,
    "reasoning": {
        "effort": "medium",
        "summary": null
    },
    "safety_identifier": null,
    "service_tier": "default",
    "store": true,
    "temperature": 1.0,
    "text": {
        "format": {
            "type": "text"
        },
        "verbosity": "medium"
    },
    "tool_choice": "auto",
    "tools": [],
    "top_logprobs": 0,
    "top_p": 1.0,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 7,
        "input_tokens_details": {
            "cached_tokens": 0
        },
        "output_tokens": 149,
        "output_tokens_details": {
            "reasoning_tokens": 128
        },
        "total_tokens": 156
    },
    "user": null,
    "metadata": {}
}
修改于 2025-11-10 15:54:40
上一页
流式返回(responses)
下一页
web search(responses)
Built with