GPT-5 Mini API

GPT-5 mini delivers GPT-5 capabilities in a smaller, faster package optimized for cost-sensitive applications.

Modalities
TextText, Image
In / Out price
$0.25/$2per 1M
Context window
400K tokens
Released
Aug 7, 2025

GPT-5 Mini overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by GPT-5 Mini through AI/ML API

GPT-5 Mini by OpenAI

GPT-5 Mini offers a lightweight yet powerful solution within the GPT-5 lineup, delivering efficient multimodal AI with text and vision inputs.

GPT-5 Mini specs

Model ID
openai/gpt-5-mini-2025-08-07
Developer
OpenAI
Context window
400,000 tokens
Max output
128,000 tokens
Input
Text
Output
Text, Image
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

GPT-5 Mini is a streamlined variant of the GPT-5 family designed to offer fast, efficient multimodal AI capabilities with a significantly lower cost while retaining the core advanced features of GPT-5. It supports text-to-text and image-to-text tasks, making it suitable for a wide range of applications where high throughput and cost efficiency are essential.

Performance and Token Capacity

  • Supports an extensive input context of up to 400K tokens, enabling processing of large and complex documents similar to the full GPT-5 model.
  • Offers efficient performance with faster inference times optimized for high throughput.

Core Features and Functionalities

  • Model Architecture: Shares the core transformer-based architecture with GPT-5, optimized for efficiency and speed to balance performance with operational cost.
  • Multimodal Support: Capable of handling both text and vision (image-to-text) tasks via API, enabling multimodal context understanding.
  • Scalability: Tailored for applications requiring large context capabilities with moderated computational resources.
  • Reasoning Capabilities: Retains improved reasoning and problem-solving features, albeit at a scaled-down level compared to full GPT-5.
  • Bias and Safety: Includes foundational alignment and safety features consistent with GPT-5 models to mitigate hallucinations and ensure response reliability.

Use Cases

  • High-volume, cost-sensitive software workflows including code generation and analysis.
  • Large-scale document and image analysis for sectors like legal, finance, and healthcare.
  • Multimodal content processing and generation where quicker turnaround is needed without full model cost.

Comparison with Other Models

vs GPT-4.1 Mini: GPT-5 Mini supports a larger 400,000 token context window and enhanced multimodal image-to-text abilities, priced more cost-effectively, whereas GPT-4.1 Mini balances intelligence, speed, and cost but with smaller context and more limited modality support.

Use cases

  • High-volume, cost-sensitive software workflows including code generation and analysis.
  • Large-scale document and image analysis for sectors like legal, finance, and healthcare.
  • Multimodal content processing and generation where quicker turnaround is needed without full model cost.

Capabilities

  • Function calling
  • Streaming
  • Structured outputs
  • Reasoning
  • Web search

GPT-5 Mini benchmarks by Artificial Analysis

See how GPT-5 Mini compares in generation speed. Data retrieved Nov 3, 2026.

Speed

Output tokens / second

Benchmark results

Compare 9 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

GPT-5 Mini API pricing

GPT-5 Mini pricing in US dollars
UsagePriceUnit
Input$0.251M tokens
Output$21M tokens
Cached input$0.0251M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

GPT-5 Mini vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
GPT-5 Mini$0.25$2
GPT-6 Luna$0.1$0.5
GPT-6.1 Terra$1$5
GPT-6.1 Sol$2$10
GPT-6.1 Terra Pro$2.12$10.58

How to use the GPT-5 Mini API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5-mini-2025-08-07",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

GPT-5 Mini FAQ

What is the context window of GPT-5 Mini?

GPT-5 Mini has a 400,000 tokens context window and can return up to 128,000 tokens.

What inputs and outputs does GPT-5 Mini support?

GPT-5 Mini takes image, text as input and returns text.

What is the model ID for GPT-5 Mini?

Use openai/gpt-5-mini-2025-08-07 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

How much does GPT-5 Mini cost?

GPT-5 Mini costs $0.25 input and $2 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does GPT-5 Mini support streaming?

Yes, GPT-5 Mini can stream responses as they are generated.

Can GPT-5 Mini read images?

Yes, GPT-5 Mini accepts image input alongside text.

Who created GPT-5 Mini?

GPT-5 Mini was built by OpenAI.

Start building with GPT-5 Mini

GPT-5 Mini API

openai/gpt-5-mini-2025-08-07

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "openai/gpt-5-mini-2025-08-07",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'