GPT-5.2-Codex - Image To Text - Response
Pro gpt 5.2 codex image to text. Expert visual analysis for developers, engineers, and technical designers.
POST
gpt-5.2-codex (Image To Text (Response))
Documentation Index
Fetch the complete documentation index at: https://docs.gptproto.com/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
- Sign up for a GPTProto account at https://gptproto.com
- Navigate to the API Keys section in your dashboard
- Generate a new API key (sk-xxxxx)
- Copy and securely store your API key For authentication details, please refer to the Authentication section.
Initiate Request
Parameters
Core Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
model | string | ✅ Yes | - | - | Model ID used to generate the response, like gpt-4o or o3. |
input | string/array | ✅ Yes | - | - | Input content for the model. |
>input.role | string | ✅ Yes | - | userassistantsystemdeveloper | The role of the message input. One of user, assistant, system, or developer. |
>input.content | string/array | ✅ Yes | - | - | A text input to the model when string; a list of one or many input items to the model, containing different content types when array. See Multimodal Input for details. |
Advanced Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
stream | boolean | ❌ No | false | truefalse | Whether to stream the response back incrementally. Defaults to false. |
max_output_tokens | integer | ❌ No | - | - | An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. |
reasoning | object | ❌ No | - | - | Configuration options for reasoning models (gpt-5 and o-series models only). |
>reasoning.effort | string | ❌ No | medium | noneminimallowmediumhighxhigh | Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning. See Model-Specific Reasoning Configurations for details. |
>reasoning.summary | string | ❌ No | - | autoconcisedetailed | A summary of the reasoning performed by the model. Useful for debugging and understanding the model’s reasoning process. |
tools | array | ❌ No | - | - | A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. See Tools Parameters for details. |
Multimodal Input
| parameter | Type | Required | Default | Range / Example | Description |
|---|---|---|---|---|---|
content.type | string | ✅ Yes | — | input_textinput_imageinput_file | Identifies the content block type for multimodal input. |
content.text | string | ❌ No | — | - | The text input to the model. |
content.file_id | string | ❌ No | - | - | The ID of the file to be sent to the model. |
content.detail | string | ❌ No | auto | highlowauto | The detail level of the image to be sent to the model. One of high, low, or auto. Defaults to auto. Only required when type=input_image. |
content.image_url | string | ❌ No | - | - | The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. Only required when type=input_image. |
content.file_url | string | ❌ No | - | - | The URL of the file to be sent to the model. Only required when type=input_file. |
content.file_data | string | ❌ No | - | - | The content of the file to be sent to the model. Only required when type=input_file. |
content.filename | string | ❌ No | - | - | The name of the file to be sent to the model. Only required when type=input_file. |
Tools Parameters
| parameter | Type | Required | Default | Range / Example | Description |
|---|---|---|---|---|---|
type | string | ✅ Yes | — | web_searchweb_search_2025_08_26 | The type of the web search tool. One of web_search or web_search_2025_08_26. |
filters | object | ❌ No | - | - | Filters for the search. |
>filters.allowed_domains | string | ❌ No | - | ["pubmed.ncbi.nlm.nih.gov"] | Allowed domains for the search. If not provided, all domains are allowed. Subdomains of the provided domains are allowed as well. |
tools.search_context_size | string | ❌ No | medium | lowmediumhigh | High level guidance for the amount of context window space to use for the search. One of low, medium, or high. medium is the default. |
user_location | object | ❌ No | - | - | The approximate location of the user. |
>user_location.city | string | ❌ No | - | - | Free text input for the city of the user, e.g. San Francisco. |
>user_location.country | string | ❌ No | - | - | The two-letter ISO country code of the user, e.g. US. |
>user_location.region | string | ❌ No | - | - | Free text input for the region of the user, e.g. California. |
>user_location.timezone | string | ❌ No | - | - | The IANA timezone of the user, e.g. America/Los_Angeles. |
>user_location.type | string | ❌ No | approximate | - | The type of location approximation. Always approximate. |
Model-Specific Reasoning.effort Configurations
Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.- gpt-5.1 defaults to none, which does not perform reasoning. The supported reasoning values for gpt-5.1 are none, low, medium, and high. Tool calls are supported for all reasoning values in gpt-5.1.
- All models before gpt-5.1 default to medium reasoning effort, and do not support none.
- The gpt-5-pro model defaults to (and only supports) high reasoning effort.
- xhigh is supported for all models after gpt-5.1-codex-max.
Response Example
Error Codes
Common Error Codes
| Error Code | Error Name | Description |
|---|---|---|
| 401 | Unauthorized | API key is missing or invalid |
| 403 | Forbidden | Your API key doesn’t have permission to access this resource, or insufficient balance for the requested operation |
| 429 | Too Many Requests | You’ve exceeded your rate limit |
| 500 | Internal server error | An internal server error occurred |
| 503 | Content policy violation | Content blocked due to safety concerns (actual status code is 400) |

