OpenAI Reasoning Models 9 min read

OpenAI o3 & o4 mini Guide: Reasoning Models Explained

OpenAI's o-series models think before they respond — spending internal "reasoning time" to solve hard problems in math, coding, and science that stump faster models. Here's what reasoning models are, when to use them, and how to call them via the API.

What Are Reasoning Models?

Traditional LLMs like GPT-4o respond immediately — the model generates tokens from left to right as fast as possible. Reasoning models are different: they generate an internal chain-of-thought (called thinking tokens) before producing a final response.

This internal reasoning makes them dramatically better on problems that require:

  • Multi-step math and competition problems (AIME, AMC)
  • Complex coding tasks (SWE-bench level bug fixes)
  • Scientific reasoning (GPQA-level chemistry, physics, biology)
  • Long logical deduction chains
  • Deliberate planning and strategy

The trade-off: reasoning models are slower and cost more per output token because you pay for the thinking tokens even though you don't see them. For simple tasks, GPT-4o is faster and cheaper. For hard tasks, o3 is worth the cost.

o1 vs o3 vs o4 mini: What Changed?

Model Released Key Improvements Best For
o1 Sep 2024 First reasoning model, slow, no tool use Math, science (legacy)
o3 Apr 2025 Faster, smarter, instruction following, tool use Hardest coding & math tasks
o4 mini Apr 2025 Small + fast, great cost/performance ratio Volume reasoning tasks, code

o3 outperforms o1 across every major benchmark. o4 mini punches well above its weight — in many tasks it beats o1 at a fraction of the cost. The o-mini series is ideal for applications where some reasoning helps but full o3 is overkill.

Thinking Tokens Explained

When you call o3, the model generates two types of tokens:

  • Reasoning tokens — the internal chain-of-thought. You don't see these in the response, but you're billed for them.
  • Completion tokens — the final answer you receive.

Both are counted toward max_completion_tokens. If you set a low limit, o3 may truncate its thinking early and give a weaker answer.

Important API difference: o3 uses max_completion_tokens (not max_tokens) and does not support system messages — put your instructions in the user message.

API Usage

Calling o3 via the OpenAI Python SDK:

# OpenAI o3 API example (Python)
from openai import OpenAI

client = OpenAI()

response = client.chat.completions.create(
    model="o3",
    messages=[
        {"role": "user", "content": "Solve: integral of x^2 * sin(x) from 0 to pi"}
    ],
    max_completion_tokens=4096,
)

print(response.choices[0].message.content)

To control reasoning effort (affects how many thinking tokens the model uses):

response = client.chat.completions.create(
    model="o3",
    messages=[{"role": "user", "content": "..."}],
    reasoning_effort="high",     # low | medium | high
    max_completion_tokens=16000,
)

reasoning_effort="high" allocates more thinking tokens and produces the best results on hard problems. Use "low" for tasks where speed matters more than maximum accuracy.

Benchmark Performance

Benchmark o3 o4 mini GPT-4o
AIME 2025 (math) ~96% ~93% ~13%
GPQA Diamond (science) ~88% ~81% ~53%
SWE-bench Verified (coding) ~71% ~68% ~33%
HumanEval (coding) ~99% ~98% ~90%

Scores are approximate and change as models are updated. Always check the official OpenAI model card for current numbers.

Pricing (2025)

Model Input ($/MTok) Output ($/MTok)
o3 $10 $40 (incl. thinking)
o4 mini $1.10 $4.40 (incl. thinking)
GPT-4o (for comparison) $2.50 $10

Output tokens include reasoning tokens — a single hard task with reasoning_effort="high" can consume 10,000–30,000 thinking tokens. Always set a max_completion_tokens limit to avoid surprise costs. Current prices at platform.openai.com/pricing.

When to Use o3 vs GPT-4o

Task Use o3 Use GPT-4o
Competition math / proofs
Complex bug fixing / SWE-bench
Scientific literature analysis
Chat / Q&A / summarization ❌ (expensive)
Image understanding ✅ (o3 is multimodal)
Real-time / low latency

A good rule of thumb: start with GPT-4o. If it gets the answer wrong on your task type, try o4 mini. If o4 mini still underperforms, escalate to o3. See also: GPT-4o guide and OpenAI alternatives.

Best Use Cases in Practice

  • Code review with reasoning: Give o3 a PR diff and ask it to find bugs — its step-by-step analysis catches subtle logic errors that GPT-4o misses.
  • Math tutoring and proofs: o3 can work through university-level calculus, linear algebra, and combinatorics problems accurately enough to use as a learning tool.
  • Data science pipelines: Complex SQL generation, Pandas transformations, and statistical analysis benefit from o3's structured reasoning.
  • Security analysis: o3 can reason through code for vulnerabilities with more reliability than faster models — useful for security-critical reviews.
  • Test generation: When you need edge-case-aware test suites, o3's reasoning helps identify boundary conditions that simpler models miss.

Monitor OpenAI API Status

o3 API calls can be expensive and slow — knowing instantly when OpenAI is degraded saves you hours of debugging. Track OpenAI and 100+ AI services on Prismix with free email alerts.

OpenAI Status → Get Free Alerts