SurgeAI
  1. official-format
SurgeAI
  • SurgeAI
    • SurgeAI核心优势
    • 快速开始
    • 认证
    • 如何使用
      • OpenClaw
      • Codex
      • 聊天应用
      • Claude Code
      • Dify
    • API参考
      • OpenAI
        • gpt-5
          • official-format
            • gpt-5 (网络搜索 (Response))
            • gpt-5 (文本转文本)
            • gpt-5 (文本转文本)
            • gpt-5 (图像转文本 (Chat))
            • gpt-5 (图像转文本 (Response))
            • gpt-5 (文件分析)
        • gpt-4o
          • official-format
            • gpt-4o (网络搜索 (Response))
            • gpt-4o (文本转文本 (Response))
            • gpt-4o (文本转文本 (Chat))
            • gpt-4o (图像转文本 (Chat))
            • gpt-4o (图像转文本 (Response))
            • gpt-4o (文件分析 (Response))
        • gpt-4.1
          • official-format
            • gpt-4.1 (联网搜索)
            • gpt-4.1 (文本转文本)
            • gpt-4.1 (文本转文本)
            • gpt-4.1 (图像分析)
            • gpt-4.1 (图像分析)
            • gpt-4.1 (文件分析)
      • Vidu
        • viduq3-pro
          • gptproto-format
            • viduq3-pro (Image To Video)
            • viduq3-pro (Text To Video)
        • viduq2-pro
          • gptproto-format
            • viduq2-pro (Image To Video)
            • viduq2-pro (Text To Video)
      • Suno
        • suno-music
          • official-format
            • official-format (查询任务)
            • official-format (文本转音频)
      • Midjourney
        • Midjourney
          • task-submission
            • midjourney (imagine)
          • task-query
            • midjourney (fetchfromtask)
      • Grok
        • grok-3
          • openai-format
            • grok-3 (文本转文本 (聊天))
        • grok-4
          • openai-format
            • grok-4 (文本转文本 (聊天))
      • DeepSeek
        • deepseek-v3.2
          • openai-format
            • deepseek-v3.2 (文本转文本)
      • Alibaba
        • qwen-plus
          • openai-format
            • qwen-plus (文本转文本)
        • qwen3-max
          • openai-format
            • qwen3-max (文本转文本)
        • wan-2.5-preview
          • gptproto-format
            • wan-2.5-preview (图片编辑)
            • wan-2.5-preview (查询任务)
            • wan-2.5-preview (图生视频)
            • wan-2.5-preview (文生图)
            • wan-2.5-preview (文生视频)
        • qwen-turbo
          • openai-format
            • qwen-turbo (文本转文本)
      • MiniMax
        • hailuo-02-pro
          • gptproto-format
            • hailuo-02-pro (图生视频)
            • hailuo-02-pro (文生视频)
      • Kling
        • kling-v2.1-pro
          • gptproto-format
            • kling-v2.1-pro (图生视频)
            • kling-v2.1-pro (文生视频)
        • kling-v3.0-pro
          • gptproto-format
            • kling-v3.0-pro (图生视频)
            • kling-v3.0-pro (文生视频)
      • Claude
        • claude-haiku-4-5-20251001
          • official-format
            • claude-haiku-4-5-20251001 (联网搜索)
            • claude-haiku-4-5-20251001 (文件分析)
            • claude-haiku-4-5-20251001 (文本生成)
          • openai-format
            • claude-haiku-4-5-20251001 (联网搜索)
            • claude-haiku-4-5-20251001 (文件分析)
            • claude-haiku-4-5-20251001 (文本生成)
      • Google
        • gemini-2.5-flash
          • official-format
            • gemini-2.5-flash (联网搜索)
            • gemini-2.5-flash (文件分析)
            • gemini-2.5-flash (文本生成)
            • gemini-2.5-flash (图像理解)
        • gemini-2.5-pro
          • official-format
            • gemini-2.5-pro (联网搜索)
            • gemini-2.5-pro (文件分析)
            • gemini-2.5-pro (文本生成)
            • gemini-2.5-pro (图像理解)
      • Runway
        • runwayml-gen3a_turbo-5
          • official-format
            • official-format (提交视频生成任务)
            • official-format (查询任务)
  1. official-format

gpt-5 (文件分析)

来源: https://docs.surgeai.one/docs/allapi/OpenAI/gpt-5/official-format/file-analysis-response
分析和提取各种文件类型的信息,包括文档、电子表格和 PDF

OpenAI 官方格式的文件分析 API (response 接口)。

端点#

POST /v1/responses

cURL 示例 (带 URL)#

成功响应 (200)#

{
  "id": "resp-abc123",
  "object": "response",
  "created": 1699896916,
  "model": "gpt-5",
  "output": "# Document Analysis Summary\n\n## Key Information:\n- Document Type: Financial Report Q3 2024\n- Total Pages: 45\n- Date: September 30, 2024\n\n## Main Topics:\n1. **Revenue Growth**: The company reported a 23% increase in quarterly revenue, reaching $4.2 billion\n2. **Market Expansion**: Successfully entered three new international markets in Asia-Pacific region\n3. **Product Innovation**: Launched two major product lines with positive customer reception\n4. **Operational Efficiency**: Reduced operational costs by 15% through process optimization\n\n## Financial Highlights:\n- Total Revenue: $4.2B (↑23% YoY)\n- Net Income: $850M (↑18% YoY)\n- Operating Margin: 28.5%\n- Cash Flow: $1.1B positive\n\n## Strategic Initiatives:\n- Investment in R&D increased by 30%\n- New partnership agreements with 5 major technology companies\n- Sustainability goals on track with 40% reduction in carbon emissions\n\n## Future Outlook:\nThe company maintains a positive outlook for Q4 2024, projecting continued growth driven by strong product demand and market expansion efforts.",
  "usage": {
    "prompt_tokens": 3500,
    "completion_tokens": 245,
    "total_tokens": 3745
  }
}

错误响应#

401 - 无效签名
403 - 余额不足
500 - 服务器内部错误
503 - 内容策略违规

参数#

参数类型必填默认值描述
modelstring是gpt-5请求使用的模型。必须支持文件分析功能。
inputarray是-包含角色和内容的消息对象数组。每条消息包含: role ("user" 或 "assistant") 和 content (内容对象数组)。
streamboolean否false是否以流式返回响应

Input 内容类型#

每条消息的 content 数组支持以下类型:

input_text#

带有 text 字段的文本提示:
{
  "type": "input_text",
  "text": "Please analyze this file and extract the key information"
}

input_file#

带有 file_url 字段的文件输入。支持:
公开可访问文件的直接 URL
Base64 编码文件: data:{mime-type};base64,{base64_string}
支持的格式: PDF, DOCX, XLSX, TXT, CSV, JSON, XML, HTML
最大文件大小: 20MB
{
  "type": "input_file",
  "file_url": "https://oss.heyoos.com/ai-draw/material/Essential-English.pdf"
}
修改于 2026-03-11 06:24:05
上一页
gpt-5 (图像转文本 (Response))
下一页
gpt-4o (网络搜索 (Response))
Built with