O4-Mini is OpenAI's small-scale reasoning model designed to balance performance with cost-efficiency. It features multimodal capabilities, tool integration, and strong performance in mathematics and coding tasks while maintaining faster response times and lower pricing than larger models. O4-Mini represents a significant advancement over previous mini models by supporting images, browsing, and Python execution.
Cost Input tokens $1.155 per million tokens
Output tokens $4.62 per million tokens
Cost for 1,000 tokens $0.00116 (input) + $0.00462 (output) = $0.00578
For more detailed information, usage references, and additional examples, please refer to our comprehensive documentation at:
O4-Mini delivers impressive reasoning capabilities with multimodal support at an accessible price point. It excels in mathematical and coding tasks while maintaining strong performance across general benchmarks, making it an excellent choice for developers seeking balanced performance and efficiency for a wide range of applications.
Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.
import requests r = requests.post( "https://api.aimlapi.com/v1/chat/completions", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "openai/o4-mini-2025-04-16", "messages": [ { "role": "user", "content": "Hello!" } ] }, ) print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", { method: "POST", headers: { Authorization: `Bearer ${process.env.AIMLAPI_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "model": "openai/o4-mini-2025-04-16", "messages": [ { "role": "user", "content": "Hello!" } ] }), }); console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \ -H "Authorization: Bearer $AIMLAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"openai/o4-mini-2025-04-16","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Input | |
| Output | |
| Cached input |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
GPT-o4-mini-2025-04-16 This page | Reasoning + agents | |||
| Reasoning + agents | ||||
| Balanced coding + agents | ||||
| Long-context, multimodal & agentic workflows | ||||
| Reasoning + agents |
GPT-o4-mini-2025-04-16 has a 200,000 tokens context window and can return up to 100,000 tokens.
GPT-o4-mini-2025-04-16 takes image, text as input and returns text.
Use openai/o4-mini-2025-04-16 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
GPT-o4-mini-2025-04-16 became available on August 7, 2025.
GPT-o4-mini-2025-04-16 is priced at input $1.43 / 1M tokens, output $5.72 / 1M tokens, cached input $0.3575 / 1M tokens.
Yes, GPT-o4-mini-2025-04-16 can stream responses as they are generated.
Yes, GPT-o4-mini-2025-04-16 accepts image input alongside text.
GPT-o4-mini-2025-04-16 was built by OpenAI.
Yes, it supports function calling and tool use as part of its feature set.