GPT-4o-mini (2024-07-18)

openai/gpt-4o-mini-2024-07-18
ZDR
VisionToolsJSON
by OpenAI · 2024-07-18

GPT-4o-mini (2024-07-18) is a cost-efficient multimodal model from OpenAI, accessible through OrcaRouter's OpenAI-compatible API at base URL https://api.orcarouter.ai/v1 using model id "openai/gpt-4o-mini-2024-07-18". It supports a context window of 128,000 tokens and a maximum output of 16,384 tokens. The model accepts text, image, and file inputs, enabling versatile applications such as image reasoning, document analysis, and text generation. Pricing is $0.15 per 1M input tokens and $0.60 per 1M output tokens, billed at the provider rate with zero markup via OrcaRouter. On the MATH-500 benchmark, GPT-4o-mini achieves a score of 78.9, indicating strong mathematical reasoning capabilities. Its balance of low cost, large context, and multimodal input makes it suitable for high-volume production use cases that require both text and image processing.

Max output16K
Inputtext + image + file
Outputtext
Data retentionZero Data Retention available. With ZDR on, requests go only to providers with a zero-retention agreement.
Runs inEuropean Union
Context window128Ktokens
INPUT$0.15/ 1M tokens
OUTPUT$0.60/ 1M tokens
p50 TTFTCollecting…
p95 TTFTCollecting…

Pricing

Pricing
Input / 1M tokens$0.150
Output / 1M tokens$0.600
Cache read / 1M$0.075
CurrencyUSD

Cost calculator

Tokens / month2MM
Input share80%%
Estimated / month $0.480 · With prompt caching $0.420

1.6M input × $0.15/M + 400K output × $0.6/M

Prompt caching assumes half of the input tokens are read from cache at $0.07/M.

Estimate based on list price

Per-request examples
ScenarioInput / output tokensPer requestPer 1,000 requests
Chat reply200 / 300$0.0002$0.210
Summarize a long doc30K / 1K$0.0051$5.10
Code review8K / 2K$0.0024$2.40

Token & cost estimator

Input tokens: 20Cost per request: $0.000303

Estimate only — actual token counts depend on the provider's tokenizer.

Code samples

Use an OpenAI-compatible SDK or send an HTTP request. Get API key

API key
export ORCAROUTER_API_KEY=…
Base URL
https://api.orcarouter.ai/v1
import os

from openai import OpenAI

client = OpenAI(
    base_url="https://api.orcarouter.ai/v1",
    api_key=os.environ["ORCAROUTER_API_KEY"],
)

response = client.chat.completions.create(
    model="openai/gpt-4o-mini-2024-07-18",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Example response

{
  "id": "chatcmpl-…",
  "object": "chat.completion",
  "created": 1763280000,
  "model": "openai/gpt-4o-mini-2024-07-18",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 9,
    "completion_tokens": 10,
    "total_tokens": 19
  }
}
  • choices[0].message.content — the model's answer.
  • finish_reason — "stop" means the answer is complete; "length" means it was cut off at max_tokens.
  • usage — the input and output tokens this call is billed for.

An HTTP 200 with finish_reason "stop" means the call succeeded.

Supported parameters

ParameterWhat it does
max_tokensUpper limit on the number of tokens the model generates.
temperatureSampling randomness: lower is more focused, higher is more varied.
toolsFunctions the model may call, described as JSON Schema.
response_formatForce JSON output, optionally matching a JSON Schema.
max_completion_tokensUpper limit on generated tokens, reasoning tokens included.

Full API reference

Use cases and examples

  • Long context — 128K-token context window: whole codebases, long reports or chat histories in one request.
  • Multimodal input — Takes text + image + file in one request.
  • Agents and tool use — Calls the functions you define, for agents and tool workflows.
  • Structured extraction — Returns JSON that follows your schema, for pulling fields out of text.
  • High-volume text summarization and generation
  • Image-based reasoning, classification, and description
  • Processing and extracting information from files (e.g., PDFs, scanned documents)
  • Math and logic problem solving with step-by-step reasoning
  • Cost-sensitive applications requiring a large context window

Performance

p50 TTFTTime to first token for a typical request: half of requests got their first token faster than this.
Collecting…
Output speedHow many tokens per second the model streams once it starts answering.
Collecting…
p95 TTFTTime to first token for a slow request: 95% of requests got their first token faster than this.
Collecting…
Error rateShare of requests to this model on OrcaRouter that ended in an error over the window.
100.0%

Benchmarks

