Models / O4 MiniID: openai/o4-mini
by OpenAI·via OpenAI

O4 Mini

Lightweight reasoning model from OpenAI supporting text and image inputs with a 200,000-token context window and 100,000 max output tokens. It is tuned for STEM problem solving with a June 2024 knowledge cutoff.

Certified & verified by nRouter· facts checked 2026-09-14 against 2 official sources

Maker

OpenAI

Served On

OpenAI

Context: 200.0K

Benchmarks

not listed under this exact id on arena.ai text leaderboard (2026-09-11); listed variant: o4-mini-2025-04-16 rank 160

Pricing

Rates are read live

Pricing for o4-mini is fetched from the live catalogue on load, so it is never served from a cache that could outlive a repricing.

Pricing Transparency & Zero-Markup Guarantee

nRouter strictly operates under Rule #28: Zero per-token markup. All inference requests for O4 Mini are billed at exact upstream provider list prices with zero per-token margin, zero routing fees, and zero hidden platform overhead.

Exact List Price

Token consumption is settled at the published upstream rate of the exact served model and provider tier that executed your call.

100% Cache Savings

Upstream prompt caching discounts (up to 50%–90% reduction on cached prompt tokens) pass through directly to your balance with zero added fee.

Live Cost Header

Every response includes the authoritative x-nr-request-cost header for instant accounting and FinOps reconciliation.

Specifications

Context window

200.0K

Source: platform.openai.com
Max output

100K

Source: platform.openai.com
Modality

reasoning

Context window, compared

o4-minio4-mini — 200K tokens200Ko1o1 — 200K tokens200Ko3-minio3-mini — 200K tokens200Kqwq-plusqwq-plus — 131.1K tokens131.1Kgpt-5.4-nano-2026-03-17gpt-5.4-nano-2026-03-17 — 400K tokens400Kgpt-5-nanogpt-5-nano — 400K tokens400Kgpt-5-mini-2025-08-07gpt-5-mini-2025-08-07 — 400K tokens400K

Bars are scaled to 400K tokens. A model with no published context window reads Unknown, never zero.

Vision
Function calling
System prompt

Context Limits & Caching Economics

Context Window Boundaries

With an effective context ceiling of 200.0K tokens and a maximum output generation ceiling of 100K tokens, o4-mini is engineered to support long-document analysis, repository code exploration, and complex multi-turn dialog without token truncation.

Prompt Caching Economics

Upstream prefix caching stores static context (system prompts, tool definitions, documentation corpora) in memory. Cached token reads receive up to 50%–90% cost discounts from upstream providers, passed through directly to your nRouter balance with zero added fee.

Ideal Production Workloads
  • ✦Autonomous Tool Use: Structured JSON schema validation and multi-step function calling loops.
  • ✦Code Intelligence: Multi-file codebase refactoring, unit test generation, and complex algorithmic reasoning.
  • ✦High-Density RAG: In-context information extraction across large token windows without needle loss.
  • ✦Multimodal Ingestion: Visual documentation analysis, image parsing, and structured asset extraction.

Drop-in Integration

SDK v2.2.1
pip install openai
import os
from openai import OpenAI

# Drop-in replacement: point OpenAI client to nRouter gateway
client = OpenAI(
    base_url="https://api.nrouter.ai/v1",
    api_key=os.environ.get("NROUTER_API_KEY"),  # Your nRouter virtual key (sk-nrouter-*)
)

response = client.chat.completions.create(
    model="openai/o4-mini",  # Exact model ID or smart router alias (e.g. nrouter/auto)
    messages=[
        {"role": "system", "content": "You are an expert engineer."},
        {"role": "user", "content": "Explain multi-region failover and distributed consensus."}
    ],
    temperature=0.7,   # Sampling randomness (0.0 = deterministic, 1.0 = creative)
    max_tokens=2048,   # Upper ceiling on tokens generated
    stream=False,      # Set True to receive streaming Server-Sent Events (SSE)
)

print(response.choices[0].message.content)
Parameter Guide
base_url / baseURL
Target endpoint for the proxy gateway. Use https://api.nrouter.ai/v1 for OpenAI-compatible tools or https://api.nrouter.ai for Anthropic Messages requests.
api_key / NROUTER_API_KEY
Your nRouter virtual key (sk-nrouter-*). Implements hardware-backed tenant isolation, model ACLs, per-key token budgets, and sub-millisecond preflight verification.
model
Exact model identifier (openai/o4-mini) or a dynamic smart router alias (such as nrouter/auto) for automated multi-provider intent tiering.
temperature & max_tokens
temperature tunes sampling variance (0.0 for deterministic code/schema tasks, 0.7+ for creative generation); max_tokens enforces a hard ceiling on completion length to eliminate runaway compute spend.

Multi-Provider Redundancy

nRouter routes traffic for O4 Mini across multiple underlying cloud hyperscalers to guarantee continuous zero-downtime availability and eliminate vendor lock-in:

Cross-Cloud Fleet

Traffic for openai/o4-mini routes dynamically across Microsoft Azure, AWS Bedrock, Google Cloud Vertex AI, and direct provider endpoints without code changes.

Automatic Zero-Downtime Failover

If an upstream cloud provider reports rate limits (HTTP 429), regional degradation, or an outage, nRouter automatically retries on an alternate cloud backend in <1ms.

Unified Single-Key Control

A single nRouter virtual key provides unified access with enforced spending budgets, model allowlists, and end-to-end SOC 2 compliant audit logging.

Availability

Not enough data yet

We have not collected enough health probes for this model to publish an uptime or latency figure. A percentage from a handful of samples is fabricated precision, so none is shown until the sample count supports one.

Interactive Playground

Send a real test request to o4-mini using your virtual key.

Test it

Prompt
cURL
curl https://api.nrouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $NROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/o4-mini","messages":[{"role":"user","content":"Hello!"}]}'

More from OpenAI