modelsell.app Docs
ImagesOpenAI Images

OpenAI GPT Image 2.5

GPT Image 2.5 Sunburst and Flare generation, editing, transparency, markup, parameters, and streaming, with a separate GPT Image 2.6 integration guide.

GPT Image 2.5 includes gpt-image-2.5-sunburst for detailed editing and gpt-image-2.5-flare for fast iteration. This page follows official OpenAI documentation checked on November 6, 2026.

For 2.6, use the separate GPT Image 2.6 integration guide for complexity, GIF frame settings, SVG author configuration, and complete examples. Use each generation's full model ID; a shared API schema does not imply identical capabilities.

Models and Endpoints

ModelSnapshot
gpt-image-2.5-sunburstgpt-image-2.5-sunburst-2026-09-08
gpt-image-2.5-flaregpt-image-2.5-flare-2026-09-08
OperationAddress and encoding
Generate imagesPOST https://api.modelsell.com/v1/images/generations, JSON
Edit imagesPOST https://api.modelsell.com/v1/images/edits, multipart or JSON

Authenticate with Authorization: Bearer $MODELSELL_API_KEY. Specify the model explicitly. Ordinary responses contain data[].b64_json; omit the legacy response_format parameter.

Parameters

FieldTypeDefaultDescription
modelstringSpecify explicitlyModel ID or snapshot from the table above.
promptstringRequiredGeneration or editing instructions, up to 32,000 characters.
ninteger1Number of images, 1–10.
sizestringautoauto or dimensions meeting the constraints below.
qualitystringautolow, medium, high, xhigh, max, or auto.
backgroundstringautoauto, opaque, or transparent; transparency requires PNG/WebP.
output_formatstringpngStatic output: png, jpeg, or webp.
output_compressioninteger100JPEG/WebP only, 0–100.
moderationstringautoauto or low.
streambooleanfalseEnable SSE output.
partial_imagesinteger0Streaming previews, 0–3. With 0, only the final image is returned. Fewer previews may arrive than requested.
safety_identifierstringOmittedStable end-user identifier, up to 128 characters; prefer a hash.
userstringOmittedDeprecated fallback when safety_identifier is omitted, null, or empty.
imageFile / file arrayRequired for multipart editsUse image[] for multiple files.
imagesReference object arrayRequired for JSON editsEach object uses image_url or file_id. Choose this or multipart image according to the request encoding.
maskFile / reference objectOmittedPNG with an alpha channel, matching the first source image's dimensions; transparent pixels identify the edit region.
markupFile / reference objectOmittedSeparate transparent PNG annotation layer over the first image; mutually exclusive with mask.

The 2.6 parameter table separately documents complexity, frame_count, frame_duration_ms, svg, and their format constraints.

Size and Transparency

Common sizes are 1024x1024, 1536x1024, and 1024x1536. For 2.5 custom dimensions, both edges must be multiples of 16, the aspect ratio must be between 1:3 and 3:1, each edge must be at most 3840 pixels, and total pixels must be between 655,360 and 8,294,400. Resolutions exceeding the pixel count of 2560x1440 are experimental.

Use background: "transparent" with output_format: "png" or "webp" and preserve the alpha channel when saving. JPEG does not support transparency. Omit output_compression for PNG.

Generation Example

curl --fail-with-body -sS https://api.modelsell.com/v1/images/generations \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.5-flare",
    "prompt": "An isolated dark blue ceramic cup on a fully transparent background with no shadow",
    "size": "1024x1024",
    "quality": "high",
    "background": "transparent",
    "output_format": "png",
    "n": 1
  }' > result.json

Editing and Markup

Source images can be PNG, JPEG/JPG, or WebP, each under 50 MB, with up to 16 images. They do not all need to be PNG. A markup overlay must contain transparent pixels and match the first source image's dimensions after orientation. The first image and overlay can each contain up to 16,777,216 pixels, and the overlay file must be at most 50 MB. Do not combine it with mask or prompt_rewriter.

curl --fail-with-body -sS https://api.modelsell.com/v1/images/edits \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -F 'model=gpt-image-2.5-sunburst' \
  -F '[email protected];type=image/webp' \
  -F '[email protected];type=image/png' \
  -F 'prompt=Make the chair inside the red circle green. Remove the annotation and preserve everything else.' \
  -F 'quality=high' \
  -F 'output_format=png' > result.json

Omit markup for an ordinary edit. For JSON editing, send this structure to /v1/images/edits:

{
  "model": "gpt-image-2.5-flare",
  "prompt": "Keep the product unchanged and replace its background with soft light gray",
  "images": [
    { "image_url": "https://example.com/product.jpg" }
  ],
  "output_format": "png"
}

References support HTTPS URLs, base64 data URLs, or Files API file_id values. Provide exactly one of image_url and file_id in each object. JSON mask and markup inputs each use one reference object as well.

Results and Streaming

import base64
import json
from pathlib import Path

result = json.loads(Path("result.json").read_text())
Path("result.png").write_bytes(base64.b64decode(result["data"][0]["b64_json"]))

Non-streaming responses can also contain created, size, quality, background, output_format, usage, and the effective safety_identifier.

With stream: true, parse SSE events: image_generation.partial_image / image_generation.completed for generation, and image_edit.partial_image / image_edit.completed for editing. Image bytes are in each event's b64_json; use the completed event for the final output. Set partial_images: 0–3 to request previews and retain the returned usage.

Official References

On this page