GPT-5 Image Mini API

openai/gpt-5-image-mini
GPT-5 Image Mini on AIMLAPI.
Context
400K tokens
Input
$3.4385 / 1M tokens
Output
$2.7508 / 1M tokens
Released
Oct 16, 2025

Overview

What is GPT-5 Image Mini API?

GPT-5 Image Mini is available through AIMLAPI.

Technical Specifications
- Supported inputs: Image, Text
- Output: Text
- Context window: 400,000 tokens / Max output: 128,000 tokens
- Endpoint: /chat/completions

Performance Benchmarks
[embed]

GPT-5 Image Mini API Pricing
- Input: $3.25 / 1M tokens
- Output: $2.6 / 1M tokens

Where to Use GPT-5 Image Mini

Coding and code review
Generate, debug, and review code across languages, reading whole files or repos in a single prompt.

Agentic and multi-step workflows
Reliable tool-calling and instruction-following suit agent loops that plan, call tools, and iterate.

Complex reasoning
Extended reasoning improves reliability on multi-step math, logic, and technical analysis.

Long-document analysis
Summarize and extract from contracts, papers, and reports without aggressive chunking.

Code Sample
[embed]

Uptime and performance

  • Uptime (7d): 33.0%

Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.

Use cases

GPT-5 Image Mini is a natively multimodal model that accepts file, image, and text inputs and returns image and text outputs. It is documented as supporting image generation and image editing, along with text rendering and instruction following.

It can be used for generating images from text prompts and reference images, including editing existing images when a user provides image inputs. It can also be used for workflows that combine text understanding with visual creation, such as producing graphics from written instructions or revising images based on textual feedback.

Because it supports file input, it can be used to inspect and work from uploaded documents or other supported files as part of a text-and-image workflow. Because it supports structured output and tools, it can be used in applications that need formatted responses or external tool-assisted image and text tasks.

How to use GPT-5 Image Mini API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to openai/gpt-5-image-mini.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/chat/completions",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "openai/gpt-5-image-mini",
      "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/gpt-5-image-mini",
    "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/gpt-5-image-mini","messages":[{"role":"user","content":"Hello!"}]}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

GPT-5 Image Mini API Pricing

TypePrice
Input
$3.4385 / 1M tokens
Output
$2.7508 / 1M tokens
Cached input
$0.34385 / 1M tokens

GPT-5 Image Mini vs other models

ModelInputOutputContextBest for
$3.4385 / 1M tokens
$2.7508 / 1M tokens
400K tokens
Reasoning + agents
$6.5 / 1M tokens
$39 / 1M tokens
1M tokens
Reasoning + agents
$2.6 / 1M tokens
$13 / 1M tokens
1M tokens
Balanced coding + agents
$3.9 / 1M tokens
$19.5 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.95 / 1M tokens
$11.7 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

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

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

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

GPT-5 Image Mini is priced at input $3.4385 / 1M tokens, output $2.7508 / 1M tokens, cached input $0.34385 / 1M tokens.

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

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

GPT-5 Image Mini was built by OpenAI.

GPT-5 Image Mini is available via the API endpoint https://api.aimlapi.com/v1/chat/completions.

Start building with GPT-5 Image Mini

Get API Key
1000+ models, one API.