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
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
main.py
import osfrom openai import OpenAIclient = 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
sizestring1024x1024, 1536x1024, 1024x1536, 2048x2048, 3840x2160, 2160x3840, orauto. Same price at every size.qualitystringlow,medium,highorauto.backgroundstringtransparent,opaqueorauto. Transparent needs PNG or WebP output.output_formatstringpng,jpegorwebp.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.
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.