OpenAI: GPT-5.2 Codex
Chatopenai/gpt-5.2-codexGPT-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. The model supports building projects from scratch, feature development, debugging, large-scale refactoring, and code review. Compared to GPT-5.1-Codex, 5.2-Codex is more steerable, adheres closely to developer instructions, and produces cleaner, higher-quality code outputs. Reasoning effort can be adjusted with the reasoning.effort parameter.
512K context window
128K max output tokens
Released: 2026-01-14
Supported Protocols:openai
Available Providers:Azure
Capabilities:VisionFunction CallingReasoningPrompt CachingWeb SearchAudio InputVideo InputPDF Input
Pricing
| Type | Price |
|---|---|
| Input Tokens | $1.75/M |
| Output Tokens | $14/M |
| Cache Read | $0.18/M |
| Web Search | $0.01/R |
Code Examples
from openai import OpenAIclient = 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)
Related Models
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.
OpenAI: GPT-5.2 Codex supports a context window of 512K tokens with max output of 128K tokens, allowing you to process large documents and maintain long conversations.
Simply set your base URL to https://api.ofox.ai/v1 and use your Ofox API key. The API is OpenAI-compatible โ just change the base URL and API key in your existing code.
OpenAI: GPT-5.2 Codex supports the following capabilities: Vision, Function Calling, Reasoning, Prompt Caching, Web Search, Audio Input, Video Input, PDF Input. Access all features through the Ofox.ai unified API.