Pricing, context window, capabilities, and release date — pulled from each provider's public docs. Both are available via the same AIgateway OpenAI-compatible endpoint; flip the model string to switch.
Both models stream in parallel through your own AIgateway key. Tokens, latency, and cost update as they arrive.
| O4-Mini openai/o4-mini | Sonar Reasoning Pro perplexity/sonar-reasoning-pro | |
|---|---|---|
| Provider | OpenAI | Perplexity |
| Family | o-series | |
| Modality | text | text |
| Context window | 200,000 tok | 127,000 tok |
| Max output | 100,000 tok | 8,192 tok |
| Released | 2026-04-13 | 2025-03-07 |
| Input price | $1.10 /1M | $2.00 /1M |
| Output price | $4.40 /1M | $8.00 /1M |
| Cache read | — | — |
| Tools | yes | — |
| Streaming | yes | yes |
| Vision | — | — |
| JSON mode | yes | — |
| Reasoning | yes | yes |
| Prompt caching | — | — |
OpenAI's fast, lightweight reasoning model optimized for multi-step problem solving at lower cost.
Perplexity Sonar Reasoning Pro — search-augmented reasoning.
# pip install aigateway-py openai
# aigateway-py: sub-accounts, evals, replays, jobs, webhook verify.
# openai SDK: chat/embeddings/images/audio — drop-in compat per our SDK's own guidance.
from openai import OpenAI
client = OpenAI(
base_url="https://api.aigateway.sh/v1",
api_key="sk-aig-...",
)
# Try O4-Mini
client.chat.completions.create(
model="openai/o4-mini",
messages=[{"role":"user","content":"hello"}],
)
# Try Sonar Reasoning Pro — same client, same key
client.chat.completions.create(
model="perplexity/sonar-reasoning-pro",
messages=[{"role":"user","content":"hello"}],
)