# GPT-5.1-Codex

> OpenAI's GPT-5.1 tuned for long-running, agentic software engineering.

- Maker: OpenAI
- Line: Codex
- Canonical page: https://ai-tldr.dev/models/gpt-5-1-codex/
- Updated: 2026-06-18

## In short

GPT-5.1-Codex is OpenAI's coding-specialized variant of GPT-5.1, released for developers in mid-November 2025. It has a 400K-token context window and costs $1.25 per million input tokens and $10.00 per million output tokens. You can use it through OpenAI and OpenRouter.

## Facts

| Fact | Value | Source |
| --- | --- | --- |
| Context window | 400K (max output 128K) | [1] |
| Input price | $1.25 / 1M tokens (cached $0.125 / 1M tokens) | [2] |
| Output price | $10.00 / 1M tokens | [2] |
| Licence | Proprietary (OpenAI API) · API only | [1] |
| Released | 19 November 2025 | [3] |
| Knowledge cutoff | September 30, 2024 | [1] |

## Sources

1. [GPT-5.1-Codex on OpenRouter](https://openrouter.ai/openai/gpt-5.1-codex)
2. [GPT-5.1-Codex model docs (OpenAI)](https://developers.openai.com/api/docs/models/gpt-5.1-codex)
3. [Introducing GPT-5.1 for developers (OpenAI)](https://openai.com/index/gpt-5-1-for-developers/)

## Overview

GPT-5.1-Codex is OpenAI's coding-specialized variant of GPT-5.1, released for developers in mid-November 2025. While the general-purpose GPT-5.1 handles a broad mix of agentic and coding work, GPT-5.1-Codex is tuned specifically for long-running, autonomous software engineering inside Codex and Codex-like harnesses — the kind of tasks that involve creating pull requests, reviewing code, debugging, and building front-end interfaces over many steps.

The model accepts both text and images (such as screenshots for UI work) and returns text. It offers a 400,000-token context window and can produce up to 128,000 output tokens, with a knowledge cutoff of September 30, 2024. GPT-5.1-Codex is exposed through OpenAI's Responses API and its model snapshot is updated over time; it also powers the Codex CLI, IDE extensions, and cloud, and shipped in public preview inside GitHub Copilot.

GPT-5.1-Codex sits between the lighter GPT-5.1-Codex-Mini and the higher-end GPT-5.1-Codex-Max in OpenAI's coding lineup. It supports adjustable reasoning effort, so developers can trade speed for depth on harder problems. On SWE-bench Verified, GPT-5.1-Codex scores about 73.7% at medium reasoning effort, placing it among the stronger coding models of its generation.

## Benchmarks

- SWE-bench Verified (medium reasoning): 73.7% ([source](https://llm-stats.com/benchmarks/swe-bench-verified))

## Pricing

- Input: $1.25 / 1M tokens per 1M tokens
- Cached input: $0.125 / 1M tokens per 1M tokens
- Output: $10.00 / 1M tokens per 1M tokens

Pricing for the gpt-5.1-codex model on the OpenAI API (Responses API).

Source: https://developers.openai.com/api/docs/models/gpt-5.1-codex

## Strengths

- Purpose-built for long-running, agentic coding loops rather than one-shot completions
- Large 400K-token context window suits big repositories and multi-file refactors
- Accepts image input (e.g. UI screenshots) for front-end and visual debugging tasks
- Adjustable reasoning effort lets you balance latency against problem difficulty
- Integrated across the Codex CLI, IDE extensions, cloud, and GitHub Copilot

## Best for

- Autonomous, multi-step coding tasks such as opening and iterating on pull requests
- Project-scale refactors and deep debugging across large codebases
- Automated code review and Q&A inside Codex or similar agent harnesses
- Front-end and UI development from screenshots or mockups
- Embedding agentic coding into developer tools via the OpenAI Responses API

## How to access

- [OpenAI](https://developers.openai.com/api/docs/models/gpt-5.1-codex) — model id `gpt-5.1-codex`
- [OpenRouter](https://openrouter.ai/openai/gpt-5.1-codex) — model id `openai/gpt-5.1-codex`

## Codex versions

- [GPT-5.3-Codex](https://ai-tldr.dev/models/gpt-5-3-codex/) (5 February 2026)
- [GPT-5.3-Codex-Spark](https://ai-tldr.dev/models/gpt-5-3-codex-spark/) (12 February 2026)
- [GPT-5.2-Codex](https://ai-tldr.dev/models/gpt-5-2-codex/) (11 December 2025)
- GPT-5.1-Codex (19 November 2025) — this page
- [GPT-5-Codex](https://ai-tldr.dev/models/gpt-5-codex/) (September 2025)

## FAQ

### What is GPT-5.1-Codex?

GPT-5.1-Codex is a version of OpenAI's GPT-5.1 optimized for agentic, long-running coding tasks. It is designed to work inside Codex and Codex-like harnesses on jobs such as pull requests, code review, debugging, and front-end development, and is available through the OpenAI Responses API.

### How is GPT-5.1-Codex different from GPT-5.1?

GPT-5.1 is a general-purpose model that handles a broad range of agentic and coding work, while GPT-5.1-Codex is specifically tuned for long-running, autonomous software engineering. OpenAI also offers a lighter GPT-5.1-Codex-Mini and a higher-end GPT-5.1-Codex-Max in the same lineup.

### What is GPT-5.1-Codex's context window and output limit?

GPT-5.1-Codex has a 400,000-token context window and can generate up to 128,000 output tokens. Its knowledge cutoff is September 30, 2024.

### How much does GPT-5.1-Codex cost?

On the OpenAI API, GPT-5.1-Codex is priced at $1.25 per million input tokens, $0.125 per million cached input tokens, and $10.00 per million output tokens.

## Links

- [GPT-5.1-Codex model docs (OpenAI)](https://developers.openai.com/api/docs/models/gpt-5.1-codex)
- [Introducing GPT-5.1 for developers (OpenAI)](https://openai.com/index/gpt-5-1-for-developers/)
- [GPT-5.1-Codex in public preview for GitHub Copilot](https://github.blog/changelog/2025-11-13-openais-gpt-5-1-gpt-5-1-codex-and-gpt-5-1-codex-mini-are-now-in-public-preview-for-github-copilot/)
- [GPT-5.1-Codex on OpenRouter](https://openrouter.ai/openai/gpt-5.1-codex)
- [SWE-bench Verified leaderboard (llm-stats)](https://llm-stats.com/benchmarks/swe-bench-verified)

Source: AI/TLDR LLM registry, https://ai-tldr.dev/models/gpt-5-1-codex/
