Skip to main content
This node modifies specific areas of an image based on a text prompt and a mask. It uses the Recraft API to intelligently edit only the masked regions while keeping the rest of the image unchanged.

Inputs

ParameterDescriptionData TypeRequiredRange
imageThe input image to be modifiedIMAGEYes-
maskThe mask defining which areas of the image should be modifiedMASKYes-
promptPrompt for the image generation (default: empty string, maximum length: 1000 characters)STRINGYes-
nThe number of images to generate (default: 1, minimum: 1, maximum: 6)INTYes1-6
seedSeed to determine if node should re-run; actual results are nondeterministic regardless of seed (default: 0)INTYes0-18446744073709551615
recraft_styleOptional style parameter for the Recraft API. If not provided, defaults to “realistic_image” styleSTYLEV3No-
negative_promptAn optional text description of undesired elements on an image (default: empty string)STRINGNo-
Note: The image and mask must be provided together for the inpainting operation to work. The mask will be automatically resized to match the image dimensions. The prompt is validated and has a maximum length of 1000 characters. If a style_id from the Infinite Style Library is used, ensure it is not a Vector art style, as this may cause the API to return SVG data instead of an image.

Outputs

Output NameDescriptionData Type
imageThe modified image(s) generated based on the prompt and mask. Returns one image per input image multiplied by the n parameterIMAGE
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): c0871ae6510d42f5525701dd622f2f84a65103a7eec053635c4bd64102a2a4e6