Price Per TokenPrice Per Token
OpenAI
OpenAI
vs
Xai
Xai

GPT-5.1-Codex vs Grok 4

A detailed comparison of pricing, benchmarks, and capabilities

Get our weekly newsletter on pricing changes, new releases, and tools.

Join the Price Per Token Community

Key Takeaways

GPT-5.1-Codex wins:

  • Cheaper input tokens
  • Cheaper output tokens
  • Larger context window
  • Faster response time
  • Higher intelligence benchmark
  • Better at math

Grok 4 wins:

  • Better at coding
Price Advantage
GPT-5.1-Codex
Benchmark Advantage
GPT-5.1-Codex
Context Window
GPT-5.1-Codex
Speed
GPT-5.1-Codex

Pricing Comparison

Benchmark Comparison

Context & Performance

Capabilities

Feature Comparison

FeatureGPT-5.1-CodexGrok 4
Vision (Image Input)
Tool/Function Calls
Reasoning Mode
Audio Input
Audio Output
PDF Input
Prompt Caching
Web Search

License & Release

PropertyGPT-5.1-CodexGrok 4
LicenseProprietaryProprietary
AuthorOpenAIXai
ReleasedNov 2025Jul 2025

GPT-5.1-Codex Modalities

Input
textimage
Output
text

Grok 4 Modalities

Input
imagetext
Output
text

Frequently Asked Questions

GPT-5.1-Codex has cheaper input pricing at $1.25/M tokens. GPT-5.1-Codex has cheaper output pricing at $10.00/M tokens.
Grok 4 scores higher on coding benchmarks with a score of 40.5, compared to GPT-5.1-Codex's score of 36.6.
GPT-5.1-Codex has a 400,000 token context window, while Grok 4 has a 256,000 token context window.
GPT-5.1-Codex supports vision. Grok 4 supports vision.