Speed
Output tokens / second
Custom pricing for production workloads
GPT-5.2 is OpenAI's next-generation language model with extended context and enhanced performance.
With significant upgrades in reasoning, vision, coding, and long-context handling, GPT-5.2 delivers state-of-the-art performance across professional tasks.
openai/gpt-5-2https://api.aimlapi.com/v1GPT-5.2 represents OpenAI's latest advancement in large language models, engineered for deeper analytical work and superior handling of complex, real-world tasks. It excels at coding assistance, long-document summarization, precise analysis of uploaded files, step-by-step math and logic breakdowns, and structured support for planning and decision-making with enhanced clarity and actionable detail.
This model builds on prior iterations with refined reasoning chains and output polish, making it ideal for professional workflows requiring reliability and depth across technical and cognitive domains.
These technical innovations empower GPT-5.2 to deliver high-precision AI assistance for enterprises, developers, educators, and researchers. Ideal for applications requiring reliable long-context understanding, coding tools, multilingual communication, and content creation workflows.
GPT-5.2 is documented as suited for code-heavy and multi-step agentic tasks, including complex reasoning and broad world knowledge. It is also described as useful for creating spreadsheets, building presentations, writing code, and handling complex, multi-step projects. For professional engineering work, it is presented as a model for debugging production code, implementing feature requests, refactoring large codebases, and shipping fixes end-to-end with less manual intervention. It is additionally described as well suited for analyzing long documents, such as reports, contracts, research papers, transcripts, and multi-file projects, with support for deep analysis, synthesis, and complex multi-source workflows.
See how GPT-5.2 compares in generation speed. Data retrieved Nov 3, 2026.
Output tokens / second
Compare 16 models available on AI/ML API across 5 independent benchmarks.
Expert-written questions across academic subjects.
Graduate-level science questions written to resist web search.
Reasoning across long documents of about 100k tokens.
Following precise instructions about the shape of the answer.
Customer support agent tasks with tool calls.
| Usage | Price | Unit |
|---|---|---|
| Input | $1.75 | 1M tokens |
| Output | $14 | 1M tokens |
| Cached input | $0.175 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $1.75 | $14 | |
| $0.1 | $0.5 | |
| $1 | $5 | |
| $2 | $10 | |
| $2.12 | $10.58 |
Give your agent the model details, code and documentation.
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"curl 'https://api.aimlapi.com/v1/chat/completions' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "openai/gpt-5-2",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "openai/gpt-5-2",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = await fetch("https://api.aimlapi.com/v1/chat/completions", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"model": "openai/gpt-5-2",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());GPT-5.2 has a 400,000 tokens context window and can return up to 128,000 tokens.
GPT-5.2 takes image, text as input and returns text.
Use openai/gpt-5-2 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
GPT-5.2 costs $1.75 input and $14 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Yes, GPT-5.2 can stream responses as they are generated.
Yes, GPT-5.2 accepts image input alongside text.
GPT-5.2 was built by OpenAI.
Yes, it supports function calling, parallel tool calls, and structured outputs.