Skip to content

OpenAI Codex Pricing

Last updated: 23m ago

Compare API pricing for 88 OpenAI models suited for coding: GPT-4o, o3, o1, GPT-4.1, and budget-friendly mini variants. See per-token costs, cost per coding request, context windows, and coding capabilities side by side.

88
Coding Models
80
Avg Score
63
Reasoning
82
Function Calling
$0.200 -- $600.00
Price Range ($/1M out)

OpenAI Coding Model Pricing

#ModelScoreCost/Req
1GPT-5.5 Pro93$0.240
2GPT-5.5 Pro (batch)93$0.120
3GPT-5.593$0.040
4GPT-5.5 (batch)93$0.020
5GPT-5.4 Pro92$0.240
6GPT-5.4 Pro (batch)92$0.120
7GPT-5.492$0.020
8GPT-5.4 (batch)92$0.010
9GPT-5.3 Chat91$0.018
10GPT-5.3-Codex91$0.018
11GPT-5.2-Codex91$0.018
12GPT-5.2 Chat91$0.018
13GPT-5.2 Pro91$0.210
14GPT-5.2 Pro (batch)91$0.105
15GPT-5.291$0.018
16GPT-5.2 (batch)91$0.0088
17GPT-5.6 Luna Pro89$0.00080
18GPT-5.6 Luna Pro (batch)89$0.00080
19GPT-5.6 Luna89$0.00080
20GPT-5.6 Luna (batch)89$0.00080
21GPT-5.6 Terra Pro89$0.0080
22GPT-5.6 Terra Pro (batch)89$0.0080
23GPT-5.6 Terra89$0.0080
24GPT-5.6 Terra (batch)89$0.0080
25GPT-5.6 Sol Pro89$0.040
26GPT-5.6 Sol Pro (batch)89$0.020
27GPT-5.6 Sol89$0.040
28GPT-5.6 Sol (batch)89$0.020
29GPT-5.1-Codex-Max89$0.013
30GPT-5.189$0.013
31GPT-5.1-Codex89$0.013
32GPT-5 Pro89$0.150
33GPT-5 Pro (batch)89$0.075
34GPT-5 Codex (batch)89$0.0063
35GPT-589$0.013
36GPT-5 (batch)89$0.0063
37GPT-5.1 (batch)88$0.0063
38GPT-5.1-Codex-Mini88$0.0025
39o3 Pro87$0.120
40o3 Pro (batch)87$0.060
41o387$0.012
42o3 (batch)87$0.0060
43o4 Mini High (batch)81$0.0033
44o4 Mini81$0.0066
45o4 Mini (batch)81$0.0033
46GPT-5.4 Nano79$0.0016
47GPT-5.4 Nano (batch)79$0.00082
48GPT-5.4 Mini79$0.0060
49GPT-5.4 Mini (batch)79$0.0030
50GPT-5 Mini (batch)77$0.0013
51GPT-5 Nano (batch)77$0.00025
52o3 Mini75$0.0066
53o174$0.090
54o1 (batch)74$0.045
55o3 Mini High (batch)74$0.0033
56o3 Mini (batch)74$0.0033
57o1-pro74$0.900
58o1-pro (batch)74$0.450
59o4 Mini High72$0.0066
60GPT-4o (batch)72$0.0075
61GPT-4o (2024-11-20)71$0.015
62GPT-4o (2024-08-06)71$0.015
63GPT-4o71$0.015
64GPT-4o (2024-05-13)71$0.025
65GPT-4o-mini69$0.00090
66GPT-4.168$0.012
67GPT-4.1 (batch)68$0.0060
68GPT-4 Turbo67$0.050
69GPT-4 Turbo Preview65$0.050
70GPT-465$0.120
71o3 Mini High64$0.0066
72GPT-5 Mini64$0.0025
73GPT-4o-mini (batch)63$0.00045
74GPT-4 Turbo (batch)62$0.025
75GPT-4.1 Mini (batch)59$0.0012
76GPT-4.1 Nano (batch)59$0.00030
77GPT-4o-mini (2024-07-18)57$0.00090
78GPT-4.1 Mini54$0.0024
79GPT-5 Nano47$0.00050
80GPT-4.1 Nano42$0.00060
81GPT-5.4 Image 2$0.031
82GPT-5 Image Mini$0.0070
83GPT-5 Image$0.030
84GPT-3.5 Turbo (older v0613)$0.0040
85GPT-3.5 Turbo Instruct$0.0050
86GPT-3.5 Turbo 16k$0.010
87GPT-3.5 Turbo$0.0025
88GPT-3.5 Turbo (batch)$0.0013

Cost/Req = estimated cost per typical coding request (2,000 input + 1,000 output tokens). Prices updated hourly.

Best OpenAI Models for Coding

1
Input: $30.00/1MOutput: $180.00/1MContext: 1.1MReasoningFunction CallingVision

GPT-5.5 Pro is OpenAI’s high-capability model optimized for deep reasoning and accuracy on complex, high-stakes workloads. It features a 1M+ token context window (922K input, 128K output) with support for...

per request
$0.240
2
Input: $15.00/1MOutput: $90.00/1MContext: 1.1MReasoningFunction CallingVision

