Create Image Edit

Go to Product

You can call this endpoint with either:

  • multipart/form-data: use binary uploads via image (and optional mask).
  • application/json: use images (and optional mask) as references with either image_url or file_id.

Note that JSON requests use images (array) instead of the multipart image field.

Options

Image

The image(s) to edit. Must be a supported image file or an array of images.

For the GPT image models (gpt-image-1, gpt-image-1-mini, and gpt-image-1.5), each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images. chatgpt-image-latest follows the same input constraints as GPT image models.

For dall-e-2, you can only provide one image, and it should be a square png file less than 4MB.

Prompt
A text description of the desired image(s). The maximum length is 1000 characters for dall-e-2, and 32000 characters for the GPT image models.
Set Mask
Mask
An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image.
Set Background
Background

Allows to set transparency for the background of the generated image(s). This parameter is only supported for the GPT image models. Must be one of transparent, opaque or auto (default value). When auto is used, the model will automatically determine the best background for the image.

If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp.

Set Model
Model
The model to use for image generation. Defaults to gpt-image-1.5.
Set N
N
The number of images to generate. Must be between 1 and 10.
Set Size
Size
The size of the generated images. For gpt-image-2 and gpt-image-2-2026-04-21, arbitrary resolutions are supported as WIDTHxHEIGHT strings, for example 1536x864. Width and height must both be divisible by 16 and the requested aspect ratio must be between 1:3 and 3:1. Resolutions above 2560x1440 are experimental, and the maximum supported resolution is 3840x2160. The requested size must also satisfy the model's current pixel and edge limits. The standard sizes 1024x1024, 1536x1024, and 1024x1536 are supported by the GPT image models; auto is supported for models that allow automatic sizing. For dall-e-2, use one of 256x256, 512x512, or 1024x1024. For dall-e-3, use one of 1024x1024, 1792x1024, or 1024x1792.
Set Response Format
Response Format
The format in which the generated images are returned. Must be one of url or b64_json. URLs are only valid for 60 minutes after the image has been generated. This parameter is only supported for dall-e-2 (default is url for dall-e-2), as GPT image models always return base64-encoded images.
Set Output Format
Output Format
The format in which the generated images are returned. This parameter is only supported for the GPT image models. Must be one of png, jpeg, or webp. The default value is png.
Set Output Compression
Output Compression
The compression level (0-100%) for the generated images. This parameter is only supported for the GPT image models with the webp or jpeg output formats, and defaults to 100.
Set User
User
A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.
Set Input Fidelity
Input Fidelity
Set Stream
Stream
Edit the image in streaming mode. Defaults to false. See the Image generation guide for more information.
Set Partial Images
Partial Images
Set Quality
Quality
The quality of the image that will be generated for GPT image models. Defaults to auto.
Result Format

Specify how the response should be mapped to the table output. The following formats are available:

Structured Table: Returns a parsed table with data split into rows and columns.

  • Created: The Unix timestamp (in seconds) of when the image was created.
  • Data: The list of generated images.
  • Background: The background parameter used for the image generation. Either transparent or opaque.
  • Output Format: The output format of the image generation. Either png, webp, or jpeg.
  • Size: The size of the image generated. Either 1024x1024, 1024x1536, or 1536x1024.
  • Quality: The quality of the image generated. Either low, medium, or high.
  • Usage: For gpt-image-1 only, the token usage information for the image generation.

Raw Response: Returns the raw response in a single row with the following columns:

  • body: Response body
  • status: HTTP status code

Input Ports

Icon
Configuration data.

Output Ports

Icon
Result of the request depending on the selected Result Format.
Icon
Configuration data (this is the same as the input port; it is provided as passthrough for sequentially chaining nodes to declutter your workflow connections).

Popular Predecessors

Popular Successors

  • No recommendations found

Views

This node has no views

Workflows

  • No workflows found

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.