Overview
This node generates images using OpenAI’s GPT Image API. It supports multiple models, allows you to provide input images for editing, and can use a mask to specify which parts of an image to modify.Inputs
| Parameter | Description | Data Type | Required | Range |
|---|---|---|---|---|
prompt | Text prompt for GPT Image (default: ""). | STRING | Yes | N/A |
model | The OpenAI GPT Image model to use. Selecting a model reveals additional parameters specific to that model. | COMBO | Yes | "gpt-image-2""gpt-image-1.5""gpt-image-1" |
model.size | Image size. Select ‘Custom’ to use the custom width and height (default: “auto”). Only available for gpt-image-2. | COMBO | Yes | "auto""1024x1024""1024x1536""1536x1024""2048x2048""2048x1152""1152x2048""3840x2160""2160x3840""Custom" |
model.custom_width | Used only when size is ‘Custom’. Must be a multiple of 16 (default: 1024). Only available for gpt-image-2. | INT | No | 1024 to 3840 |
model.custom_height | Used only when size is ‘Custom’. Must be a multiple of 16 (default: 1024). Only available for gpt-image-2. | INT | No | 1024 to 3840 |
model.background | Return image with or without background (default: “auto”). Only available for gpt-image-2. | COMBO | Yes | "auto""opaque" |
model.quality | The quality of the generated image. Only available for gpt-image-2. | COMBO | Yes | "standard""hd" |
model.images | Input images for editing. Only available for gpt-image-2. | IMAGE | No | N/A |
model.mask | A mask to specify which parts of the input image to edit. Only available for gpt-image-2. | MASK | No | N/A |
n | How many images to generate (default: 1). | INT | Yes | 1 to 8 |
seed | Seed for reproducibility (default: 0). Note: not implemented yet in backend. | INT | Yes | 0 to 2147483647 |
- When using
gpt-image-2with amodel.sizeof “Custom”, thecustom_widthandcustom_heightmust be multiples of 16, the maximum edge must be<= 3840, the aspect ratio must not exceed 3:1, and the total pixel count must be between 655,360 and 8,294,400. - If a
maskis provided, an input image (model.images) is required. A mask cannot be used without an input image. - A mask cannot be used with multiple input images.
- When a mask is provided, the mask dimensions must match the input image dimensions.
- The
seedparameter is currently not functional.
Outputs
| Output Name | Description | Data Type |
|---|---|---|
image | The generated image or images. | 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):
dcea500ebbbbfe87f8b0dd2d714cf2356edf2030312c2cc6e41d64bd2ad04ea6