Image generation API

GPT Image API: OpenAI image models at half the token price.

Generate pictures from a text prompt with the OpenAI Images API format and the same prepaid key you use for text models. You pay for the measured prompt and image tokens of each image: $15 per 1M, half of OpenAI's $30.

Live prices and cost per image

Per-image figures are estimates for a square 1024×1024 picture; larger sizes and higher quality use more tokens, and each request shows its exact charge in your dashboard.

ModelPrice / 1M image tokens1024², low1024², medium1024², highStatus
gpt-image-2.5-sunburst$15.00≈ $0.007≈ $0.027≈ $0.105LIVE
gpt-image-2.5-flare$15.00≈ $0.007≈ $0.027≈ $0.105LIVE
gpt-image-2$15.00≈ $0.007≈ $0.027≈ $0.105LIVE
gpt-image-1.5$15.00≈ $0.007≈ $0.027≈ $0.105LIVE

Which image model to use

Generate an image in 30 seconds

Create a key, add $5 or more and call POST https://api.model.sale/v1/images/generations. The image comes back as base64 in data[0].b64_json.

curl https://api.model.sale/v1/images/generations \\
  -H "Authorization: Bearer $MODEL_SALE_KEY" \\
  -H "Content-Type: application/json" \\
  -d '{"model":"gpt-image-2","prompt":"A red apple on a white table","size":"1024x1024","quality":"medium"}'
import base64
from openai import OpenAI
client = OpenAI(base_url="https://api.model.sale/v1", api_key="YOUR_KEY")
image = client.images.generate(model="gpt-image-2", prompt="A red apple on a white table", size="1024x1024", quality="medium")
open("apple.png", "wb").write(base64.b64decode(image.data[0].b64_json))

Common questions

How is an image billed? By the tokens OpenAI's image model reports for that image (prompt plus image output), at one flat rate. A failed generation is not charged.

Is image editing supported? Generation from text (/v1/images/generations) is available now; editing an uploaded image (/v1/images/edits) is not yet.

How long does one image take? Usually 10-30 seconds for low and medium quality; high quality and large sizes can take a minute or more.

Your first request in under a minute.

Create a key, top up from $5 and swap the base URL. No subscription, no hidden fees.

Get your API keyRead the docs