Back to Models

GPT-4o Mini

openaiopenai/gpt-4o-mini

Fast, affordable small model for focused tasks. Accepts text and image inputs, produces text outputs. Ideal for fine-tuning and cost-efficient workloads.

GPT-4o Mini is OpenAI's most cost-efficient small model, released on July 18, 2024. Designed as a direct replacement for GPT-3.5 Turbo, it delivers GPT-4-level performance on chat preferences at less than half the price β€” $0.15 per million input tokens and $0.60 per million output tokens. It is the founding model of the affordable intelligence wave that reshaped the API pricing landscape in 2024, and remains one of the most widely deployed small models across production applications handling structured data extraction, conversational agents, classification, and high-volume batch processing.

GPT-4o Mini introduced OpenAI's Instruction Hierarchy technique β€” a method for prioritizing system prompt instructions over user messages, making it the first API model with built-in resistance to jailbreaks, prompt injections, and system prompt extraction at the model level. For TheRouter operators, it is the default 'bread and butter' model for cost-conscious production pipelines: it chains well with parallelized calls, handles long conversation history via its 128K context window, and requires no special routing considerations. Its successor, GPT-4.1 Mini (April 2025), offers improved coding and instruction-following, but GPT-4o Mini remains the most battle-tested and predictable member of the GPT-4o family for high-volume deployment.

Best for
  • β€’ High-volume customer support chatbots β€” GPT-4o Mini's low latency and sub-cent cost per turn make it ideal for real-time conversational agents handling millions of daily interactions
  • β€’ Structured data extraction from documents β€” partner Ramp found GPT-4o Mini significantly outperformed GPT-3.5 Turbo at extracting structured data from receipt files and invoices
  • β€’ Long-context classification and summarization β€” 128K context window handles full codebases, long conversation threads, or document corpora for batch classification and summarization pipelines
  • β€’ Chain-of-thought multi-step reasoning pipelines β€” call multiple GPT-4o Mini instances in sequence for decomposition-based tasks at a fraction of the cost of larger models
  • β€’ Batch API jobs β€” GPT-4o Mini's 50% batch discount ($0.075/$0.30 per million tokens) makes it the cheapest text-generation model on OpenAI's platform for non-real-time workloads
Reach for something else if
  • β€’ Complex multi-step agentic coding β€” GPT-4o Mini lacks the reasoning depth for autonomous software engineering tasks; route to o4-mini, GPT-4.1, or GPT-5 for code-heavy agent work
  • β€’ Math and scientific reasoning at frontier level β€” benchmarks show o4-mini and GPT-5 families significantly outperform GPT-4o Mini on MMLU-Pro, GPQA, and advanced math tasks
  • β€’ Audio or video processing β€” GPT-4o Mini supports text + image input only; for audio, route to gpt-4o-mini-audio-preview or gpt-4o-mini-realtime-preview variants on TheRouter
Context Length
128K
Max Output
16K
Input Priceper 1M tokens
$0.162/ 1M tokens
Output Priceper 1M tokens
$0.648/ 1M tokens

Modalities

textimage→text

Capabilities

Vision

Pricing Breakdown

TypeRate
Input$0.162 / 1M tokens
Output$0.648 / 1M tokens

Supported Parameters

temperaturemax_tokenstop_ptoolstool_choiceresponse_formatstop

Specifications

Release dateJuly 18, 2024openai.com β†—verified
Knowledge cutoffOctober 2023openai.com β†—verified
Max output tokens16,384 tokensopenai.com β†—verified
Input modalitiesText, image (vision)openai.com β†—verified
Output modalitiesTextopenai.com β†—verified
LicenseProprietary (API-only)verified
Safety techniqueInstruction Hierarchy β€” first model to apply system-prompt-prioritizing jailbreak defenseopenai.com β†—verified

Benchmarks

BenchmarkDistributionScoreSource
MMLU
Textual intelligence and reasoning benchmark β€” vs Gemini Flash 77.9% and Claude Haiku 73.8%
82.0%%openai.com β†—
MGSM
Multilingual grade-school math reasoning β€” vs Gemini Flash 75.5% and Claude Haiku 71.7%
87.0%%openai.com β†—
HumanEval
Python coding benchmark β€” vs Gemini Flash 71.5% and Claude Haiku 75.9%
87.2%%openai.com β†—
MMMU
Multimodal reasoning eval β€” vs Gemini Flash 56.1% and Claude Haiku 50.2%
59.4%%openai.com β†—
LMSYS Chatbot Arena
Outperforms GPT-4 on chat preferences in LMSYS leaderboard at time of release (July 2024)
Arena ELO β€” outranks GPT-4 at launchopenai.com β†—

