Textby OpenAI

GPT-5.2-Codex

GPT-5.2-Codex is an upgraded version of GPT-5.1-Codex optimized for software engineering and coding workflows. It is designed for both interactive development sessions and long, independent execution of complex engineering tasks....

  • By price it is in the pricier half of the 345 text models GenMagic runs (305th cheapest).
  • Among the models GenMagic runs, it places in the top 10 on 1 of its 8 benchmarks: 7th of 39 on Terminal-Bench.
  • It was listed on Jan 14, 2026.

Data last changed Nov 12, 2026 · tracked since Oct 29, 2026 · Every model change

Try GPT-5.2-Codex

Generate with GPT-5.2-Codex right here. Verify your email to start with free credits.

~$0.024
Try

Specifications

Context window

400K tokens

Max output

128K tokens

Input price

$2.63 / 1M tokens

Output price

$21.00 / 1M tokens

Cached input

$0.26 / 1M tokens

Benchmarks

How GPT-5.2-Codex scores on public benchmarks. Each card links to the benchmark explainer and to the original source.

Compare against every model in the full benchmark matrix.

Capabilities

Reasoning

Works through multi-step problems before answering, for harder tasks.

Vision input

Accepts images alongside text, so you can prompt with pictures and screenshots.

Tool use

Can call functions and tools, enabling agentic and structured workflows.

Structured output

Returns validated JSON that conforms to a schema you define.

Use GPT-5.2-Codex through the API

The model id is openai/gpt-5.2-codex. Requests bill your GenMagic balance at the price above, and each response reports what it cost.

curl
curl https://genmagic.co/api/v1/chat/completions \
  -H "Authorization: Bearer $GENMAGIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.2-codex",
    "messages": [{ "role": "user", "content": "Explain vector databases in two sentences." }]
  }'
Python (openai SDK)
from openai import OpenAI

client = OpenAI(base_url="https://genmagic.co/api/v1", api_key="YOUR_GENMAGIC_API_KEY")

resp = client.chat.completions.create(
    model="openai/gpt-5.2-codex",
    messages=[{"role": "user", "content": "Explain vector databases in two sentences."}],
)
print(resp.choices[0].message.content)

From an AI agent, call generate_text with "model": "openai/gpt-5.2-codex" on the GenMagic MCP server. Keys, limits and every endpoint are in the API documentation.

Use GPT-5.2-Codex in n8n

  1. In n8n, open the nodes panel, search for GenMagic and install it (a verified community node), then add it to your workflow.
  2. Set Resource to Text and Operation to Generate.
  3. In Model Name or ID, pick OpenAI: GPT-5.2-Codex, or enter openai/gpt-5.2-codex as an expression.
  4. Connect your GenMagic API key (get one free). Each run is billed at the price above, and the node returns what it cost.

Ready-to-import workflows that already use the node are on GenMagic for n8n.

Similar-priced text models from other providers

Other text models GenMagic runs at a comparable price, on the same balance and API key.

ModelProviderPriceContext
OpenAI: GPT-5.2-Codex (this model)OpenAI$2.63 in / $21.00 out per 1M tokens400K
Qwen: Qwen3.8 Max PrimeQwen$6.00 in / $18.00 out per 1M tokens1M
MoonshotAI: Kimi K3Moonshot AI$0.29 in / $24.00 out per 1M tokens1M
Amazon: Nova Premier 1.0Amazon$3.75 in / $18.75 out per 1M tokens1M
Google: Gemini 3.1 Pro Preview Custom ToolsGoogle$3.00 in / $18.00 out per 1M tokens1M
Fireworks: Ember-1Fireworks$4.50 in / $22.50 out per 1M tokens1M

More from OpenAI

All 70 OpenAI models

Price and listing history

Every change GenMagic has recorded for GPT-5.2-Codex since it began tracking the model on Oct 29, 2026. Prices are GenMagic's, the same the studio and the API charge.

DateChangeBeforeAfter
Nov 1, 2026Price up 36%$1.93 in / $15.40 out per 1M tokens$2.63 in / $21.00 out per 1M tokens

Where these figures come from

  • Price: GenMagic's own price, what the studio and the API charge, recomputed from the provider's price list every few minutes and recorded daily. How pricing works.
  • Specs and description: as OpenAI publishes them, checked daily.
  • Benchmarks: 8 scores from Epoch AI, Design Arena, re-read daily. Each score above links to its source.
  • Changes: the data on this page last changed on Nov 12, 2026, tracked since Oct 29, 2026. Every model's new listings, price changes and retirements are in the model changes log, and how every figure on GenMagic is sourced is on our sources page.

Generate with GPT-5.2-Codex today

One GenMagic plan unlocks GPT-5.2-Codex and every other model across text, image, audio, and video.