We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
OpenAI: GPT-5.2-Codex
openai/gpt-5.2-codexTry OpenAI: GPT-5.2-Codex now
Runs on your balance at the prices above. New accounts start with free usage.
One API. Every model.
Session cost $0.00
Settings
Advanced parameters
OpenAI: GPT-5.2-Codex at a glance
- Input price is 289% higher than the median of 434 Text models.
- Context window of 400,000 tokens, enough for long documents and multi-turn conversations.
- Supports tool (function) calling for agents and integrations.
- Supports structured JSON output with a schema.
- Supports reasoning effort control.
- Accepts images as input (vision).
- A typical request (1,000 input / 500 output tokens) costs about $0.03.
About OpenAI: GPT-5.2-Codex
GPT-5.2-Codex is an OpenAI model in the GPT-5.2 family, released by the provider on 14 January 2026. It is an upgraded version of GPT-5.1-Codex, optimized for software engineering and coding workflows. It is designed to serve both interactive development sessions and long, independent execution of complex engineering tasks. It sits in the text category, and its focus is code rather than general conversation, which shapes the rest of what it does well.
The model accepts text and images as input and returns text as output. Its context window is 400,000 tokens, and the maximum output is 128,000 tokens. Image input is useful when the material you are reasoning about is a screenshot, a diagram, or a rendering of an interface rather than source text. The combination of a large context window and a large output budget means you can hand it an entire repository slice, a long specification, or a lengthy stack trace and still get a substantial answer back in one call.
Those capabilities point at a fairly specific set of uses. Long, independent execution of complex engineering tasks makes it a candidate for multi-step work such as reading a codebase, planning a change, and carrying it out across many files. Interactive sessions suit it to pair programming style workflows, refactoring, test generation, and debugging from a trace or a screenshot of a failing build. Structured outputs and tool support make it usable as the reasoning core of an agent that reads files, runs commands, or calls other services. Image input extends this to tasks where the relevant artifact is visual, for example turning a design mockup or a diagram into code.
You call it through api14's OpenAI-compatible API using the model id "openai/gpt-5.2-codex", so existing OpenAI SDKs and clients work with only a base URL and key change. The supported request parameters are include_reasoning, max_completion_tokens, reasoning, reasoning_effort, response_format, seed, structured_outputs, tool_choice, tools, and verbosity. In practice, reasoning_effort and verbosity let you trade deliberation and answer length against latency, max_completion_tokens caps the output, response_format and structured_outputs constrain the reply shape, and tools with tool_choice wire the model into function calling. Seed helps when you want repeatable sampling.
Because it is tuned for coding, a general purpose chat model may fit better for tasks with no engineering component, such as marketing copy or open ended conversation. Response quality and latency also depend on how you set reasoning_effort and verbosity, so it is worth benchmarking those settings against your own workloads before committing. There is no stated restriction on the input modalities or parameters beyond what is listed here.
How to call the OpenAI: GPT-5.2-Codex API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-5.2-codex".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.chat.completions.create({
"model": "openai/gpt-5.2-codex",
"messages": [
{
"role": "user",
"content": "Explain vector databases in two sentences."
}
]
});
console.log(result.choices[0].message.content);
Supported parameters
include_reasoningmax_completion_tokensreasoningreasoning_effortresponse_formatseedstructured_outputstool_choicetoolsverbositySpecifications
- Context length
- 400,000
- Max output
- 128,000
- Input
- text, image
- Output
- text
Requests on api14 · last 7 days
OpenAI: GPT-5.2-Codex: frequently asked questions
- How much does the OpenAI: GPT-5.2-Codex API cost?
- OpenAI: GPT-5.2-Codex costs Input $6.13 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of OpenAI: GPT-5.2-Codex?
- OpenAI: GPT-5.2-Codex reads up to 400,000 tokens per request: prompt, history and documents together. It writes up to 128,000 output tokens per response.
- What can OpenAI: GPT-5.2-Codex do?
- OpenAI: GPT-5.2-Codex accepts text, image and returns text. It supports tool calling, structured JSON output, reasoning effort control.
- How do I call OpenAI: GPT-5.2-Codex from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-5.2-codex". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to OpenAI: GPT-5.2-Codex?
- Comparable Text models at a similar price: OpenAI: GPT-5.3-Codex, OpenAI: GPT-5.2 Chat, OpenAI: GPT-5.2. Each runs through the same API key, so switching is one string.
OpenAI: GPT-5.2-Codex community
New topicThis community has no topics yet. Open the first one about OpenAI: GPT-5.2-Codex.