AI model comparison
GPT-5.2-Codex vs Grok 4.5
Compare benchmark results, pricing, and API capabilities for each model. Estimate the cost of your own token mix.
Change models
OpenAI
GPT-5.2-Codex- Context tokens
- 400K
- Input / 1M
- $1.75
- Output / 1M
- $14.00
xAI
Grok 4.5- Context tokens
- 500K
- Input / 1M
- $2.00
- Output / 1M
- $6.00
Percent score · Result source · Test method
The trade-offs
Start with the differences that affect how this model fits your workload.
- Benchmark results
- GPT-5.2-Codex and Grok 4.5 scored 86.957% and 69.565%, respectively, on Code Completion. Use the test setup below to check whether it matches your workload.
- Token cost
- For 1 million input tokens and 250,000 output tokens, the listed rates estimate $5.25 for GPT-5.2-Codex and $3.50 for Grok 4.5.
- Context window
- Grok 4.5 lists 500,000 tokens of context. GPT-5.2-Codex lists 400,000 tokens. Reserve space for the output before routing long inputs.
Benchmarks
Shared results come from the same published benchmark release. Reasoning effort and serving configuration can differ.
Source Result source · Test method
Code Completion
Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Code Generation
Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Javascript
Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Python
Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Typescript
Agentic Coding · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Amps Hard
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Connections
Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Consecutive Events
Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Show 15 more shared results
Integrals With Game
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Logic With Navigation
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Math Comp
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Olympiad
Mathematics · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Paraphrase
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Plot Unscrambling
Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Simplify
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Spatial
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Story Generation
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Summarize
IF · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Tablejoin
Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Tablereformat
Data Analysis · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Theory Of Mind
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Typos
Language · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
Zebra Puzzle
Reasoning · Suite release Jun 25, 2026 · run date unavailable · Result source · Test method
Test configurations
- GPT-5.2-Codex
- gpt-5.2-codex
- Grok 4.5
- grok-4.5
View individual benchmark records
These model-level records can include other benchmark releases, test configurations, and vendor-reported results.
GPT-5.2-Codex
No additional benchmark results are available for this model ID.
Grok 4.5
| Benchmark | Score | Configuration | Source model label | Evidence |
|---|---|---|---|---|
| Long Agentic | 27.9% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
| Reasoning | 87.2% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
| Coding | 94.3% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
| Browser | 44% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
| Data Analysis | 73% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
| Research | 85.9% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
| Design | 78.1% | grok-4.5 · Suite release Oct 14, 2026 · run date unavailable | grok-4.5 | Result source · Test method |
Pricing and token cost
Listed OpenRouter prices in US dollars. Actual charges depend on the endpoint, tier, cache, and token mix.
| USD per million tokens | GPT-5.2-Codex | Grok 4.5 |
|---|---|---|
| Uncached input | $1.75 | $2.00 |
| Output | $14.00 | $6.00 |
| Cache read | $0.175 | $0.30 |
| Cache write | Unavailable | Unavailable |
Rates are a catalog snapshot. OpenRouter Models API
Estimate your workload
Enter total token counts. The estimate uses uncached input and output rates.
Grok 4.5 costs $1.75 less at this token mix.
Model specifications
Context, output limits, modalities, and supported API parameters from the catalog.
| Specification | GPT-5.2-Codex | Grok 4.5 |
|---|---|---|
| Catalog status | Listed | Listed |
| Catalog model ID | openai/gpt-5.2-codex | x-ai/grok-4.5 |
| Provider | OpenAI | xAI |
| Context window | 400,000 tokens | 500,000 tokens |
| Max output | 128,000 tokens | 450,000 tokens |
| Input modalities | Text, Image | Text, Image, File |
| Output modalities | Text | Text |
| Reasoning controls | Listed | Listed |
| Tool calling | Listed | Listed |
| Structured outputs | Listed | Listed |
| Serving endpoints | /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses | /api/v1/chat/completions, /api/v1/completions, /api/v1/messages, /api/v1/responses |
| Catalog listing date | Jan 14, 2026 | Jul 8, 2026 |
Use with Weave Router
Set a quality bar on your own coding tasks. Then compare cost per completed task and use the same harness when you change models.
GPT-5.2-Codex
Weave Router availability is unverified for this model ID.
Grok 4.5
Weave Router availability is unverified for this model ID.
Catalog presence does not guarantee availability for a specific plan or account. Public Weave Router catalog · Nov 27, 2026
Sources
Each benchmark links to its own result and test method when available.
- OpenRouter Models API · token rates and catalog specifications
- Weave Router catalog · verified Router model IDs
- GPT-5.2-Codex catalog entry
- Grok 4.5 catalog entry