Price Per TokenPrice Per Token
OpenAI
OpenAI
vs
Perplexity
Perplexity

GPT-5.2-Codex vs Sonar

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.2-Codex wins:

  • Larger context window
  • Faster response time
  • Higher intelligence benchmark
  • Better at coding
  • Has reasoning mode

Sonar wins:

  • Cheaper input tokens
  • Cheaper output tokens
Price Advantage
Sonar
Benchmark Advantage
GPT-5.2-Codex
Context Window
GPT-5.2-Codex
Speed
GPT-5.2-Codex

Pricing Comparison

Benchmark Comparison

Context & Performance

Capabilities

Feature Comparison

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

License & Release

PropertyGPT-5.2-CodexSonar
LicenseProprietaryProprietary
AuthorOpenAIPerplexity
ReleasedJan 2026Jan 2025

GPT-5.2-Codex Modalities

Input
textimage
Output
text

Sonar Modalities

Input
textimage
Output
text

Frequently Asked Questions

Sonar has cheaper input pricing at $1.00/M tokens. Sonar has cheaper output pricing at $1.00/M tokens.
GPT-5.2-Codex has a 400,000 token context window, while Sonar has a 127,072 token context window.
GPT-5.2-Codex supports vision. Sonar supports vision.