n8n

How to Generate FLUX Fill Marketing Images?

Turn a simple web link into an in browser image editor that produces AI fill results fast. Great for marketing and design teams that need quick image touchups, background fixes, and creative variants.

A webhook serves an editor page built with HTML that lets users load an image, paint a mask, and write a short prompt. When the user submits, the flow sends the original image, the alpha mask, and the prompt to the Black Forest Labs FLUX Fill API. The system waits a few seconds, checks the job status, and keeps polling until the result is ready. It then fetches the final image and returns it to the browser with the correct file type. A separate response returns the editor page itself so people can work inside the browser.

You will need an API key for the FLUX service and a credential in n8n Cloud using header auth. Expect edits that used to take an hour to drop to a few minutes per image. Ideal for ad variants, product photo cleanup, and social content where masks and fills are common. Follow the steps to map your image URLs, confirm the webhook runs, and tune the wait time for stable results.

What are the key features?

  • Browser editor served by a webhook with an HTML page for drawing masks and writing prompts.
  • Sample image list is provided by a set node and can be replaced with your own image URLs.
  • HTTP request sends original image, alpha mask, prompt, and settings to the FLUX Fill API.
  • Wait and status check loop polls the job until the result is ready, then stops.
  • Result image is downloaded from the returned URL and sent back as binary with the right content type.
  • Two response paths return both the editor page and the final edited image to the user.
  • Merge node combines inputs so the editor and image data stay in sync.
  • Optional no op step reserved for custom logic like logging or security checks.

What are the benefits?

  • Reduce manual edits from 60 minutes to about 5 minutes per image
  • Automate up to 80 percent of repetitive masking and fill work
  • Connect your browser editor to FLUX AI without extra apps
  • Return results in the right format to speed publishing
  • Support multiple users through a single web link

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Black Forest Labs FLUX API. See the Tools Required section above for links to create accounts with these services.
  3. Create an API key in the Black Forest Labs account portal. Keep it safe because it will be used for header auth.
  4. In n8n Cloud, open the FLUX Fill and Check FLUX status nodes. In the Credential to connect with dropdown, click Create new credential, then follow the on screen instructions to add your HTTP header auth using your API key.
  5. Open the Webhook node and copy the test URL. Leave the method and path as set by the template.
  6. Open the Editor page HTML node and confirm the editor code loads the canvas tools and the image comparison slider from public URLs. Adjust titles or styles if needed.
  7. Open the Mockups set node and replace the sample image entries with your own image URLs or leave them as defaults for testing.
  8. Activate the workflow for testing and open the webhook test URL in your browser. You should see the editor page load.
  9. Draw a mask on the image, enter a prompt, and submit. Watch the execution in n8n to verify the FLUX Fill request, the wait step, and the status check are running.
  10. If the result does not appear, increase the wait time or check the status condition in the Is Ready node. A 401 or 403 error means the API key or header is not correct.
  11. When the image returns correctly, confirm the Show the image to user node sets the Content Type header from the binary mime type so the browser displays it.
  12. Switch the webhook to production URL, secure the path, and consider adding validation or rate limits before sharing the link with your team.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Black Forest Labs FLUX API

Sign up

FLUX.1 Fill [pro]: $0.05 per image (API endpoint /v1/flux-pro-1.0-fill)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.