GPT-5.6 is here 🎉 20% off all GPT 🎉 All July 🔥Learn more
OpenAI

OpenAI: GPT-5.2 Codex

Chat-20%
openai/gpt-5.2-codex
CompareGet Started

GPT-5.2 Codex is OpenAI's upgraded Codex model for software engineering and coding workflows, released on 2026-01-14. It is built for both interactive development sessions and long, independent execution of complex engineering tasks, covering projects built from scratch, feature development, debugging, large-scale refactoring, and code review. Compared with GPT-5.1-Codex it is more steerable, adheres closely to developer instructions, and produces cleaner, higher-quality code; reasoning effort can be tuned with the reasoning.effort parameter. It also supports tool use, prompt caching, web search, and image, audio, and video input. Context window: 512K tokens, output: 128K. Accessible via the OpenAI-compatible protocol.

Context Window
512K
Max Output Tokens
128K
Released
2026-01-14
Capabilities
VisionFunction CallingReasoningPrompt CachingWeb SearchAudio InputVideo Input
Available Providers
AzureAzure
Supported Protocols
OpenAIopenai

Providers

AzureAzure
-20%
Input Tokens
$1.4/M
$1.75/M
Output Tokens
$11.2/M
$14/M
Cache Read
$0.144/M
$0.18/M
Web Search
$0.035/R
Protocols
OpenAIopenai/v1/responses

Code Examples

from openai import OpenAI
client = OpenAI(
base_url="https://api.ofox.ai/v1",
api_key="YOUR_OFOX_API_KEY",
)
response = client.chat.completions.create(
model="openai/gpt-5.2-codex",
messages=[
{"role": "user", "content": "Hello!"}
],
)
print(response.choices[0].message.content)

Frequently Asked Questions

OpenAI: GPT-5.2 Codex on Ofox.ai costs $1.75/M per million input tokens and $14/M per million output tokens. Pay-as-you-go, no monthly fees.