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

GPT-4o-mini (2024-07-18) is OpenAI's compact multimodal model, released 2024-07, offering low-cost access to GPT-4-class capabilities. It scores 82% on MMLU and outperforms GPT-4 on chat preference leaderboards.

Modalities
inTextinImageinFileoutText
Price / 1M−70%
$0.04 / $0.18$0.15 / $0.60
Context
128K
Released
Jul 18, 2024
Knowledge cutoff
Oct 31, 2023

Channels

Every channel serves the same model, but they differ in price and stability. On each API key in the Platform, you pick a primary and a backup channel per vendor, and each billing line shows which channel served the request.

Provider
Discount
Input /M
Output /M
Cache read /M
Cache write 5m /M
Cache write 1h /M
Codexcheap
−70%
$0.04
$0.18
$0.02
—
—
Defaultstable
−30%
$0.10
$0.42
$0.05
—
—

Capabilities

VisionTool usePrompt cachingStructured output

Parameters

Request parameters this model accepts through the API.

frequency_penaltylogit_biaslogprobsmax_tokenspredictionpresence_penaltyresponse_formatseedstopstructured_outputstemperaturetool_choicetoolstop_logprobstop_pweb_search_options

Cost calculator

Pick a channel and a usage scenario, then drag the sliders to match your workload. Each scenario assumes a different prompt-cache hit rate.

Channel
Scenario
Unit $0.04 / $0.18 /1MDaily chat: 40% cache hit rate assumed · cache read $0.02 /1M
List price $40.32On MirAPI$12.10/ moYou save $28.22Create an API key

Showcase

Every chat model gets the same three fixed prompts. Outputs are archived verbatim, so you can copy a prompt and reproduce the result.

Task prompt · identical for all models
Build a single-file HTML page using three.js from a CDN: a low-poly planet with a tilted ring of ~200 orbiting particles, a soft key light plus rim light, slow auto-rotation, and drag-to-orbit controls. No build tools — one file only.
Archived output
Archive not published yet

Every model will run this exact prompt, and its output will appear here verbatim with token counts and the cost per run.

Quick start

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.mirapi.ai/v1",   # changed
    api_key=os.environ["MIRAPI_API_KEY"],   # changed
)

resp = client.chat.completions.create(
    model="gpt-4o-mini-2024-07-18",
    messages=[{"role": "user", "content": "Hello"}],
)
Wire GPT-4o-mini (2024-07-18) into your product

1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.

Start free