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.1-Codex-Max
openai/gpt-5.1-codex-maxTry OpenAI: GPT-5.1-Codex-Max 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.1-Codex-Max at a glance
- Input price is 178% 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.02.
About OpenAI: GPT-5.1-Codex-Max
GPT-5.1-Codex-Max is an OpenAI model in the GPT-5.1 family, released by the provider on 4 December 2025. It is described as OpenAI's agentic coding model, built on an updated version of the 5.1 reasoning stack and trained for agentic work. It sits in the text category and is aimed at software development rather than general conversation, so it is best understood as a specialist tool for code and the tasks around it.
The model accepts text and images as input and returns text only. Its context window is 400,000 tokens, which is large enough to hold substantial source trees, long logs or extended agent transcripts in a single request, and it can produce up to 128,000 output tokens. Because it is a reasoning model, it can expose its reasoning through the include_reasoning and reasoning parameters, and reasoning_effort lets you trade depth of thinking against latency. Verbosity controls how much the model writes, and structured_outputs plus response_format let you constrain replies to a schema when you need machine-readable results.
Those capabilities point to a fairly specific set of uses. Long-running coding agents that read a repository, plan changes and edit files across many steps are the primary fit, especially when the working context is too large for smaller windows. Code review and refactoring of large files, migration work, test generation and debugging from stack traces all benefit from the combination of a big context and reasoning. Image input extends this to tasks where a screenshot, diagram or UI mockup needs to be interpreted alongside code, such as turning a design into markup or diagnosing a rendering problem from a captured screen.
You call the model through api14's OpenAI-compatible API using the model id "openai/gpt-5.1-codex-max". Requests follow the familiar chat completions shape, so existing OpenAI SDKs and clients work with only a base URL and key change. The supported parameters are include_reasoning, max_completion_tokens, reasoning, reasoning_effort, response_format, seed, structured_outputs, tool_choice, tools and verbosity. Tool calling is available through tools and tool_choice, which is what makes multi-step agent loops practical, and seed helps when you want more repeatable sampling.
Keep the scope in mind when choosing it. Output is text only, so it will not generate images or audio, and the reasoning controls mean responses can take longer than a plain chat model when reasoning_effort is set high. For short, low-stakes exchanges or simple text generation where none of the coding or reasoning behaviour matters, a lighter model will usually be the more sensible pick.
How to call the OpenAI: GPT-5.1-Codex-Max 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.1-codex-max".
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.1-codex-max",
"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.1-Codex-Max: frequently asked questions
- How much does the OpenAI: GPT-5.1-Codex-Max API cost?
- OpenAI: GPT-5.1-Codex-Max costs Input $4.38 / 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.1-Codex-Max?
- OpenAI: GPT-5.1-Codex-Max 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.1-Codex-Max do?
- OpenAI: GPT-5.1-Codex-Max accepts text, image and returns text. It supports tool calling, structured JSON output, reasoning effort control.
- How do I call OpenAI: GPT-5.1-Codex-Max from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-5.1-codex-max". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to OpenAI: GPT-5.1-Codex-Max?
- Comparable Text models at a similar price: OpenAI: GPT-5.1, OpenAI: GPT-5.1-Codex, OpenAI: GPT-5. Each runs through the same API key, so switching is one string.
OpenAI: GPT-5.1-Codex-Max community
New topicThis community has no topics yet. Open the first one about OpenAI: GPT-5.1-Codex-Max.