All models

OpenAI: GPT-5.1-Codex

by OpenAI

GPT-5.1-Codex is a specialized version of GPT-5.1 optimized for software engineering and coding workflows. It is designed for both interactive development sessions and long, independent execution of complex engineering tasks. The model supports building projects from scratch, feature development, debugging, large-scale refactoring, and code review. Compared to GPT-5.1, Codex is more steerable, adheres closely to developer instructions, and produces cleaner, higher-quality code outputs. Reasoning effort can be adjusted with the `reasoning.effort` parameter. Read the [docs here](https://openrouter.ai/docs/use-cases/reasoning-tokens#reasoning-effort-level) Codex integrates into developer environments including the CLI, IDE extensions, GitHub, and cloud tasks. It adapts reasoning effort dynamically—providing fast responses for small tasks while sustaining extended multi-hour runs for large projects. The model is trained to perform structured code reviews, catching critical flaws by reasoning over dependencies and validating behavior against tests. It also supports multimodal inputs such as images or screenshots for UI development and integrates tool use for search, dependency installation, and environment setup. Codex is intended specifically for agentic coding applications.

Avg Score

0.0%

0 answers

Avg Latency

0ms

0 runs

Pricing

$1.25

input

/

$10.00

output

per 1M tokens

Context

400K

tokens

Alternatives

Models with similar or better quality but different tradeoffs

No alternatives found

Run benchmarks on this model to discover alternatives

Other Models from OpenAI

Compare performance with other models from the same creator

ModelScoreLatencyCost/1M
OpenAI: GPT-5.287.1%4.8s$7.88
OpenAI: GPT-5.2 Pro85.5%18.2s$94.50
OpenAI: GPT-5.2 Chat84.9%4.2s$7.88
OpenAI: GPT-5 Mini80.0%8.6s$1.13
OpenAI: GPT-5 Nano78.8%12.8s$0.22
OpenAI: gpt-oss-20b73.3%6.2s$0.06
OpenAI: gpt-oss-120b47.8%11.1s$0.11
OpenAI: GPT-5.1-Codex-Max$5.63
OpenAI: GPT-5.1$5.63
OpenAI: GPT-5.1 Chat$5.63
OpenAI: GPT-5.1-Codex-Mini$1.13
OpenAI: gpt-oss-safeguard-20b$0.19
OpenAI: GPT-5 Image Mini$2.25
OpenAI: GPT-5 Image$10.00
OpenAI: o3 Deep Research$25.00
OpenAI: o4 Mini Deep Research$5.00
OpenAI: GPT-5 Pro$67.50
OpenAI: GPT-5 Codex$5.63
OpenAI: GPT-4o Audio$6.25
OpenAI: GPT-5 Chat$5.63
OpenAI: GPT-5$5.63
OpenAI: gpt-oss-120b$0.0000
OpenAI: gpt-oss-120b$0.11
OpenAI: gpt-oss-20b$0.0000
OpenAI: o3 Pro$50.00
OpenAI: Codex Mini$3.75
OpenAI: o4 Mini High$2.75
OpenAI: o3$5.00
OpenAI: o4 Mini$2.75
OpenAI: GPT-4.1$5.00
OpenAI: GPT-4.1 Mini$1.00
OpenAI: GPT-4.1 Nano$0.25
OpenAI: o1-pro$375.00
OpenAI: GPT-4o-mini Search Preview$0.38
OpenAI: GPT-4o Search Preview$6.25
OpenAI: o3 Mini High$2.75
OpenAI: o3 Mini$2.75
OpenAI: o1$37.50
OpenAI: GPT-4o (2024-11-20)$6.25
OpenAI: ChatGPT-4o$10.00
OpenAI: GPT-4o (2024-08-06)$6.25
OpenAI: GPT-4o-mini (2024-07-18)$0.38
OpenAI: GPT-4o-mini$0.38
OpenAI: GPT-4o (2024-05-13)$10.00
OpenAI: GPT-4o$6.25
OpenAI: GPT-4o$12.00
OpenAI: GPT-4 Turbo$20.00
OpenAI: GPT-3.5 Turbo (older v0613)$1.50
OpenAI: GPT-4 Turbo Preview$20.00
OpenAI: GPT-4 Turbo (older v1106)$20.00
OpenAI: GPT-3.5 Turbo Instruct$1.75
OpenAI: GPT-3.5 Turbo 16k$3.50
OpenAI: GPT-4 (older v0314)$45.00
OpenAI: GPT-4$45.00
OpenAI: GPT-3.5 Turbo$1.00

Benchmark Performance

How this model performs across different benchmarks

No benchmark data available

Run benchmarks with this model to see performance breakdown

Price vs Performance

Compare cost efficiency across all models

Current model
Other models
X-axis uses log scale for better visualization of price range

Score Over Time

Performance trends across all benchmark runs

No score trend data

Score history will appear here after multiple runs

Benchmark Activity

Number of benchmark runs over time

No activity data

Activity will appear here after benchmark runs

Quickstart

Get started with this model using OpenRouter

View on OpenRouter
import { OpenRouter } from "@openrouter/sdk";

const openrouter = new OpenRouter({
  apiKey: "<OPENROUTER_API_KEY>"
});

const completion = await openrouter.chat.completions.create({
  model: "openai/gpt-5.1-codex",
  messages: [
    {
      role: "user",
      content: "Hello!"
    }
  ]
});

console.log(completion.choices[0].message.content);

Get your API key at openrouter.ai/keys