Skip to main content
For new projects, use GPT-Image-2 (official) or GPT-Image-2-All (reverse channel, flat $0.03/image). This page keeps the essentials of the legacy versions so existing integrations can troubleshoot and migrate smoothly.

Legacy Lineup

Model IDReleasedEndpointPricingStatus
gpt-image-1.5Dec 2025/v1/images/generationsInput $5.00 / Output $10.00 per M tokensAvailable; upgrade to gpt-image-2 recommended
gpt-image-1Apr 2025/v1/images/generations, /v1/images/editsInput $2.50 / Output $8.00 per M tokensAvailable; upgrade to gpt-image-2 recommended
gpt-image-1-miniApr 2025/v1/images/generationsLower than gpt-image-1Available
Drop-in migration: change model to gpt-image-2 or gpt-image-2-all. Parameters (size / quality / output_format, …) are largely compatible — no structural code changes required.

Common Parameters (Generation)

All legacy versions share the same generation parameters:
ParameterDescription
modelgpt-image-1.5 / gpt-image-1 / gpt-image-1-mini
promptImage description (up to 1000 chars)
size1024x1024 / 1536x1024 / 1024x1536 / auto
qualitylow / medium / high / auto
output_formatpng (default) / jpeg / webp
output_compressionJPEG/WebP only, 0–100%
backgroundtransparent / opaque / auto
nNumber of images (1–10)

Quick Example

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://api.apiyi.com/v1"
)

response = client.images.generate(
    model="gpt-image-1.5",  {/* or gpt-image-1 / gpt-image-1-mini */}
    prompt="A professional product photo on white background, soft studio lighting",
    size="1024x1024",
    quality="high"
)

print(response.data[0].url)

Per-Image Pricing Reference

GPT-Image-1 / 1.5 support both token billing and per-image billing — the system automatically picks whichever is cheaper:

GPT-Image-1.5

Quality1024×10241024×1536 / 1536×1024
Low$0.009$0.013
Medium$0.034$0.050
High$0.133$0.200

GPT-Image-1

Quality1024×10241024×1536 / 1536×1024
Low$0.005$0.006
Medium$0.011$0.015
High$0.036$0.052
Per-image figures are reference only. Actual charges follow whichever billing mode (token or per-image) the system determines is cheaper.

Image Editing (gpt-image-1 only)

gpt-image-1 supports mask-based editing via the /v1/images/edits endpoint:
response = client.images.edit(
    model="gpt-image-1",
    image=open("original.png", "rb"),
    mask=open("mask.png", "rb"),
    prompt="A modern glass skyscraper with reflective windows",
    size="1024x1024"
)
ParameterDescription
imageSource image, PNG/WebP/JPG, < 50MB each, up to 16 images
maskMask image — pixels with alpha=0 will be repainted
promptDescription of what to generate in the masked region
For new editing workflows, use GPT-Image-2 Edit (official) or GPT-Image-2-All Edit (reverse, supports up to 16 input images for blending).

Migrating to GPT-Image-2 / 2-All

Your needRecommended target
Stay on official OpenAI endpoint, need precise size/quality controlgpt-image-2 (official)
Want predictable flat pricing ($0.03/image), better instruction followinggpt-image-2-all (reverse)
Still need mask-based image editinggpt-image-2-all edit endpoint (up to 16 images)

GPT-Image-2 Overview

Latest official version — endpoint and parameters compatible with legacy

GPT-Image-2-All Overview

Reverse channel, flat $0.03/image, faster turnaround

Official vs Reverse Comparison

Side-by-side comparison and selection guide