# GPT-5 mini

The cost-efficient member of the GPT-5 family, delivering strong reasoning and coding performance at a price point designed for high-volume production deployment.

- **Model ID:** `openai/gpt-5-mini`
- **Type:** chat
- **Providers:** azure, openai
- **Context window:** 400,000
- **Maximum output tokens:** 128,000
- **Pricing:** $0.25/1M input tokens, $2.0/1M output tokens
- **Canonical page:** https://vercel.com/ai-gateway/models/gpt-5-mini

## Supported parameters

Detailed capability metadata has not been reported for this model.

## Example

```ts
import { streamText } from 'ai'

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

## About

GPT-5 mini launched on August 7, 2025 alongside GPT-5, GPT-5 nano, and GPT-5 pro as part of the GPT-5 model family. It occupies the cost-performance tier that typically handles the majority of production API traffic: capable enough for most tasks, affordable enough to scale.

The model inherits the GPT-5 family's architectural improvements in reasoning, coding, and instruction following while operating at reduced compute requirements. It supports a context window of 400K tokens, multimodal input, function calling, and structured outputs, providing the full feature set developers need for production applications.

If you're migrating from GPT-4o mini or GPT-4.1 mini, GPT-5 mini is the next generation of the mid-tier model. It improves quality across the board while maintaining the economics that make high-volume deployment practical.

## What to consider

GPT-5 mini is a strong choice for most production traffic in the GPT-5 family. It provides enough capability for the vast majority of tasks while keeping per-request costs manageable at scale.

It sits between GPT-5 nano (fastest, cheapest) and full GPT-5 (most capable), covering the middle ground where most real-world applications operate.

## When to use

### Best For

- **Production chat interfaces:** Fast, capable responses for customer-facing conversational products
- **Code assistance:** Strong coding support for development tools at sustainable per-request costs
- **Document processing:** Analyzing and summarizing documents with GPT-5 family instruction following
- **Agentic workflows:** Cost-effective backbone for multi-step agent pipelines with many sequential calls
- **Content generation:** Marketing copy, technical writing, and editorial assistance at volume

### Consider Alternatives When

- **Maximum capability needed:** Full GPT-5 for the highest quality on complex tasks
- **Minimal cost required:** GPT-5 nano for classification, routing, and simple extraction
- **Deep reasoning:** o3 for problems requiring extended chain-of-thought deliberation
- **Legacy compatibility:** GPT-4o mini if you need to maintain existing integrations without migration

## Best for

- **Production chat interfaces:** Fast, capable responses for customer-facing conversational products
- **Code assistance:** Strong coding support for development tools at sustainable per-request costs
- **Document processing:** Analyzing and summarizing documents with GPT-5 family instruction following
- **Agentic workflows:** Cost-effective backbone for multi-step agent pipelines with many sequential calls
- **Content generation:** Marketing copy, technical writing, and editorial assistance at volume

## Consider alternatives

- **Maximum capability needed:** Full GPT-5 for the highest quality on complex tasks
- **Minimal cost required:** GPT-5 nano for classification, routing, and simple extraction
- **Deep reasoning:** o3 for problems requiring extended chain-of-thought deliberation
- **Legacy compatibility:** GPT-4o mini if you need to maintain existing integrations without migration

## Frequently asked questions

### How does GPT-5 mini compare to GPT-4o mini?

GPT-5 mini is the next generation of OpenAI's mid-tier model, delivering improved reasoning, coding, and instruction following compared to GPT-4o mini.

### What context window does GPT-5 mini support?

400K tokens, enabling extensive document processing and conversation history retention.

### When should I use full GPT-5 instead of mini?

When the task demands maximum capability, particularly on complex reasoning, nuanced writing, or challenging coding problems where the quality gap is measurable and consequential.

### Does GPT-5 mini support function calling and structured outputs?

Yes. It supports the full API feature set including function calling, structured outputs via JSON schema, vision input, and system messages.

### How does AI Gateway handle authentication for GPT-5 mini?

AI Gateway accepts a single API key or OIDC token for all requests. You don't embed OpenAI credentials in your application; AI Gateway routes and authenticates on your behalf.

### What is the pricing for GPT-5 mini?

Pricing appears on this page and updates as providers adjust their rates. AI Gateway routes traffic through the configured provider.

### What are typical latency characteristics?

This page shows live throughput and time-to-first-token metrics measured across real AI Gateway traffic.

## Links

- [Model page](https://vercel.com/ai-gateway/models/gpt-5-mini)
- [AI Gateway documentation](https://vercel.com/docs/ai-gateway)
- [Provider model documentation](https://learn.microsoft.com/en-us/azure/ai-foundry/foundry-models/concepts/models-sold-directly-by-azure?pivots=azure-openai&tabs=global-standard-aoai%2Cstandard-chat-completions%2Cglobal-standard#gpt-5.1)
- [Provider pricing](https://platform.openai.com/docs/pricing)
