Skip to main content
Generates images synchronously via OpenAI’s GPT Image endpoint. This node can create new images from text prompts or edit existing images when provided with an input image and optional mask. It supports multiple GPT Image models, including gpt-image-1, gpt-image-1.5, and gpt-image-2.

Inputs

ParameterDescriptionData TypeRequiredRange
promptText prompt for GPT Image (default: "")STRINGYes-
seedRandom seed for generation (default: 0) - not implemented yet in backendINTNo0 to 2147483647
qualityImage quality, affects cost and generation time (default: “low”)COMBONo”low"
"medium"
"high”
backgroundReturn image with or without background (default: “auto”)COMBONo”auto"
"opaque"
"transparent”
sizeImage size. Select “Custom” to use the custom width and height (GPT Image 2 only) (default: “auto”)COMBONo”auto"
"1024x1024"
"1024x1536"
"1536x1024"
"2048x2048"
"2048x1152"
"1152x2048"
"3840x2160"
"2160x3840"
"Custom”
nHow many images to generate (default: 1)INTNo1 to 8
imageOptional reference image for image editingIMAGENo-
maskOptional mask for inpainting (white areas will be replaced)MASKNo-
modelGPT Image model to use (default: “gpt-image-2”)COMBONo”gpt-image-1"
"gpt-image-1.5"
"gpt-image-2”
custom_widthUsed only when size is “Custom”. Must be a multiple of 16 (GPT Image 2 only) (default: 1024)INTNo1024 to 3840
custom_heightUsed only when size is “Custom”. Must be a multiple of 16 (GPT Image 2 only) (default: 1024)INTNo1024 to 3840
Parameter Constraints:
  • When image is provided, the node switches to image editing mode
  • mask can only be used when image is provided
  • When using mask, only single images are supported (batch size must be 1)
  • mask and image must be the same size
  • Custom resolution (size = “Custom”) is only supported by the gpt-image-2 model
  • Custom width and height must be multiples of 16
  • Custom resolution aspect ratio must not exceed 3:1
  • Custom resolution total pixels must be between 655,360 and 8,294,400
  • Transparent background is not supported for the gpt-image-2 model
  • Sizes larger than 1536x1024 (e.g., 2048x2048, 3840x2160) are only supported by the gpt-image-2 model

Outputs

Output NameDescriptionData Type
IMAGEGenerated or edited image(s)IMAGE
This documentation was AI-generated. If you find any errors or have suggestions for improvement, please feel free to contribute! Edit on GitHub

Source fingerprint (SHA-256): 826d393831ee38e97dad3ea238877d0aeb5bf16778612c51cdc0ca4816efead2