11.4
AA CodingArtificial Analysis Coding Index: one 0–100 score that combines its coding evaluations.
Better than 6% of models compared
#129 of 138
6.7
AA IntelligenceArtificial Analysis Intelligence Index: one 0–100 score that combines its evaluations of reasoning, knowledge, math and coding.
Better than 3% of models compared
#144 of 153
14.7
AA MathArtificial Analysis Math Index: one 0–100 score that combines its competition-math evaluations.
Better than 2% of models compared
#79 of 82
AIMEAIME: problems from the American Invitational Mathematics Examination, a high-school olympiad qualifier.
11.7#23 of 26
AIME 2025AIME: problems from the American Invitational Mathematics Examination, a high-school olympiad qualifier.
14.7#49 of 52
GPQA DiamondGPQA Diamond: graduate-level biology, physics and chemistry questions written to be hard to look up.
42.6#130 of 137
Humanity's Last ExamHumanity's Last Exam: expert-written questions at the frontier of human knowledge, across dozens of subjects.
4.2#126 of 141
IFBenchIFBench: how precisely the model follows new, checkable instructions about the shape of its answer.
31.0#103 of 104
LiveCodeBenchLiveCodeBench: recent competitive-programming problems, published after most models were trained.
23.4#55 of 56
MATH-500MATH-500: 500 competition math problems from the MATH dataset.
78.9#21 of 32
MMLU-ProMMLU-Pro: hard ten-option multiple-choice questions across 14 academic subjects.
64.8#73 of 91
SciCodeSciCode: writing code that solves research-level problems in physics, chemistry, biology and math.
22.9#138 of 141
tau_bankingτ²-Bench: acting as a customer-service agent that uses tools and follows policy while talking to a simulated user.
2.9#79 of 80
terminalbench_v2_1Terminal-Bench: finishing real tasks in a command-line environment, such as building, debugging and configuring software.
5.6#75 of 80
Source: artificialanalysis.ai

Human preference and real-world tasks

1,286
LMArena TextLMArena Text: an Elo rating from blind votes by people comparing two models' answers side by side.
#274 on LMArena
1,066
LMArena VisionLMArena Vision: an Elo rating from blind human votes on answers to prompts that include images.
#140 on LMArena
Source: lmarena.ai

Compare models

GPT-4o-mini (2024-07-18)GPT-5.2 ProGPT-5.4 ProGPT-5.5
Input $/M$0.15$21.00$60.00$5.00
Output $/M$0.60$168.00$270.00$30.00
Context128K400K1.1M—
Quality2/1010/1010/1010/10
Compare side-by-sideCompare side-by-sideCompare side-by-sideCompare side-by-side

FAQ

What is GPT-4o-mini's cost per token on OrcaRouter?
GPT-4o-mini costs $0.15 per 1 million input tokens and $0.60 per 1 million output tokens. OrcaRouter bills at the exact OpenAI provider rate with zero markup.
How large is the context window for GPT-4o-mini?
The context window is 128,000 tokens, allowing for very long inputs such as full documents or extended conversations.
What are the main strengths of GPT-4o-mini?
It offers a balance of low cost, multimodal input (text, images, files), a large context window, and solid mathematical reasoning (78.9 on MATH-500). It is faster and cheaper than full-size GPT-4 models.
How does GPT-4o-mini compare to GPT-4o?
GPT-4o-mini is cheaper ($0.15/$0.60 per million tokens vs $2.50/$10.00) but has lower benchmark scores (e.g., MATH-500 78.9 vs ~90). Both support multimodal inputs and 128k context.
Does OrcaRouter handle data privacy differently than direct OpenAI access?
OrcaRouter passes requests directly to OpenAI's API without storing or logging your data beyond standard usage monitoring. For detailed data handling, refer to OrcaRouter's privacy policy and OpenAI's data usage terms.
How do I call GPT-4o-mini via an OpenAI-compatible API?
Set the base URL to https://api.orcarouter.ai/v1 and use model ID "openai/gpt-4o-mini-2024-07-18". The API is fully compatible with the OpenAI chat completions format, including streaming.
Can I pass images and files alongside text in a single API request?
Yes. Use the multi-part content format: include a content array with type "text" and type "image_url" (for images) or type "file" (for files). Each part is converted to tokens.
Is there a minimum spend or monthly commitment required on OrcaRouter?
No. OrcaRouter charges per token with no minimums. You only pay for what you use at the provider rates with zero markup.

Embed this badge

OpenAI: GPT-4o-mini (2024-07-18)•$0.15/M in•—•via OrcaRouter
HTML <a href="https://www.orcarouter.ai/models/openai/gpt-4o-mini-2024-07-18" target="_blank"> <img src="https://www.orcarouter.ai/embed/openai/gpt-4o-mini-2024-07-18.svg" alt="OpenAI: GPT-4o-mini (2024-07-18) on OrcaRouter" /> </a>
Markdown [![OpenAI: GPT-4o-mini (2024-07-18)](https://www.orcarouter.ai/embed/openai/gpt-4o-mini-2024-07-18.svg)](https://www.orcarouter.ai/models/openai/gpt-4o-mini-2024-07-18)

Model card as data

GET /api/public/models/openai/gpt-4o-mini-2024-07-18Open
Machine-readable:/llms.txt/llms-full.txt