[OpenAI](/ai-gateway/models/labs/openai)

# o4-mini

o4-mini advances OpenAI's compact reasoning model line with stronger performance and greater efficiency than o3-mini, adding native tool use and image reasoning. Your use is subject to OpenAI's [Terms](https://openai.com/policies/terms-of-use) & [Privacy](https://openai.com/policies/privacy-policy) Policies.

File InputImplicit CachingReasoningTool UseVision (Image)Web Search

[Use with AI Gateway](https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%3Futm_source%3Dgateway-model-page%26utm_campaign%3Dai-gateway-models&title=Get+Started+with+Vercel+AI+Gateway) [View docs](https://vercel.com/docs/ai-gateway)

AI SDKChat CompletionsMessagesResponses

```
1import { streamText } from 'ai'
2

3const result = streamText({
4  model: 'openai/o4-mini',
5  prompt: 'Why is the sky blue?'
6})
```

[Read docs](https://vercel.com/docs/ai-gateway/sdks-and-apis/ai-sdk)

[Overview](/ai-gateway/models/o4-mini) [API](/ai-gateway/models/o4-mini/api) [About](/ai-gateway/models/o4-mini/about) [Providers](/ai-gateway/models/o4-mini/providers) [Throughput](/ai-gateway/models/o4-mini/throughput) [Latency](/ai-gateway/models/o4-mini/latency) [Uptime](/ai-gateway/models/o4-mini/uptime) [Status](/ai-gateway/models/o4-mini/status) [Similar](/ai-gateway/models/o4-mini/similar) [FAQ](/ai-gateway/models/o4-mini/faq)

## [Copy link to heading](#playground)Playground

Try out o4-mini by OpenAI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75)o4-mini

![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=96&q=75)

o4-mini

## [Copy link to heading](#providers)Providers

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the [docs](/docs/ai-gateway/provider-options) for more info. Using a provider means you agree to their terms, listed under Legal.

| Provider |
| --- |

| Context | Max Output | Latency | Throughput | Input | Output | Cache | Web Search | Capabilities | ZDR | No Training | Release Date |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

| ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) [Azure](/ai-gateway/models/providers/azure) Legal:[Terms](https://learn.microsoft.com/en-us/legal/cognitive-services/openai/code-of-conduct)•[Privacy](https://privacy.microsoft.com/en-us/privacystatement) | 200K | 100K |  |  | $1.10/M | $4.40/M | Read:$0.28/M Write:— | $14/K \+ input costs | +3 |  |  | 04/16/2025 |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [OpenAI](/ai-gateway/models/providers/openai) Legal:[Terms](https://openai.com/policies/terms-of-use)•[Privacy](https://openai.com/policies/privacy-policy) | 200K | 100K | 2.0s | 161tps | $1.10/M+2 more | $4.40/M+2 more | Read:$0.28/M+2 more Write:— | $10/K \+ input costs | +3 |  |  | 04/16/2025 |  |

## [Copy link to heading](#throughput)Throughput24 hours

1W

1D

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the [docs](https://vercel.com/docs/ai-gateway/models-and-providers/metrics) for more info.

## [Copy link to heading](#latency)Latency24 hours

1W

1D

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the [docs](https://vercel.com/docs/ai-gateway/models-and-providers/metrics) for more info.

## [Copy link to heading](#uptime)Uptime24 hours

1W

1D

1H

Direct request success rate on AI Gateway and per-provider. Visit the [docs](https://vercel.com/docs/ai-gateway/models-and-providers/uptime) for more info.

1W

1D

1H

## [Copy link to heading](#more-models-by-openai)More models by OpenAI

All

Text

Code

| Model |
| --- |

| Context | Latency | Throughput | Input | Output | Cache | Web Search | Capabilities | Providers | ZDR | No Training | Release Date |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |

| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [openai/gpt-5.6-luna](/ai-gateway/models/gpt-5.6-luna) | 1.1M | 2.5s | 250tps | $1/M$0.20/M Fast $0.40/M+1 more | $6/M$1.20/M Fast $2.40/M+1 more | Read: $0.1/M$0.02/M+1 more Write: $1.25/M$0.25/M+1 more | $10/K \+ input costs | +4 | ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) ![bedrock logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Famazon%2520bedrock.png&w=48&q=75) ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) |  |  | 07/09/2026 |  |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [openai/gpt\-5.6-sol](/ai-gateway/models/gpt-5.6-sol) | 1.1M | 3.1s | 63tps | $4/M$2/M Fast $4/M+1 more | $20/M$10/M Fast $20/M+1 more | Read: $0.4/M$0.2/M+1 more Write: $5/M$2.5/M+1 more | $10/K \+ input costs | +4 | ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) ![bedrock logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Famazon%2520bedrock.png&w=48&q=75) ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) |  |  | 07/09/2026 |  |
| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [openai/gpt-5.6-terra](/ai-gateway/models/gpt-5.6-terra) | 1.1M | 1.0s | 107tps | $2.50/M$2/M Fast $4/M+1 more | $15/M$12/M Fast $24/M+1 more | Read: $0.25/M$0.2/M+1 more Write: $3.13/M$2.5/M+1 more | $10/K \+ input costs | +4 | ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) ![bedrock logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Famazon%2520bedrock.png&w=48&q=75) ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) |  |  | 07/09/2026 |  |
| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [openai/gpt-5.4](/ai-gateway/models/gpt-5.4) | 1.1M | 1.8s | 74tps | $2.50/MFast $5/M+1 more | $15/MFast $30/M+1 more | Read: $0.25/M+1 more Write: — | $10/K \+ input costs | +4 | ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) |  |  | 03/05/2026 |  |
| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [openai/gpt-5-nano](/ai-gateway/models/gpt-5-nano) | 400K | 4.3s | 138tps | $0.05/M | $0.40/M | Read:$0.01/M Write:— | $14/K \+ input costs | +3 | ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) |  |  | 08/07/2025 |  |
| ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) [openai/gpt-5-mini](/ai-gateway/models/gpt-5-mini) | 400K | 4.0s | 162tps | $0.25/MFast $0.45/M | $2/MFast $3.60/M | Read:$0.03/M Write:— | $14/K \+ input costs | +3 | ![azure logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fazure.png&w=48&q=75) ![openai logo](/vc-ap-vercel-marketing/_next/image?url=https%3A%2F%2F7nyt0uhk7sse4zvn.public.blob.vercel-storage.com%2Fdocs-assets%2Fstatic%2Fdocs%2Fai-gateway%2Flogos%2Fopenai.png&w=48&q=75) |  |  | 08/07/2025 |  |

