Amux AI

Create image edit

Last updated November 23, 2026

Edit and composite images with openai/gpt-image-2.6-flare using reference images, masks, or visual markup overlays.

Reference-based image editing with openai/gpt-image-2.6-flare. Send requests as multipart/form-data, passing reference images (image / image[]) and optional mask or 2.6 markup overlays as binary file parts, and remaining parameters as form fields.

POSThttps://gateway.amux.ai/v1/images/edits

Authorization

header
AuthorizationstringRequired

Bearer <your Amux AI key> Amux AI API key (Bearer token).

Request

multipart/form-data
modelstringRequired

Model identifier (optionally suffixed with :amux-special or :adobe).

promptstringRequired

Text instructions describing the desired edit (up to 32,000 characters).

imagearray<string>Required

Reference image files (up to 16 files, maximum 25 MB per file).

Both image and image[] field names are accepted (OpenAI SDKs use the former for single-image edits and the latter for multiple images).

maskstring

Optional inpainting mask file whose transparent pixels (alpha = 0) mark the area to edit. Mutually exclusive with markup. Must satisfy:

1. PNG format with an alpha channel;

2. Exact same pixel dimensions as the source image, and file size under 4 MB;

3. Applies to the first reference image when multiple reference images are supplied.

Provider support: Unsupported on adobe; without :adobe pinned, routing automatically skips adobe in favor of amux-special, while pinning :adobe returns 400.

markupstring

New in GPT-Image 2.6: visual annotation/sketch overlay image (strokes, circles, arrows, or labels) indicating where and how to modify the source image. Mutually exclusive with mask; effective only alongside reference images.

Provider support: Unsupported on adobe (pinning :adobe returns 400); supported on amux-special.

nintegerDefault 1

Number of images to generate (1–10, default 1); must be 1 when streaming.

sizestringDefault "1024x1024"

Output image pixel dimensions (defaults to 1024x1024). adobe strictly enforces ≥ 655,360 total pixels and native 4K; amux-special scales non-4K sizes to ~1.57 MP and uses super-resolution for 4K.

aspect_ratiostring

Aspect ratio (1:1, 4:3, 3:4, 3:2, 2:3, 16:9, or 9:16) as an alternative to size. Prefer size; if both are supplied, size takes precedence and any conversion or omission is recorded in amux.notes.

image_sizestring

Resolution tier (1K, 2K, or 4K), used in combination with aspect_ratio under the same conversion rules.

quality"low" | "medium" | "high" | "xhigh" | "max" | "auto"Default "auto"

Render quality tier (low, medium, high, xhigh, max, or auto).

complexity"low" | "medium" | "high"Default "high"

New in GPT-Image 2.6: visual and compositional complexity (low, medium, or high, default high). Supported on both amux-special and adobe.

background"transparent" | "opaque" | "auto"Default "auto"

Background mode (transparent, opaque, or auto). Transparency requires png or webp.

output_format"png" | "jpeg" | "webp"Default "png"

Output image format (png, jpeg, or webp, default png). svg and gif are not supported on edits.

output_compressionstring

Compression level (0–100, default 100); applies only to jpeg and webp.

userstring

Unique end-user identifier for abuse detection and monitoring.

stream"true" | "false"

Enable SSE streaming (pass 'true' or 'false' as text in multipart forms). Provider support: Unsupported on both amux-special and adobe until official openai / azure providers launch.

partial_imagesstring

Maximum number of low-resolution preview frames during streaming (0–3, default 0). Provider support: Depends on streaming; unsupported on both amux-special and adobe.

Response

200response

Image edit succeeded. Returns the same payload structure as the generation endpoint.

400response

Invalid request parameters (such as combining mask and markup, requesting svg/gif on edit, pinning a provider that does not support mask/markup/stream, or n > 1 while streaming).

402response

Insufficient available workspace balance to cover the estimated reservation.

503response

Concurrent task limit reached or service temporarily unavailable. Retry later.

Providers & availability

ProviderStatusBillingEditing capabilitiesUnsupported parameters
amux-specialLiveValue per-image billingMulti-image edits, mask, and markup visual annotationsstream, partial_images
adobeLiveValue per-image billing (slightly above amux-special)Standard reference editing with native 4K outputmask, markup, stream, partial_images
openaiComing soonOfficial token-based billingFull official editing spec— (activates upon launch)
azureComing soonOfficial Azure token-based billingFull official editing spec— (activates upon launch)

Without an explicit :provider suffix, requests carrying mask or markup automatically skip adobe and route to amux-special. Pinning :adobe with mask or markup returns 400.

Reference images, mask, and markup

  • Both image and image[] field names are accepted, up to 16 files per request and 25 MB per file.
  • mask and markup are mutually exclusive: passing both in one request returns 400.
  • mask must be a PNG with an alpha channel (transparent pixels mark the region to edit), matching the first source image's pixel dimensions and ≤ 4 MB; unsupported on adobe.
  • markup (new in 2.6) is a visual annotation/sketch overlay showing strokes, circles, arrows, or notes directly over the target image; unsupported on adobe, supported on amux-special.
  • The edit endpoint supports png, jpeg, and webp output formats only (svg and gif are generation-only).

input_fidelity

GPT-Image 2.6 does not accept input_fidelity. To preserve compatibility for callers migrating from gpt-image-1.5, the gateway strips input_fidelity before forwarding and records a note in amux.notes.

Asynchronous editing

Submit the same multipart/form-data fields to /v1/tasks to run edits asynchronously; see Create task.

Streaming

Neither live provider (amux-special or adobe) currently supports streaming edits (stream=true returns 400). Streaming will activate once official openai / azure providers launch.

Errors

Error responses follow OpenAI's standard schema. See Errors and retries for type codes and retry guidance.

cURL
curl https://gateway.amux.ai/v1/images/edits \
  -H "Authorization: Bearer $AMUX_API_KEY" \
  -F "model=openai/gpt-image-2.6-flare" \
  -F "prompt=<string>" \
  -F "image=@/path/to/image.png" \
  -F "mask=@/path/to/mask.png" \
  -F "markup=@/path/to/markup.png" \
  -F "n=1" \
  -F "size=1024x1024" \
  -F "aspect_ratio=<string>" \
  -F "image_size=<string>" \
  -F "quality=auto" \
  -F "complexity=high" \
  -F "background=auto" \
  -F "output_format=png" \
  -F "output_compression=<string>" \
  -F "user=<string>" \
  -F "stream=true" \
  -F "partial_images=<string>"
{
  "created": 1786000000,
  "data": [
    {
      "b64_json": "<string>",
      "revised_prompt": "<string>"
    }
  ],
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "amux": {
    "task_id": "<string>",
    "generation_id": "<string>",
    "provider": "<string>",
    "cost_nano": "<string>",
    "images": [
      {
        "index": 0,
        "url": "<string>"
      }
    ],
    "notes": [
      "<string>"
    ]
  }
}