Skip to main content
OpenAI

GPT-5.1 Codex

GPT-5.1 Codex is OpenAI's coding-oriented variant of the GPT-5.1 model line, tuned for software engineering and agentic development workflows.

Input from
$1.25 / 1M tokens
across 1 provider

API Pricing

ProviderInput / 1MOutput / 1MCached / 1M
$1.25$10.00$0.130

Prices updated daily. Last check: Oct 14, 2026

Compare API pricing for every OpenAI model →

GPT-5.1 Codex pricing by provider

Input, output, and batch rates, plus alternatives, for one provider at a time.

Performance & Benchmarks

Source: Artificial Analysis →
Intelligence
23.7 / 100
Math
95.7 / 100

Reasoning & Knowledge

  • MMLU-Pro86.0%
  • GPQA Diamond86.0%
  • Humanity's Last Exam25.7%

Coding

  • LiveCodeBench84.9%

Math

  • AIME 202595.7%

Agentic & Tool Use

  • Terminal-Bench Hard34.8%
  • τ²-bench83.0%

Instruction & Long Context

  • IFBench70.0%
  • Long-Context Reasoning69.3%

Benchmarks measured Oct 2026. Scores are independent evaluations, not vendor-reported.

Model Details

General

Creator
OpenAI
Modalities
Text

Capabilities

Open Source
No

Strengths & Limitations

Strengths

  • Purpose-built branch of the GPT-5.1 family aimed at software engineering rather than general chat
  • Designed for agentic, multi-turn coding sessions where the model iterates on a task rather than answering once
  • Uses the standard chat-completions request pattern, so it drops into existing OpenAI-compatible agent tooling
  • Intended to work directly with repositories and developer tooling rather than isolated code snippets
  • Sits alongside general GPT-5.1 models, allowing teams to route coding traffic separately from general assistant traffic
  • Available from OpenAI through the same API surface and account as the rest of the GPT-5.1 line

Limitations

  • Tuned for coding workloads, so it is not the natural pick for open-ended writing, summarization, or general conversation
  • We do not have confirmed throughput or time-to-first-token measurements for this entry, so latency comparisons are unverified
  • Context window is not confirmed in our data — verify the limit with OpenAI before planning large-repository prompts
  • Proprietary API model, so it cannot be self-hosted and availability depends on OpenAI's provider terms
  • Fewer third-party providers than open-weight coding models, which limits price and region shopping

Key Features

•Coding-specialized variant within the GPT-5.1 model family
•Chat-completions API interface compatible with existing OpenAI clients
•Designed for agentic coding loops with tool and command execution
•Multi-file and repository-scale code editing orientation
•Available through OpenAI's API alongside general-purpose GPT-5.1 models
•Suited to integration with CLI agents, IDE extensions, and CI pipelines

About GPT-5.1 Codex

GPT-5.1 Codex is a model from OpenAI positioned within the GPT-5.1 family as the Codex branch — the line OpenAI maintains specifically for programming and agentic coding work rather than general-purpose conversation. Where the base GPT-5.1 models target broad assistant use, the Codex variants are shaped around the tasks a developer agent actually performs: reading an existing repository, making multi-file edits, running and interpreting commands, and iterating until a change is complete. We track GPT-5.1 Codex as a chat-completions style model, so it is consumed through the same request/response pattern as other OpenAI chat models and slots into existing agent scaffolding without a separate integration path. Our benchmark record for this entry does not yet include measured output throughput or time-to-first-token figures, so we do not publish latency numbers for it; readers comparing speed should treat the provider's own reported figures as the reference until independent measurements land. Likewise, we do not list a confirmed context window for this entry — check OpenAI's model documentation for the current limit before designing around large-repository prompts. In practice, models in this branch are used inside coding agents, CLI tools, IDE extensions, and CI automation, where the model is given tool access and expected to work through a task over many turns rather than answer a single question. When choosing between GPT-5.1 Codex and the general GPT-5.1 line, the deciding factor is usually workload shape: Codex variants for repository-scale engineering tasks, general variants for mixed reasoning, writing, and analysis.

Common Use Cases

GPT-5.1 Codex fits software engineering workloads that run longer than a single prompt: implementing a feature across several files, fixing a failing test suite, refactoring a module, reviewing a diff, or driving a coding agent that reads code, runs commands, and checks its own output. It is a reasonable default for teams building IDE assistants, terminal-based coding agents, or automated pull-request workflows, where the model needs to stay on task across many turns. For workloads that are mostly prose, general question answering, or mixed analysis, the non-Codex GPT-5.1 models are usually the better routing target, and high-volume, low-complexity code completion may be cheaper to serve with a smaller model.

Frequently Asked Questions

How much does GPT-5.1 Codex cost?

Pricing depends on the provider and the pricing model — input versus output tokens, cached input, and any batch or committed-use discounts all change the effective rate. Rates also move over time. Check the pricing table on this page for the current figures across the providers we track.

What is GPT-5.1 Codex best used for?

Agentic software engineering: multi-file edits, repository-level refactoring, test fixing, code review, and any workflow where the model runs in a loop with tool access. It is the coding-focused branch of the GPT-5.1 family, so it targets those tasks ahead of general chat or writing.

How does GPT-5.1 Codex differ from the general GPT-5.1 models?

Both come from OpenAI's GPT-5.1 line, but Codex is the variant shaped for programming and agent-driven development work, while the general models are aimed at broad assistant tasks. Teams often route coding traffic to Codex and everything else to the general models.

Can I run GPT-5.1 Codex on my own hardware?

No. It is served through OpenAI's API rather than distributed as downloadable weights, so it runs on hosted infrastructure. If self-hosting is a requirement, an open-weight coding model is the appropriate category to compare against.

How fast is GPT-5.1 Codex?

Our database does not currently carry measured output throughput or time-to-first-token figures for this model, so we do not publish latency numbers for it. Treat any speed claims from provider documentation as unverified by us until independent measurements are available.