modelsell.app Docs
ImagesOpenAI Images

OpenAI GPT Image 2.6

Official GPT Image 2.6 Sunburst and Flare parameters for image generation, editing, GIF animation, SVG, markup, and streaming.

GPT Image 2.6 generates and edits images, accepts markup guidance, and produces GIF animations and SVG artwork. This guide follows the official OpenAI Image API documentation checked on November 6, 2026. Use the modelsell.app API address and API key shown below.

Models and Endpoints

Model IDUse case
gpt-image-2.6-sunburstDetailed compositions and image editing.
gpt-image-2.6-flareFast generation and iterative edits.
OperationRequest
Generate images, GIF, or SVGPOST https://api.modelsell.com/v1/images/generations, JSON
Edit images or create GIF from referencesPOST https://api.modelsell.com/v1/images/edits, multipart or JSON

Authenticate with Authorization: Bearer $MODELSELL_API_KEY and specify the full model ID. For the previous generation, see GPT Image 2.5.

Generate an Image

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.6-flare",
    "prompt": "A clean product photograph of a ceramic coffee cup, light gray background, soft side lighting",
    "size": "1024x1024",
    "quality": "medium",
    "complexity": "low",
    "output_format": "png",
    "n": 1
  }' > result.json

data[].b64_json contains base64-encoded file bytes. Save the first result with the following code. Use a .gif or .svg extension when requesting those formats.

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"]))

Request Parameters

These fields apply to image generation and editing, except SVG options, which apply only to generation.

FieldTypeDefaultDescription
modelstringSpecify explicitlyFull model ID from the table above.
promptstringRequiredGeneration or editing instructions, up to 32,000 characters.
ninteger1Number of outputs, 1–10. SVG requires 1; GIF also has a total pixel budget.
sizestringautoOutput dimensions, such as 1024x1024, 1536x1024, 1024x1536, or a supported WIDTHxHEIGHT. For GIF, this is the size of each frame.
qualitystringautolow, medium, high, xhigh, max, or auto; controls rendering quality.
complexitystringhighlow, medium, or high; controls planning computation independently of quality.
backgroundstringautoauto, opaque, or transparent. Transparent raster output uses PNG or WebP; SVG can also be transparent.
output_formatstringpngGeneration: png, jpeg, webp, gif, svg. Editing: png, jpeg, webp, gif.
output_compressioninteger1000–100, JPEG/WebP only. An explicit 0 is valid.
moderationstringautoauto or low.
streambooleanfalseReturn SSE events. GIF/SVG do not support Image API streaming.
partial_imagesinteger0Streaming previews, 0–3. With 0, only the final image event is returned. Fewer previews may arrive than requested.
frame_countinteger9GIF only, 2–16 frames.
frame_duration_msinteger200GIF only. The official generation guide specifies 20–2000 milliseconds, rounded to 10 ms when encoded.
svgobjectOmittedSVG author configuration; send only when SVG model selection is enabled.
svg.modelstringConditionally requiredSVG author model ID, required when using enabled model selection. The top-level model still selects the image model.
svg.reasoning.effortstring / nullAuthor defaultIndependent of image complexity. The schema lists none, minimal, low, medium, high, xhigh, and max; supported values depend on the author model.
safety_identifierstringOmittedStable end-user identifier, up to 128 characters. Prefer a hash over a raw username or email.
userstringOmittedDeprecated identifier. A nonempty safety_identifier takes precedence; omitted, null, or empty values fall back to user.

GPT Image returns base64 file content directly: omit response_format. style belongs to retired image models. The documented input_fidelity controls apply to earlier GPT Image models; do not treat it as a configurable 2.6 setting.

Complexity and Quality

Start with complexity: "low" for focused changes. Higher complexity can help with text, layouts, and relationships between objects, but may increase latency and introduce more changes. quality controls rendering separately. Adjusting complexity has no separate surcharge.

For static images, start with auto or the three standard sizes. Custom dimensions must be multiples of 16, with an aspect ratio between 1:3 and 3:1, and meet the selected model's edge and pixel limits. GIF has separate frame-size and total-request pixel constraints; do not apply the static-image minimum pixel count to each GIF frame.

Edit Images

Input images can be PNG, JPEG/JPG, or WebP, each under 50 MB, with up to 16 images. Source images, masks, and markup are separate inputs. Source images do not all need to be PNG. SVG is not a supported editing input.

InputMultipartJSONMeaning
Source imagesimage for one file; image[] for multiple filesimages arrayRequired for editing.
maskPNG fileImage reference objectTransparent pixels mark the edit region on the first image. Mutually exclusive with markup.
markupTransparent PNG fileImage reference objectCircles, arrows, or annotations over the first image, explained in the prompt. Mutually exclusive with mask.

A JSON image reference is {"image_url":"https://..."}, {"image_url":"data:image/webp;base64,..."}, or {"file_id":"file-..."}. Provide exactly one of image_url and file_id per object. images contains 1–16 objects; mask and markup each take one object. image_url has a maximum length of 20,971,520 characters, which is a string limit rather than a binary file-size limit.

Upload with Multipart

curl --fail-with-body -sS https://api.modelsell.com/v1/images/edits \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -F 'model=gpt-image-2.6-flare' \
  -F '[email protected];type=image/webp' \
  -F 'prompt=Make the cup dark blue. Preserve its shape, lighting, and background.' \
  -F 'complexity=low' \
  -F 'quality=medium' \
  -F 'output_format=png' > result.json