GPT-5.5 Pro is OpenAI’s high-capability model optimized for deep reasoning and accuracy on complex, high-stakes workloads. It features a 1M+ token context window (922K input, 128K output) with support for...

per request
$0.120
3
Input: $5.00/1MOutput: $30.00/1MContext: 1.1MReasoningFunction CallingVision

GPT-5.5 is OpenAI’s frontier model designed for complex professional workloads, building on GPT-5.4 with stronger reasoning, higher reliability, and improved token efficiency on hard tasks. It features a 1M+ token...

per request
$0.040
4
Input: $2.50/1MOutput: $15.00/1MContext: 1.1MReasoningFunction CallingVision

GPT-5.5 is OpenAI’s frontier model designed for complex professional workloads, building on GPT-5.4 with stronger reasoning, higher reliability, and improved token efficiency on hard tasks. It features a 1M+ token...

per request
$0.020
5
Input: $30.00/1MOutput: $180.00/1MContext: 1.1MReasoningFunction CallingVision

GPT-5.4 Pro is OpenAI's most advanced model, building on GPT-5.4's unified architecture with enhanced reasoning capabilities for complex, high-stakes tasks. It features a 1M+ token context window (922K input, 128K...

per request
$0.240

Coding Tool Compatibility

OpenAI coding models power many of the most popular AI development tools. Here is how they integrate with the leading coding assistants.

Cursor

Uses GPT-4o and o3 as backend models for code completion, chat, and multi-file editing. OpenAI models are available via Cursor's Pro plan alongside Claude and other providers.

Best models for Cursor

GitHub Copilot

Built on OpenAI models including GPT-4o and o3-mini. Copilot uses these models for inline suggestions, chat, and code review. Enterprise plans offer access to the latest reasoning models.

Claude Code

Anthropic's CLI coding agent uses Claude models natively, but OpenAI models serve as a useful comparison point. Many developers switch between Claude Code and OpenAI-powered tools depending on the task.

Aider

Open-source AI pair programming tool with native support for all OpenAI models. Aider's benchmarks show GPT-4o and o3 performing strongly on code editing tasks. Supports function calling for precise file modifications.

Cost per Coding Request Comparison

Estimated cost per coding request based on 2,000 input tokens (prompt + code context) and 1,000 output tokens (generated code). Sorted from cheapest to most expensive.

$0.00050
$0.00060
$0.00080
$0.00090
$0.0025
$0.0060
$0.0066
$0.0066
$0.012
$0.012
$0.013
$0.013
$0.015
$0.018
$0.020
$0.040
$0.090
$0.120
$0.120
$0.150
$0.900

Understanding OpenAI Coding Model Pricing

GPT-4o & GPT-4.1 for Coding

GPT-4o and GPT-4.1 are OpenAI's best general-purpose coding models. They support function calling, JSON mode, and multimodal input, making them ideal for code generation, debugging, refactoring, and code review. GPT-4.1 improves on instruction following and has better performance on complex coding tasks.

o3 & o1 for Complex Code

The o-series reasoning models use chain-of-thought to tackle complex algorithms, multi-step debugging, and architectural decisions. o3 is the latest and most capable, while o1 offers strong reasoning at a lower cost. These models are best for tasks requiring deep logical reasoning rather than simple code generation.

Budget Options: Mini Models

GPT-4o Mini offers coding capabilities at a fraction of the cost. While it scores lower on complex benchmarks, it handles straightforward code generation, autocompletion, and simple debugging efficiently. Ideal for high-volume use cases like CI/CD pipelines and automated code review.

Codex Legacy & Migration

The original Codex model (code-davinci-002) was deprecated in March 2023. All Codex capabilities have been absorbed into the GPT-4 family, which significantly outperforms the original Codex on every coding benchmark. Developers should use GPT-4o or GPT-4.1 as direct Codex replacements.

Frequently Asked Questions

For most coding tasks, GPT-4o and GPT-4.1 offer the best balance of code quality and cost. For complex algorithmic or multi-step reasoning problems, o3 and o1 excel due to their chain-of-thought reasoning capabilities. GPT-4o Mini is ideal for high-volume code generation where cost efficiency is the priority.

The original OpenAI Codex model has been deprecated and replaced by the GPT-4 family. Current coding-capable models range from free (GPT-4o Mini in some tiers) to $60/M output tokens (o3-pro). A typical coding request (2,000 input + 1,000 output tokens) costs between $0.0003 and $0.06 depending on the model.

Yes. GPT-4o is one of the best models for coding. It supports function calling, JSON mode, and has strong performance on coding benchmarks like HumanEval and SWE-bench. It offers multimodal input (you can share screenshots of errors), a large context window, and competitive pricing for production coding workflows.

Both are excellent for coding. OpenAI's o3 and GPT-4.1 lead on certain benchmarks, while Anthropic's Claude 3.5 Sonnet and Claude 4 Opus excel in agentic coding tasks and long-context understanding. Claude tends to follow instructions more precisely, while OpenAI models often have broader tool ecosystem support. The best choice depends on your specific use case, budget, and tooling requirements.

OpenAI Codex Pricing - GPT-4o, o3 & Coding Model API Costs | LM Market Cap