recraft_generate_background
Fill masked background areas within an image's existing canvas. Use a white mask to specify the region to replace, and black to preserve original content, generating new background from your prompt.
Instructions
Fill masked background areas within an image's existing canvas (same size in, same size out). White mask = fill area, black = preserve. For expanding the canvas beyond the original image bounds, use recraft_outpaint instead. V3/V3 Vector only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | No | Number of images to generate (1-6) | |
| model | No | Model (V3 only) | recraftv3 |
| style | No | Style name | |
| prompt | Yes | Description of background to generate | |
| controls | No | Generation controls | |
| style_id | No | Custom style UUID | |
| file_path | Yes | Local path to source image | |
| mask_path | Yes | Local path to mask (white=fill, black=preserve) | |
| text_layout | No | Text placement on image | |
| negative_prompt | No | What to exclude | |
| response_format | No | Response format | url |