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

openai/gpt-5.1-codex
TextInput: text · imageToolsReasoning400KAdded Nov 13, 2025

Try OpenAI: GPT-5.1-Codex now

Runs on your balance at the prices above. New accounts start with free usage.

One API. Every model.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign in

Session cost $0.00

OpenAI: GPT-5.1-Codex 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

GPT-5.1-Codex is a text model from OpenAI, released on 13 November 2025. It is a specialized version of GPT-5.1 optimized for software engineering and coding workflows, built for both interactive development sessions and long, independent execution of complex engineering tasks. It sits in the text category on api14, and the provider describes it as a coding-focused variant rather than a general purpose chat model.

The model accepts text and image input and returns text output. Its context window is 400,000 tokens, and the maximum output is 128,000 tokens, so it can hold large codebases, long logs or extended design documents in a single request while still producing substantial responses. Supported request parameters include include_reasoning, max_completion_tokens, reasoning, reasoning_effort, response_format, seed, structured_outputs, tool_choice, tools and verbosity. Reasoning and verbosity controls let you trade depth against latency, and the tool and structured output parameters make it usable inside automated pipelines rather than only in chat.

Those capabilities point to a few practical uses. Interactive coding sessions, where you paste files or screenshots of errors and iterate on fixes, fit the image input and the long context. Longer autonomous work, such as refactoring across many files, migrating APIs, or working through a backlog of engineering tasks, fits the large output budget and the reasoning controls. Because tools and tool_choice are supported, the model can call functions in an agent loop, and structured_outputs plus response_format make it suitable for generating machine-readable results like patches, configs or review comments. The seed parameter helps when you need repeatable generations during testing.

You call it through api14's OpenAI-compatible API using the model id "openai/gpt-5.1-codex". Point your existing OpenAI client at the api14 base URL, send a standard chat completions request, and set the model field to that id. The parameters listed above can be passed in the request body in the usual way, so code written against OpenAI's API generally works without changes beyond the base URL and model id.

One thing to keep in mind is that the output modality is text only, so it will not generate images. If your task is not related to software engineering, a general model may be a better fit, since this one is tuned for coding workflows.

How to call the OpenAI: GPT-5.1-Codex API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "openai/gpt-5.1-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.1-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_choicetoolsverbosity

Specifications

Context length
400,000
Max output
128,000
Input
text, image
Output
text

Requests on api14 · last 7 days

10-1710-1810-1910-2010-2110-2210-23

OpenAI: GPT-5.1-Codex: frequently asked questions

How much does the OpenAI: GPT-5.1-Codex API cost?
OpenAI: GPT-5.1-Codex 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?
OpenAI: GPT-5.1-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.1-Codex do?
OpenAI: GPT-5.1-Codex 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 from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "openai/gpt-5.1-codex". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to OpenAI: GPT-5.1-Codex?
Comparable Text models at a similar price: OpenAI: GPT-5.1-Codex-Max, OpenAI: GPT-5.1, OpenAI: GPT-5. Each runs through the same API key, so switching is one string.

OpenAI: GPT-5.1-Codex community

New topic

This community has no topics yet. Open the first one about OpenAI: GPT-5.1-Codex.