APIMart
Back to all models

GPT-5.2 API

OpenAIModel ID gpt-5.2Text modelReleased December 11, 2025

Use GPT-5.2 to check a financial model for broken formulas, review a pull request against your coding rules, or answer questions across a long contract.

Max input
272,000 tokens
Max output
128,000 tokens
Input → output
Text, Image → Text
Knowledge cutoff
August 31, 2025
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

GPT-5.2 API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on GPT-5.2.

Try GPT-5.2 with your own material

Checking spreadsheets and financial models

Paste the formulas and key outputs of a model and ask GPT-5.2 to find inconsistent references and unit errors. Recalculate any flagged cell before you rely on the fix.

Example: Why doesn’t this revenue total add up?

Material

Spreadsheet formulas
B2 = units (1,200); C2 = price per unit (25); D2 = B2*C2; D3..D12 = the same for other products; D13 = SUM(D2:D11)

PromptCheck the formulas below for errors and explain which cell is wrong and how to fix it.

Sample answer · written by hand to show the reasoning

The total in D13 stops at D11, so the product in row 12 is left out. Change D13 to SUM(D2:D12). D2 = 1,200 × 25 = 30,000 is correct. After the change, check that D13 equals the sum of all product rows.

About the GPT-5.2 API

  • Built for professional work

    OpenAI released GPT-5.2 in December 2025 for knowledge work such as spreadsheets, presentations and code; it is the API version of GPT-5.2 Thinking.

  • 400K context, 128K output

    The context window is 400,000 tokens and the maximum output 128,000 tokens, with text and image input.

  • Reasoning from none to xhigh

    Reasoning effort defaults to none and goes up to xhigh. Function calling, structured outputs and streaming are supported.

  • GPT-5.2 API key and access

    You don’t need a separate GPT-5.2 API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint; send gpt-5.2 API requests with the model ID gpt-5.2. GPT-5.2 API pricing is in the table on this page.

GPT-5.2 official benchmark results

Selected results OpenAI published at launch.

  • GDPval

    70.9%

    Wins or ties against industry professionals on knowledge-work tasks. GPT-5 scored 38.8%.

  • SWE-Bench Pro (public)

    55.6%

    Fixing real issues across several programming languages. Ahead of GPT-5.1 Thinking (50.8%).

  • SWE-bench Verified

    80.0%

    Fixing real issues in Python repositories. Ahead of GPT-5.1 Thinking (76.3%).

  • GPQA Diamond

    92.4%

    Graduate-level science questions without tools. Ahead of GPT-5.1 Thinking (88.1%).

  • ARC-AGI-2 (Verified)

    52.9%

    Abstract reasoning puzzles. GPT-5.1 Thinking scored 17.6%.

  • CharXiv reasoning

    88.7%

    Reasoning about scientific charts, with Python. Ahead of GPT-5.1 Thinking (80.3%).

How to call the GPT-5.2 API

To call GPT-5.2, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "gpt-5.2",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

GPT-5.2 access details

Model IDgpt-5.2
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

GPT-5.2 API request parameters

GPT-5.2 uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use gpt-5.2 for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

GPT-5.2 API pricing

The GPT-5.2 API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input14Credits~$1.413.3Credits~$1.3312.6Credits~$1.2617.5Credits~$1.7520%
Cached input1.4Credits~$0.141.33Credits~$0.1331.26Credits~$0.1261.75Credits~$0.17520%
Output112Credits~$11.2106.4Credits~$10.64100.8Credits~$10.08140Credits~$1420%

Prices are for reference only. View full pricing

Why call GPT-5.2 API through APIMart

  • 20% below official pricing

    GPT-5.2 API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below OpenAI's official prices, and cached input costs just $0.14 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    GPT-5.2, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try GPT-5.2 with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Which OpenAI model should you choose?

Base prices per 1M tokens (USD). Your GPT-5.2 API key works for every model in the table; just change the model parameter.