API Usage Examples

Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.

cURL
curl https://api.therouter.ai/v1/chat/completions   -H "Content-Type: application/json"   -H "Authorization: Bearer $THE_ROUTER_API_KEY"   -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "Summarize the key points from this input."}
    ]
  }'

Chat completion

GPT-4o Mini handles standard chat completions with optional vision/image inputs, tool calls, JSON mode, and streaming. Use the same OpenAI SDK you already have β€” just swap the model name and base URL.

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-4o-mini",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Extract the date, vendor name, and total from this receipt in JSON."}
    ],
    "response_format": {"type": "json_object"}
  }'

More from openai

Similar models

Cross-provider sibling models

News & changes

2025-04-14

GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano launched in API

OpenAI launched GPT-4.1 Mini and GPT-4.1 Nano, the direct successors to GPT-4o Mini and GPT-4o Nano. GPT-4.1 Mini outperforms GPT-4o Mini on every major coding and instruction-following benchmark. GPT-4o Mini remains available and is still the most cost-effective choice when 4.1 Mini's extra capability is unnecessary.

re-authored by TheRouteropenai.com β†—
2024-07-18

GPT-4o Mini announced β€” replacing GPT-3.5 Turbo

OpenAI announced GPT-4o Mini, its most cost-efficient small model, priced at $0.15/$0.60 per million tokens with 128K context, vision support, and instruction hierarchy safety. It outperformed GPT-4 on chat preferences at time of launch.

re-authored by TheRouteropenai.com β†—

Frequently asked

Is GPT-4o Mini still supported after GPT-4.1 Mini launched?

Yes. GPT-4o Mini remains fully supported on OpenAI's API and on TheRouter. It is the most cost-effective choice when you do not need the improved coding and instruction-following capabilities of GPT-4.1 Mini. OpenAI has not announced a deprecation date for GPT-4o Mini.

re-authored by TheRouteropenai.com β†—
Does GPT-4o Mini support function/tool calling?

Yes. GPT-4o Mini supports tools, tool_choice, and response_format through the Chat Completions API. OpenAI demonstrated strong function calling performance for this model at launch, with partner Ramp using it for structured data extraction from receipts.

re-authored by TheRouteropenai.com β†—
What is the knowledge cutoff date for GPT-4o Mini?

GPT-4o Mini has a knowledge cutoff of October 2023, as officially published by OpenAI at launch.

Can I fine-tune GPT-4o Mini?

Yes. OpenAI announced fine-tuning support for GPT-4o Mini shortly after the initial API launch. Fine-tuned versions are also accessible via TheRouter. Check OpenAI's fine-tuning documentation and TheRouter model listing for availability.

re-authored by TheRouter
What makes GPT-4o Mini safer than previous small models?

GPT-4o Mini is the first API model to apply OpenAI's Instruction Hierarchy technique, which prioritizes system prompt instructions over user messages. This makes it inherently more resistant to jailbreaks, prompt injections, and system prompt extraction. It also underwent the same Preparedness Framework evaluations as GPT-4o.

re-authored by TheRouteropenai.com β†—
Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release dateopenai.com β†—2026-05-28verified
Knowledge cutoffopenai.com β†—2026-05-28verified
Max output tokensopenai.com β†—2026-05-28verified
Input modalitiesopenai.com β†—2026-05-28verified
Output modalitiesopenai.com β†—2026-05-28verified
Licenseβ€”β€”verified
Safety techniqueopenai.com β†—2026-05-28verified
MMLUopenai.com β†—2026-05-28verified
MGSMopenai.com β†—2026-05-28verified
HumanEvalopenai.com β†—2026-05-28verified
MMMUopenai.com β†—2026-05-28verified
LMSYS Chatbot Arenaopenai.com β†—2026-05-28verified
GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano launched in APIopenai.com β†—2026-05-28verified
GPT-4o Mini announced β€” replacing GPT-3.5 Turboopenai.com β†—2026-05-28verified
Is GPT-4o Mini still supported after GPT-4.1 Mini launched?openai.com β†—2026-05-28to verify
Does GPT-4o Mini support function/tool calling?openai.com β†—2026-05-28to verify
What is the knowledge cutoff date for GPT-4o Mini?openai.com β†—2026-05-28to verify
What makes GPT-4o Mini safer than previous small models?openai.com β†—2026-05-28to verify
Help & contact