Skip to main content
POST
/
v1
/
responses
Image 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-5-mini",
  "output": "The image shows a wooden boardwalk path extending through a lush green grassland. The boardwalk appears to lead toward a distant tree line under a bright blue sky with some clouds. The grass on either side of the boardwalk is vibrant green, suggesting it might be spring or summer. The scene has a peaceful, natural atmosphere with good visibility and sunny weather conditions.",
  "usage": {
    "prompt_tokens": 1250,
    "completion_tokens": 89,
    "total_tokens": 1339
  }
}

Overview

This endpoint provides image-to-text functionality using vision-enabled models in response mode. provide image URLs to extract text content, describe scenes, or analyze visual information.

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-5-mini"
required
The model to use for the request. Must be a vision-enabled model.
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_image: Image input with image_url field, supports:
      • Base64 encoded images: data:image/jpeg;base64,{base64_string}
      • Supported formats: JPG, PNG
Example with base64 encoded image:
[
  {
    "role": "user",
    "content": [
      {
        "type": "input_text",
        "text": "What is in this image?"
      },
      {
        "type": "input_image",
        "image_url": "data:image/jpeg;base64,${base64Image}"
      }
    ]
  }
]
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-5-mini",
    "input": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "What is in this image?"
                },
                {
                    "type": "input_image",
                    "image_url": "data:image/jpeg;base64,${base64Image}"
                }
            ]
        }
    ]
}'

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 extracted text or image analysis)
usage
object
Token usage statistics
{
  "id": "resp-abc123",
  "object": "response",
  "created": 1699896916,
  "model": "gpt-5-mini",
  "output": "The image shows a wooden boardwalk path extending through a lush green grassland. The boardwalk appears to lead toward a distant tree line under a bright blue sky with some clouds. The grass on either side of the boardwalk is vibrant green, suggesting it might be spring or summer. The scene has a peaceful, natural atmosphere with good visibility and sunny weather conditions.",
  "usage": {
    "prompt_tokens": 1250,
    "completion_tokens": 89,
    "total_tokens": 1339
  }
}