Differences between OpenAI models
ComparisonGPT-5.2 CurrentGPT-4oGPT-4o miniGPT-4o-2024-11-20GPT-4.1GPT-4.1 minio3GPT-5GPT-5 miniGPT-5 nanoGPT-5 ProGPT-5 SearchGPT-5.1GPT-5.2 ProGPT-5.3-CodexGPT-5.4GPT-5.4 miniGPT-5.4 nanoGPT-5.4 ProGPT-5.5GPT-5.6 LunaGPT-5.6 SolGPT-5.6 TerraGPT-6 AstraGPT-6 LunaGPT-6 SolGPT-6.1 SolGPT-6.1 TerraGPT-6.2 AstraGPT-6.2 Sol
Best forProfessional work, Reasoning up to xhigh, Text and image inputText and image input, Function calling and structured outputs, No reasoning step, fast repliesHigh-volume classification and extraction, Text and image input, Low-cost small modelNewest GPT-4o snapshot, Text and image input, No reasoning step, fast repliesInstruction following, Deprecated, 1M-token contextFast and low-cost, Deprecated, 1M-token contextDeep reasoning, Visual reasoning, Coding and technical writingCoding and agents, Deprecated, Reasoning effort minimal to highCost-efficient reasoning, Deprecated, 400K contextFastest and cheapest, Deprecated, ClassificationHard reasoning, Deprecated, Responses APIWeb search in Chat Completions, Searches before every answer, Text in, text outCoding and agents, Deprecated, Text and image inputHard reasoning, More compute per request, Responses APIAgentic coding, 400K context, Responses APICoding and professional work, 1.05M context, Text and image inputCoding and subagents, 400K context, Text and image inputClassification and extraction, Cheapest GPT-5.4 model, Text and image inputHard reasoning, More compute per request, Text and image inputCoding and professional work, 1.05M context, Reasoning from none to xhighHigh-volume tasks, Classification, Data extractionComplex professional work, Coding and debugging, Text and image inputBalanced cost, Support and review, Text and image inputComplex coding, Professional work, ResearchStructured summaries, Classification, Data extractionComplex coding, Agentic workflows, Testing and debuggingComplex coding, Professional documents, Business workflowsVisual reasoning, Drawings and screenshots, WritingComplex coding, Long-document analysis, Professional researchEveryday coding, Agentic tasks, Writing
Input typesText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageTextText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, ImageText, Image
Max input272,000 tokens128,000 tokens128,000 tokens128,000 tokens1,047,576 tokens1,047,576 tokens200,000 tokens272,000 tokens272,000 tokens272,000 tokens272,000 tokens272,000 tokens272,000 tokens272,000 tokens272,000 tokens922,000 tokens272,000 tokens272,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens922,000 tokens
Max output128,000 tokens16,384 tokens16,384 tokens16,384 tokens32,768 tokens32,768 tokens100,000 tokens128,000 tokens128,000 tokens128,000 tokens272,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens128,000 tokens
Knowledge cutoffAugust 31, 2025October 1, 2023October 1, 2023October 1, 2023June 1, 2024June 1, 2024June 1, 2024September 30, 2024May 31, 2024May 31, 2024September 30, 2024—September 30, 2024August 31, 2025August 31, 2025August 31, 2025August 31, 2025August 31, 2025August 31, 2025December 1, 2025February 16, 2026February 16, 2026February 16, 2026April 30, 2026May 18, 2026April 20, 2026April 30, 2026June 1, 2026May 18, 2026June 1, 2026
Input price$1.4$2$0.12$2$1.6$0.32$1.6$1$0.2$0.04$12$1$1$16.8$1.4$2$0.6$0.16$24$4$0.16$3.2$1.6$8$0.08$1.6$1.6$0.8$6.4$1.6
Output price$11.2$8$0.48$8$6.4$1.28$6.4$8$1.6$0.32$96$8$8$134.4$11.2$12$3.6$1$144$24$0.96$16$9.6$40$0.4$8$8$4$32$8

GPT-5.2 FAQ

Should I use GPT-5.2 or a newer GPT model?

For new projects, compare a GPT-6 model first: OpenAI now recommends GPT-6.2 Astra as its latest model. Keep GPT-5.2 where your prompts and evaluations are already validated on it. On APIMart every GPT model uses the same endpoint and API key, so switching only changes the model parameter.

Is the context window 400,000 or 272,000 tokens?

OpenAI lists a total context window of 400,000 tokens for GPT-5.2, of which up to 272,000 tokens are input and up to 128,000 tokens are output. This page lists max input and max output separately.

Which reasoning effort levels does GPT-5.2 support?

Five: none, low, medium, high and xhigh, with none as the default, according to OpenAI’s model docs. OpenAI’s published benchmarks for GPT-5.2 were run at xhigh. Without a reasoning_effort parameter it answers without extended reasoning, so set medium or higher for hard analysis.

Is GPT-5.2 the same as GPT-5.2 Thinking in ChatGPT?

Yes. OpenAI’s launch post says GPT-5.2 Thinking is available in the API as gpt-5.2. The faster GPT-5.2 Instant was offered as gpt-5.2-chat-latest, which OpenAI shut down on August 10, 2026.

What is the difference between GPT-5.2 and GPT-5.2 Pro?

GPT-5.2 Pro uses more compute per request for harder problems, scores higher on several of OpenAI’s benchmarks, costs many times more and is available only through the Responses API. GPT-5.2 is the everyday model and also works with Chat Completions.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select GPT-5.2 in the text category to start exploring.

Which model ID does the GPT-5.2 API use?

Set model to gpt-5.2. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of GPT-5.2?

On APIMart, GPT-5.2 accepts up to 272,000 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

GPT-5.2 can output up to 128,000 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the GPT-5.2 API cost?

The GPT-5.2 API on APIMart is billed by token, and prices depend on your membership tier. Gold: $1.4 per million input tokens and $11.2 per million output tokens. Diamond: $1.26 per million input tokens and $10.08 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.