## [Copy link to heading](#about-o4-mini)About o4-mini

o4-mini was released on April 16, 2025 alongside o3 as a cost-efficient reasoning model from OpenAI. It advances the compact reasoning model line (following o1-mini and o3-mini) with improvements across reasoning quality, efficiency, and multimodal capability.

A key advancement is native vision support: o4-mini can reason over images, diagrams, mathematical notation, and screenshots, combining visual understanding with chain-of-thought analysis. Earlier mini reasoning models were text-only. This opens up visual reasoning tasks at the affordable mini-tier pricing.

The model supports function calling and tool use, making it suitable as the reasoning layer in lightweight agent architectures. Combined with the `reasoning_effort` parameter, it lets you build cost-optimized pipelines that apply just enough reasoning to each request.

## [Copy link to heading](#what-to-consider-when-choosing-a-provider)What To Consider When Choosing a Provider

- Configuration: o4-mini incorporates advances beyond o3-mini, including native vision support. It's a strong option for projects that need affordable chain-of-thought reasoning.
- Configuration: Unlike earlier mini reasoning models, o4-mini natively supports vision input, enabling reasoning over images, diagrams, and documents.
- Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the [documentation](https://vercel.com/docs/ai-gateway/security-and-compliance/zdr) for details.
- Authentication: AI Gateway authenticates requests using an [API key](https://vercel.com/docs/ai-gateway/authentication-and-byok#api-key-authentication) or [OIDC token](https://vercel.com/docs/ai-gateway/authentication-and-byok#oidc-token-authentication). You do not need to manage provider credentials directly.

## [Copy link to heading](#when-to-use-o4-mini)When to Use o4-mini

### Best for

- Affordable chain-of-thought reasoning: Per-request deliberation on technical tasks at scale
- Visual reasoning: Analyzing diagrams, charts, mathematical notation, and screenshots with step-by-step thinking
- Tool-using agents: Lightweight reasoning backbone for agents that call external tools and APIs
- Math and code reasoning: Competition-level problems and algorithmic analysis at accessible cost
- Mixed-difficulty pipelines: Using `reasoning_effort` to optimize cost across varied query complexity

### Consider alternatives when

- Maximum reasoning depth: O3 or o3-pro for the hardest problems requiring exhaustive deliberation
- General-purpose tasks: GPT-5 mini for workloads that don't benefit from chain-of-thought
- Coding agent workflows: Codex models for autonomous software engineering
- Non-reasoning speed: GPT-5.1 instant for the fastest possible general-purpose responses

## [Copy link to heading](#conclusion)Conclusion

o4-mini combines stronger reasoning performance than o3-mini with native vision and tool use at an affordable price point. For technical workloads on AI Gateway that need per-request reasoning with multimodal support, it advances the cost-efficient reasoning tier.