Creates an edited image from one or more source images and a prompt.

post/v1/images/edits

Request

  • Base URL
    https://api.llmgateway.io
  • Auth
    HTTP bearer

Request body

promptstring required

A text description of the desired image edit.

background'transparent' | 'opaque' | 'auto'

Background behavior for generated image output.

input_fidelity'high' | 'low'

Controls fidelity to the original input image(s).

modelstring

The model to use for image editing.

ninteger

The number of edited images to generate.

output_compressioninteger

Compression level for jpeg or webp output.

output_format'png' | 'jpeg' | 'webp'

Output image format.

quality'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto'

Output quality for image models.

sizestring

Requested output image size. Supported values depend on the model and provider.

aspect_ratiostring

The aspect ratio of the edited images (e.g. '1:1', '16:9', '4:3', '5:4'). Takes precedence over size-derived defaults.

moderation'auto' | 'low'

Content moderation strictness for models that support it (GPT Image). 'auto' applies the default filtering, 'low' is less restrictive. Ignored by models without a moderation control.

service_tier'auto' | 'default' | 'flex' | 'priority'

Processing tier for the request, forwarded to the underlying chat completion. flex and priority are only accepted for provider/model mappings that support the tier; an unsupported tier returns a 400 unsupported_service_tier error.

Example request

{
  "images": [
    {
      "image_url": "https://example.com/source-image.png"
    }
  ],
  "prompt": "Add a watercolor effect to this image",
  "background": "transparent",
  "input_fidelity": "high",
  "model": "gemini-3-pro-image",
  "n": 1,
  "output_compression": 100,
  "output_format": "png",
  "quality": "high",
  "size": "1024x1024",
  "aspect_ratio": "16:9",
  "moderation": "low",
  "service_tier": "flex"
}

Response

Image edit response.

creatednumber required
background'transparent' | 'opaque'
output_format'png' | 'webp' | 'jpeg'
quality'low' | 'medium' | 'high' | 'xhigh' | 'max'
sizestring

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      the response property / became required for the status

    • info

      added the new optional request property