Skip to main content
POST
/
v1
/
responses
File Analysis
curl --request POST \
  --url https://gptproto.com/v1/responses \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "<string>",
  "input": [
    {}
  ],
  "stream": true
}'
{
  "id": "resp-abc123",
  "object": "response",
  "created": 1699896916,
  "model": "gpt-41-2025-04-14",
  "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
  }
}

Overview

This endpoint provides file analysis functionality using advanced models in response mode. Upload files or provide file URLs to extract content, analyze data, summarize documents, or process structured information from various file formats.

Authentication

This endpoint requires authentication using a Bearer token.
Authorization
string
default:"sk-***********"
required
Your API key in the format: sk-*****

Request Body

model
string
default:"gpt-41-2025-04-14"
required
The model to use for the request. Must support file analysis capabilities.
input
array
required
Array of message objects with role and content. Each message contains:
  • role: “user” or “assistant”
  • content: Array of content objects supporting the following types:
    • input_text: Text prompt with text field
    • input_file: File input with file_url field, supports:
      • Direct URL to publicly accessible files: https://oss.heyoos.com/ai-draw/material/Essential-English.pdf
      • Base64 encoded files: data:{mime-type};base64,{base64_string}
      • Supported formats: PDF, DOCX, XLSX, TXT, CSV, JSON, XML, HTML
      • Maximum file size: 20MB
Example with direct file URL:
[
  {
    "role": "user",
    "content": [
      {
        "type": "input_text",
        "text": "Please analyze this file and extract the key information"
      },
      {
        "type": "input_file",
        "file_url": "https://oss.heyoos.com/ai-draw/material/Essential-English.pdf"
      }
    ]
  }
]
stream
boolean
default:false
Whether to stream the response

Request Example

curl --location 'https://gptproto.com/v1/responses' \
--header 'Authorization: sk-*****' \
--header 'Content-Type: application/json' \
--data '{
    "model": "gpt-41-2025-04-14",
    "input": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "Please analyze this PDF document and provide a summary of its content"
                },
                {
                    "type": "input_file",
                    "file_url": "https://oss.heyoos.com/ai-draw/material/Essential-English.pdf"
                }
            ]
        }
    ]
}'

Response

id
string
Unique identifier for the response
object
string
Object type, always “response”
created
integer
Unix timestamp of when the response was created
model
string
The model used for generating the response
output
string
The generated text output (the file analysis results, extracted information, or summary)
usage
object
Token usage statistics
{
  "id": "resp-abc123",
  "object": "response",
  "created": 1699896916,
  "model": "gpt-41-2025-04-14",
  "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
  }
}