For multiple files, repeat -F 'image[]=@filename;type=image/MIME' with the correct MIME type. Let curl set the multipart boundary instead of manually setting the request's Content-Type.

JSON References

{
  "model": "gpt-image-2.6-sunburst",
  "prompt": "Keep the product unchanged and replace the background with a pale blue studio backdrop",
  "images": [
    { "image_url": "https://example.com/product.jpg" }
  ],
  "quality": "high",
  "complexity": "medium",
  "output_format": "png"
}

Send this JSON to /v1/images/edits. Use reference objects rather than an array of URL strings, and send image inputs to the editing endpoint.

Markup and Masks

markup must be a PNG with transparent pixels and match the first 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 markup with prompt_rewriter. Explain what the annotations mean and whether to remove them from the finished image.

curl --fail-with-body -sS https://api.modelsell.com/v1/images/edits \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -F 'model=gpt-image-2.6-flare' \
  -F '[email protected];type=image/webp' \
  -F '[email protected];type=image/png' \
  -F 'prompt=Make the chair inside the red circle dark green. Preserve the rest of the room and remove the red circle.' \
  -F 'quality=medium' > result.json

For mask editing, prepare a PNG source and a matching PNG mask with an alpha channel. Fully transparent mask pixels identify the edit region. The mask guides editing rather than guaranteeing an exact pixel boundary. Do not combine mask with markup, and do not use masks with GIF output.

Animated GIF

Both generation and editing support output_format: "gif". Describe the movement, camera behavior, starting pose, and loop in the prompt.

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.6-sunburst",
    "prompt": "A folded paper bird gently flaps its wings. Keep the camera still and return to the starting pose for a seamless loop.",
    "output_format": "gif",
    "size": "auto",
    "quality": "medium",
    "complexity": "medium",
    "frame_count": 9,
    "frame_duration_ms": 200,
    "n": 1
  }' > result.json
  • This produces approximately 1.8 seconds per loop. n counts animations; frame_count counts frames in each animation.
  • To guide motion with still references, send source images to /v1/images/edits with the same GIF settings.
  • size specifies the finished frame dimensions. Custom dimensions must be positive multiples of 16. Frame count, frame size, and animation count must fit the model limits and total request pixel budget; reduce them or use auto if needed.
  • GIF does not support streaming, partial previews, mask, custom output_compression, or prompt_rewriter. Send frame settings only with GIF output.
  • The official API reference requires access to the selected model's GIF preview.

Decoded b64_json is a complete GIF file, not an array of PNG frames.

SVG Output

Generate SVG through /v1/images/generations for editable paths, shapes, and colors. The editing endpoint does not produce SVG. SVG output itself requires a supported model and project access, separately from access to author model selection.

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.6-flare",
    "prompt": "A vector coffee-cup icon built from simple geometric shapes, three flat colors, no text",
    "output_format": "svg",
    "quality": "medium",
    "complexity": "low",
    "n": 1
  }' > result.json

SVG requires n: 1 and does not support streaming, partial previews, output_compression, or prompt_rewriter. The image model first creates a reference image, which an SVG author uses to produce the vector document. quality and complexity control the reference image.

Add this object only when SVG author selection is enabled. Replace the placeholder with an available author model ID; otherwise omit the entire object:

{
  "svg": {
    "model": "YOUR_SVG_AUTHOR_MODEL_ID",
    "reasoning": { "effort": "medium" }
  }
}

The author model determines supported reasoning levels. Decode the result as UTF-8 XML and save it as .svg. The result contains static vectors without scripts, external resources, or embedded raster images.

Transparency and Compression

Set background: "transparent" with PNG or WebP output. Request an isolated subject on a fully transparent background, and preserve the alpha channel when saving the file. JPEG does not support transparency. SVG output also accepts background: "transparent".

output_compression applies only to JPEG/WebP and accepts both 0 and 100. Omit it for PNG, GIF, and SVG.

Streaming with SSE

For static-image generation or editing, use stream: true and partial_images: 0–3.

curl --fail-with-body -N https://api.modelsell.com/v1/images/generations \
  -H "Authorization: Bearer $MODELSELL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2.6-flare",
    "prompt": "A soft watercolor illustration of a lighthouse by the sea",
    "output_format": "png",
    "stream": true,
    "partial_images": 2
  }'
EndpointPreview eventFinal event
generationsimage_generation.partial_imageimage_generation.completed
editsimage_edit.partial_imageimage_edit.completed

Each SSE data: payload is an event JSON object with image bytes in b64_json. Preview events include partial_image_index; completion events provide the final image and usage. Do not use the ordinary JSON data[0] path for SSE. Completion can arrive before all requested previews.

Response and Usage

FieldMeaning
createdOrdinary JSON response timestamp in Unix seconds; SSE uses created_at.
data[].b64_jsonBase64 file bytes; save with the requested output format.
background, output_format, quality, sizeActual output settings.
safety_identifierEffective identifier, including fallback from deprecated user.
usageImage-model input, output, and total tokens, with text/image details where returned.
svg_usageSVG author's model and input, output, reasoning, and total token counts, separate from image-model usage.

SVG uses both a reference-image model and an author model. Each actual partial image adds 100 image output tokens, and the requested number of previews is not guaranteed. Store returned usage rather than treating the requested preview count as a fixed final bill.

Official References

On this page