← All Comparisons
Grok 4 vs GPT-5.2 Codex
A detailed comparison of Grok 4 (xAI) and GPT-5.2 Codex (OpenAI) across pricing, performance, and features.
Pricing Comparison
| Metric | Grok 4 | GPT-5.2 Codex | Difference |
|---|---|---|---|
| Input / 1M tokens | $3.00 | $1.75 | -42% |
| Output / 1M tokens | $15.00 | $14.00 | -7% |
| Context window | 128K | 200K | — |
| Max output | 16.384K | 65.536K | — |
Benchmark Comparison
| Benchmark | Grok 4 | GPT-5.2 Codex |
|---|---|---|
| MMLU-Pro | 86% | 89% |
| HumanEval | 93% | 95.5% |
| GPQA | 72% | 76% |
Capabilities
| Capability | Grok 4 | GPT-5.2 Codex |
|---|---|---|
| code | ✓ | ✓ |
| reasoning | ✓ | ✓ |
| text | ✓ | ✓ |
| tool-use | ✓ | ✓ |
| vision | ✓ | ✓ |
| web-search | ✓ | ✗ |
Grok 4 Strengths
- ✓Built-in web search and real-time data
- ✓Strong reasoning
- ✓$25 free credits for new users
Grok 4 Weaknesses
- ✗Premium pricing for its benchmark tier
- ✗Additional charges for tool invocations ($2.50-$5/1K calls)
- ✗Smaller ecosystem than OpenAI/Anthropic
GPT-5.2 Codex Strengths
- ✓Strong coding performance
- ✓Available via API now
- ✓200K context window
GPT-5.2 Codex Weaknesses
- ✗Being superseded by 5.3
- ✗Higher output cost than some competitors
Quick Verdict
Best value: GPT-5.2 Codex is the more affordable option at $1.75/$14 per 1M tokens.
Higher benchmarks: GPT-5.2 Codex scores higher on average across available benchmarks (86.8% avg).
Larger context: GPT-5.2 Codex supports 200K tokens.
Choose GPT-5.2 Codex if cost matters most. Choose Grok 4 if you need the best possible quality for complex tasks.