We route our math and coding workloads through the o4-mini API — o-series reasoning at a fraction of the flagship cost. The 5% RouterBase discount is pure margin.
The o4-mini API is OpenAI's cost-efficient o-series reasoning model — a 200K-token context window, adjustable reasoning effort, vision (text + image input), function calling, and structured JSON outputs, tuned for strong math, coding, and STEM performance. The OpenAI o4-mini API is OpenAI-compatible: point any existing SDK at RouterBase and set the model to o4-mini. Input at $0.66 / 1M tokens, output at $2.64 / 1M tokens, cache reads at $0.165 / 1M tokens — 5% below the standard rate, all through one REST endpoint.
OpenAI o4-mini API: Chat
Use the o4-mini API to run OpenAI's cost-efficient o-series reasoning model — strong math, coding, and visual reasoning with a 200K-token context.
The o4-mini API is OpenAI's compact o-series reasoning model — a 200K-token context window, adjustable reasoning effort, vision (text + image input), function calling, and structured JSON outputs, tuned for strong math, coding, and STEM performance at a fraction of the flagship cost. Routed through RouterBase, the OpenAI o4-mini API is fully OpenAI-compatible: point any existing SDK at RouterBase's base URL, set the model to o4-mini, and your first call goes through immediately.
Pricing is $0.66 / 1M input tokens, $2.64 / 1M output tokens, and $0.165 / 1M cached-input reads — 5% below the standard rate. One RouterBase key — no separate OpenAI credentials required.
Six reasons teams ship on the o4-mini API
From o-series reasoning to 5%-off pricing — what makes the OpenAI o4-mini API stand out.
Cost-efficient reasoning
The o4-mini API delivers o-series chain-of-thought reasoning at a fraction of the flagship price — best-in-class price/performance for math, coding, and logic.
Adjustable reasoning effort
Set reasoning effort to low, medium, or high on the o4-mini API — dial it up for hard multi-step problems or down for fast, cheap answers.
200K-token context
Accepts up to 200,000 tokens per request — long documents, multi-file code, or extended chat history fit in a single o4-mini API call.
Vision & function calling
The o4-mini API accepts images alongside text and returns structured tool calls — pass an image URL or base64, define tools, and request strictly valid JSON.
OpenAI-compatible endpoint
The OpenAI o4-mini API speaks the OpenAI chat-completions wire format. Any Python, Node, Go, or Rust SDK that works with OpenAI works here — just update the base URL.
One key for 200+ models
The same RouterBase key that calls the o4-mini API also routes to GPT-5, Claude Opus 4.8, Gemini 3.5 Flash, and 200+ other models — no per-provider credential management.

Get started with the o4-mini API in 3 steps
From sign-up to your first response in under 5 minutes.
Create a RouterBase API key
Sign up and generate an API key — one key reaches the o4-mini API and every other model in the catalog.
Send your first message
Point any OpenAI-compatible SDK at routerbase.com/v1 and set the model to o4-mini. The response follows the standard chat-completions schema — streaming, reasoning, and vision supported.
Inspect usage
Every response includes a detailed token breakdown — input, output, reasoning, and cache-read tokens — so cost and cache-hit rate are visible on every call.
Pay only for what you use
RouterBase passes through partner-tier pricing. Compared against the model's official published API rate.
What teams build with the o4-mini API
Real production loads running on the o4-mini API and the RouterBase model catalog.
Vision reasoning on the o4-mini API reads our charts and screenshots directly — one call analyzes the image and returns structured results.
Structured JSON outputs from the o4-mini API killed our flaky regex parsing. Strictly valid JSON every time, zero retries.
Adjustable reasoning effort lets us tune the o4-mini API per task. RouterBase makes it 5% cheaper and routes around outages automatically.
The o4-mini API solves the hard reasoning steps in my agent loop without the flagship bill. One base-URL swap and I was live.
RouterBase puts the o4-mini API and 200+ other models behind one key. Our team stopped filing requests for new provider accounts.
We A/B the o4-mini API against o3 per request — same SDK, one model field. Most traffic stays on o4-mini and the bill dropped sharply.
We migrated 42 services to the o4-mini API over a weekend. The only PR comment was 'wait, that's all?'.
At $0.66 / 1M input minus 5%, the o4-mini API gave us reasoning-grade quality without the flagship bill. The ROI math was instant.
Frequently Asked Questions
Common questions about the o4-mini API.
It is RouterBase's pass-through to OpenAI's o4-mini — the cost-efficient o-series reasoning endpoint with a 200K-token context, adjustable reasoning effort, vision input, function calling, and structured outputs, served via an OpenAI-compatible REST interface.