GPT-5.4 Mini API

openai/gpt-5.4-mini
GPT-5.4 Mini on AIMLAPI.
Context
400K tokens
Input
$1.587 / 1M tokens
Output
$9.522 / 1M tokens
Released
Mar 17, 2026

Overview

What is GPT-5.4 Mini API?

GPT-5.4 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.4 Mini API Pricing
- Input: $0.975 / 1M tokens
- Output: $5.85 / 1M tokens

Where to Use GPT-5.4 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 (24h): 100%
  • Uptime (7d): 98.0%
  • Availability (24h): 100%
  • Error rate (24h): 0%
  • End-to-end latency (24h median): 837ms

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

Use cases

GPT-5.4 Mini is documented as suited to coding workflows that benefit from fast iteration, including targeted edits, codebase navigation, front-end generation, and debugging loops.

It is also suited to multimodal tasks, especially computer use, where it can quickly interpret screenshots of dense user interfaces to complete computer-use tasks with speed.

It is documented as a strong fit for systems that combine models of different sizes, including setups where a larger model handles planning while GPT-5.4 Mini handles specific subtasks.

It is also described as useful for tool-using and function-calling workflows, including agentic tasks that rely on fast tool use and external or enterprise content retrieval.

How to use GPT-5.4 Mini API

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

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

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

GPT-5.4 Mini API Pricing

TypePrice
Input
$1.587 / 1M tokens
Output
$9.522 / 1M tokens
Cached input
$0.1587 / 1M tokens

GPT-5.4 Mini Benchmarks

BenchmarkScoreWhat it measuresSourceRetrieved
Intelligence
24.6
Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026
Coding
56.1
Composite score across standardised coding evaluations, measured independently by Artificial AnalysisSourceSeptember 12, 2026

GPT-5.4 Mini vs other models

ModelInputOutputContextBest for
GPT-5.4 Mini
This page
$1.587 / 1M tokens
$9.522 / 1M tokens
400K tokens
Reasoning + agents
$5 / 1M tokens
$30 / 1M tokens
1M tokens
Reasoning + agents
$2 / 1M tokens
$10 / 1M tokens
1M tokens
Balanced coding + agents
$3 / 1M tokens
$15 / 1M tokens
1M tokens
Long-context, multimodal & agentic workflows
$1.5 / 1M tokens
$9 / 1M tokens
1M tokens
Reasoning + agents

Frequently asked questions

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

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

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

GPT-5.4 Mini is priced at input $2.0631 / 1M tokens, output $12.3786 / 1M tokens, cached input $0.20631 / 1M tokens.

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

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

GPT-5.4 Mini was built by OpenAI.

Start building with GPT-5.4 Mini

Get API Key
1000+ models, one API.