GPT-5-2
GPT-5-2 API is a next-generation multimodal model with exceptional reasoning capabilities, supporting text and image inputs with Web Search grounding and adjustable reasoning effort.
Multimodal
Real-time Search
Reasoning Effort
Flexible Roles
Unified Media File Format
Tools Parameter
Thetools parameter is an optional array that allows you to enable Web Search grounding.
Web Search
Web Search
Authorizations
All APIs require authentication via Bearer Token.
Get API Key:
- Visit API Key Management Page to get your API Key
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
- Keep your API Key secure and do not share it with others
- If you suspect your API Key has been compromised, reset it immediately in the management page
Body
An array of message objects. Each message has a role and content.
Unified Media File Format:
In the content array, only images are supported. All image files use the same format structure:
- The
typefield is always"image_url" - The
image_urlfield name remains unchanged - The only thing that changes is the
urlvalue, which points to the corresponding image address
For example: { type: 'image_url', image_url: { url: '...' } } structure.
1An optional array of tools the model may call. Supports Web Search: {"type": "function", "function": {"name": "web_search"}} - Enables real-time information retrieval via Web Search.
The effort level for the model to use for reasoning. Low effort is faster to respond, high effort is slower to respond but solves more complex problems. Default is "high".
low, high Response
Request successful. Returns the standard chat completion format.
Unique identifier for the chat completion
"chatcmpl-example-123"
Object type
"chat.completion"
Unix timestamp of when the completion was created
1677652288
Model name
"gpt-5-2"
Array of completion choices
