AI agents · OpenClaw · self-hosting · automation

Quick Answer

GPT-5.4 API Guide: Pricing, Capabilities, and Migration from GPT-5.2

Published: • Updated:

GPT-5.4 API Guide: Pricing, Capabilities, and Migration from GPT-5.2

GPT-5.4 is OpenAI’s latest frontier model, released March 5, 2026. Use gpt-5.4 in the API. It’s the first general-purpose model with native computer-use capabilities, supports 1M token context, and uses 47% fewer tokens than GPT-5.2 for complex tasks.

TL;DR for Developers

WhatValue
API Model Namegpt-5.4
Pro Versiongpt-5.4-pro
Input Price$2.50 / 1M tokens
Output Price$15 / 1M tokens
Cached Input$0.25 / 1M tokens (90% savings)
Context Window1M tokens (experimental in Codex)
GPT-5.2 DeprecationJune 5, 2026

API Model Names

# Standard GPT-5.4
response = client.chat.completions.create(
    model="gpt-5.4",
    messages=[{"role": "user", "content": "..."}]
)

# Pro version for complex tasks
response = client.chat.completions.create(
    model="gpt-5.4-pro",
    messages=[{"role": "user", "content": "..."}]
)

Pricing Comparison: GPT-5.4 vs GPT-5.2

ModelInputCached InputOutput
gpt-5.4$2.50/M$0.25/M$15/M
gpt-5.4-pro$30/M$180/M
gpt-5.2$1.75/M$0.175/M$14/M
gpt-5.2-pro$21/M$168/M

Cost change from GPT-5.2:

  • Input: +43% ($1.75 → $2.50)
  • Output: +7% ($14 → $15)
  • BUT: Uses ~47% fewer tokens for tool-heavy workflows

Special pricing tiers:

  • Batch/Flex: 50% of standard rate
  • Priority processing: 2x standard rate
  • Data residency/Regional: +10% for GPT-5.4 models

Key Capabilities (New in GPT-5.4)

1. Native Computer Use

First general-purpose model with built-in computer control. Operates via:

  • Playwright code generation
  • Mouse/keyboard commands from screenshots
  • Customizable confirmation policies for safety

Benchmark: OSWorld-Verified

  • GPT-5.4: 75.0% (exceeds human performance at 72.4%)
  • GPT-5.2: 47.3%

2. 1M Token Context Window

Experimental support in Codex. Configure with:

model_context_window = 1000000
model_auto_compact_token_limit = ...

⚠️ Requests exceeding 272K context count at 2x the normal rate.

For large tool ecosystems, GPT-5.4 can search through tools instead of loading all definitions upfront:

  • Reduces token usage by 47% in MCP-heavy workflows
  • Enables working with thousands of tools efficiently

4. Improved Reasoning Efficiency

Most token-efficient reasoning model yet:

  • Fewer tokens to solve same problems vs GPT-5.2
  • Faster speeds at same quality
  • /fast mode in Codex: 1.5x faster token velocity

Benchmark Improvements over GPT-5.2

BenchmarkGPT-5.4GPT-5.2Improvement
GDPval (knowledge work)83.0%70.9%+12.1%
OSWorld (computer use)75.0%47.3%+27.7%
BrowseComp (web search)82.7%65.8%+16.9%
SWE-Bench Pro (coding)57.7%55.6%+2.1%
Toolathlon (tool use)54.6%45.7%+8.9%
MMMU Pro (vision)81.2%79.5%+1.7%

Hallucination reduction:

  • Individual claims: 33% less likely to be false
  • Full responses: 18% fewer errors

Migration from GPT-5.2

Timeline

  • Now: GPT-5.4 available as gpt-5.4
  • Now → June 5, 2026: GPT-5.2 in “Legacy Models” (ChatGPT)
  • June 5, 2026: GPT-5.2 Thinking retired

Code Changes

# Before (GPT-5.2)
model = "gpt-5.2"

# After (GPT-5.4)
model = "gpt-5.4"

Reasoning Effort Mapping

GPT-5.2GPT-5.4
nonenone
lowlow
mediummedium
highhigh
heavyxhigh

New Parameters

  • model_context_window: Set context limit (up to 1M)
  • model_auto_compact_token_limit: Auto-compact threshold
  • Tool search: Lightweight tool list + search capability

When to Use GPT-5.4 Pro

Use gpt-5.4-pro for:

  • Maximum accuracy on complex tasks
  • Long-horizon planning
  • High-stakes outputs where cost is secondary

Pro benchmarks:

  • BrowseComp: 89.3% (vs 82.7% standard)
  • ARC-AGI-2: 83.3% (vs 73.3% standard)
  • FrontierMath Tier 4: 38.0% (vs 27.1% standard)

ChatGPT Availability

PlanGPT-5.4 ThinkingGPT-5.4 Pro
Plus
Team
Pro
Enterprise✅ (admin enable)
Edu✅ (admin enable)

FAQ

What’s the API model name for GPT-5.4? Use gpt-5.4 for the standard model or gpt-5.4-pro for maximum performance.

How much more expensive is GPT-5.4 than GPT-5.2? Input is 43% more expensive ($1.75 → $2.50/M), output is 7% more ($14 → $15/M). However, GPT-5.4 uses ~47% fewer tokens for complex tool workflows, often reducing total cost.

When will GPT-5.2 be deprecated? GPT-5.2 Thinking will be retired on June 5, 2026. It’s available now under “Legacy Models” in ChatGPT.

Does GPT-5.4 support computer use? Yes — it’s the first general-purpose model with native computer-use capabilities. Use the computer tool in the API.

What’s the context window? Standard: 272K tokens. Experimental 1M context available in Codex (counts at 2x rate above 272K).

How do I enable tool search? Provide a lightweight list of available tools; the model can search for full definitions when needed. See OpenAI’s updated documentation.

What’s the difference between GPT-5.4 and GPT-5.3-Codex? GPT-5.4 combines GPT-5.3-Codex’s coding strengths with knowledge work and computer-use capabilities. It matches or exceeds Codex on coding benchmarks while being faster.


Last verified: March 6, 2026

Sources: