Images

GPT Image

OpenAI’s GPT Image models: sharp detail, strong text rendering, and editing with up to 16 images, at one price for every size.

The models

ModelIDPrice per imageReference images
GPT Image 2.5 Flaregpt-image-2.5-flare$0.02up to 16
GPT Image 2.5 Sunburstgpt-image-2.5-sunburst$0.02up to 16
GPT Image 2gpt-image-2$0.02up to 16

GPT Image 2.5 Flare is the quick one; 2.5 Sunburst puts quality first; GPT Image 2 stays for workflows tuned to it.

Make an image

import os
from openai import OpenAI
client = OpenAI(base_url="https://api.zurelay.com/v1", api_key=os.environ["ZURELAY_API_KEY"])
result = client.images.generate(
model="gpt-image-2.5-sunburst",
prompt="An isometric illustration of a tiny bakery at night, warm window light, a cat on the awning",
size="1536x1024",
extra_body={
"quality": "high"
},
)
print(result.data[0].url)

Parameters

sizestring
1024x1024, 1536x1024, 1024x1536, 2048x2048, 3840x2160, 2160x3840, or auto. Same price at every size.
qualitystring
low, medium, high or auto.
backgroundstring
transparent, opaque or auto. Transparent needs PNG or WebP output.
output_formatstring
png, jpeg or webp.
ninteger
1 to 4 images.

Edit with up to 16 images

Use client.images.edit with one or more files, or JSON with images. Masks aren’t supported; describe the area to change.

Python
result = client.images.edit(
model="gpt-image-2.5-flare",
image=[open(f"tile-{i}.png", "rb") for i in range(1, 9)],
prompt="Arrange the eight product photos into a clean 4 x 2 catalog grid on white.",
)

More on sending images: Image editing and reference images.

Questions, or something missing? Ask support in your dashboard or email support@zurelay.com.