1. 聊天(Responses)
简体中文
  • English
  • 简体中文
  • OpenAI官方库使用教程
  • 前言(必读)
  • 获取 Base URL 和 API Key
  • 聊天(chat)
    • 所有对话模型均兼容 OpenAI 格式
    • Realtime (实时语音、对话)
    • 聊天完成对象
    • 聊天完成块对象
    • 视觉语言模型介绍
    • Claude 官方格式
      • 所有 OpenAI格式 LLM 模型均支持 Claude 官方格式
      • Messages(官方Anthropic格式)
      • Messages(识图)
      • Messages(思考)
      • Messages(函数调用)
    • Gemini 官方格式
      • Gemini 官方格式
    • Chat(聊天)
      POST
    • Chat(分析图片)
      POST
    • Chat(分析视频)
      POST
    • Chat(结构化输出)
      POST
    • Chat(修改图片)
      POST
    • Chat(生成图片)
      POST
    • Chat(工具tools调用)
      POST
    • Chat(Claude Thinking)
      POST
    • Chat(Claude Thinking)
      POST
  • 聊天(Responses)
    • Responses API与Chat API对比
    • 创建模型响应
      POST
    • 创建模型响应(流式返回)
      POST
    • 创建模型响应(调用联网)
      POST
  • 绘图模型
    • 生图模型简介
    • Openai Dall-e 格式
      • Dalle 格式介绍
    • Nano-banana 官方格式
      POST
    • Gemini Image Generation (Native)
      POST
  • 视频模型
    • 视频生成模型简介
    • 统一格式接口
      • 统一格式接口介绍
      • Google-Veo
        • Veo文生视频
        • Veo图生视频
        • Veo 生成视频查询
        • Veo 任务结果查询
      • Sora2 视频
        • Sora生成
        • Sora 生成视频查询
        • Sora 任务结果查询
  • RAG(嵌入,重排序)
    • 嵌入(Embeddings)
      • 嵌入对象
      • 创建嵌入
      • 多模态向量嵌入
    • 重排序(Reranker)
      • 介绍
      • rerank
  • 音频(Audio)
    • suno
      • Suno文生歌
      • GoAmz配置
      • 音乐版本以及生成参数介绍
      • 场景一: 灵感模式
      • 场景二: 自定义.歌词歌名
      • 场景三: 纯音乐.自定义
      • 场景四: 纯音乐.灵感模式
      • 场景五: 续写自定义音频
      • 场景六: 续写音乐并获取完整音乐
    • Audio接口 / 输出
    • Audio接口 / 输入
    • 文本转语音 / TTS
    • 语音转文本 / whisper-1
    • 语音转文本 / gpt-4o-transcribe
  • OpenAI
    • Chat模型
    • dall-e-3
    • Chat (o1-o4系列模型)
    • gpt-image-1
    • Image edit图片编辑
    • Analyze image分析图片
    • Analyze PDF分析PDF
    • o3-pro-responses
  • Gemini
    • gemini
    • Gemini JSON PDF
  • Schemas
    • GenerateContentRequest
  1. 聊天(Responses)

创建模型响应(调用联网)

Developing
POST
{{BASE_URL}}/v1/responses
https://platform.openai.com/docs/api-reference/responses/create
部分OpenAI模型仅支持Response格式,例如o3-pro,codex-mini-latest

Request

Header Params

Body Params application/json

Examples

Responses

🟢200成功
application/json
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{BASE_URL}}/v1/responses' \
--header 'Authorization: 默认值:Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "o3-deep-research-2025-06-26",
    "input": [
        {
            "role": "user",
            "content": "hi"
        }
    ],
    "tools": [
        {
            "type": "web_search_preview"
        }
    ]
}'
Response Response Example
{
    "id": "resp_68760e92a79c81a28acd1e218f1fd40d0679399e11c8f799",
    "object": "response",
    "created_at": 1752567442,
    "status": "completed",
    "background": false,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "max_tool_calls": 225,
    "model": "o3-deep-research-2025-06-26",
    "output": [
        {
            "id": "rs_68760e93029081a29c2ef2a702b428fb0679399e11c8f799",
            "type": "reasoning",
            "summary": []
        },
        {
            "id": "ws_68760ea0d27081a2871459aa9ebbed950679399e11c8f799",
            "type": "web_search_call",
            "status": "completed",
            "action": {
                "type": "search",
                "query": "Hello how to greet user in chat GPT guidelines"
            }
        },
        {
            "id": "rs_68760ea19c0481a2a1f4e2b02bfc8f030679399e11c8f799",
            "type": "reasoning",
            "summary": []
        },
        {
            "id": "msg_68760ea3cde481a29e28ac61b5a7f71b0679399e11c8f799",
            "type": "message",
            "status": "completed",
            "content": [
                {
                    "type": "output_text",
                    "annotations": [],
                    "logprobs": [],
                    "text": "Hello there! 👋 How can I help you today? If there's anything you'd like to discuss or any question you have, feel free to let me know. I'm here to assist!"
                }
            ],
            "role": "assistant"
        }
    ],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "reasoning": {
        "effort": "medium",
        "summary": null
    },
    "service_tier": "default",
    "store": false,
    "temperature": 1,
    "text": {
        "format": {
            "type": "text"
        }
    },
    "tool_choice": "auto",
    "tools": [
        {
            "type": "web_search_preview",
            "search_context_size": "medium",
            "user_location": null
        }
    ],
    "top_logprobs": 0,
    "top_p": 1,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 3420,
        "input_tokens_details": {
            "cached_tokens": 2686
        },
        "output_tokens": 2219,
        "output_tokens_details": {
            "reasoning_tokens": 2176
        },
        "total_tokens": 5639
    },
    "user": null,
    "metadata": {}
}
Modified at 2025-11-08 09:10:59
Previous
创建模型响应(流式返回)
Next
生图模型简介
Built with