GPT-5 Image API

GPT-5 Image on AIMLAPI.

Modalities
Image, TextText
In / Out price
$10.58/$10.58per 1M
Context window
400K tokens
Released
Oct 14, 2025

GPT-5 Image overview

GPT-5 Image specs

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

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.

Use cases

Complex workflows combining visual analysis, image generation, and long-document understanding in a single model call.

Analyzing architectural blueprints or engineering diagrams alongside lengthy specification documents in one model call.

Generating and iterating on marketing visuals with precise brand-guideline adherence using multimodal prompt chains.

Extracting structured data from hundreds of scanned invoices or medical imaging reports in batch research workflows.

Capabilities

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

GPT-5 Image API pricing

GPT-5 Image pricing in US dollars
UsagePriceUnit
Input$10.581M tokens
Output$10.581M tokens
Cached input$1.321M tokens

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

GPT-5 Image 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 Image$10.58$10.58
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 Image 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-image",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Related articles

All posts

GPT-5 Image FAQ

What is the context window of GPT-5 Image?

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

What inputs and outputs does GPT-5 Image support?

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

What is the model ID for GPT-5 Image?

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

How much does GPT-5 Image cost?

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

Does GPT-5 Image support streaming?

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

Can GPT-5 Image read images?

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

Who created GPT-5 Image?

GPT-5 Image was built by OpenAI.

Start building with GPT-5 Image

GPT-5 Image API

openai/gpt-5-image

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-image",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'