Automated AI Product Photography Studio – Constructed with n8n

This web page was created programmatically, to learn the article in its unique location you’ll be able to go to the hyperlink bellow:
https://community.n8n.io/t/automated-ai-product-photography-studio/300145
and if you wish to take away this text from our website please contact us


I constructed this for a small candle model that had no time for product shoots, and it turned out basic sufficient to share. You add a plain product photograph, decide a glance, sort one line in regards to the scene, and it returns a styled studio-quality shot. Even although for this, I’ve an online entrance finish and picture server on the again finish, the template linked under runs from a single n8n Form, so there’s no entrance finish or server to host.

The type (4 fields):

– Pick a Photo (file add)

– Photo Type: Flatlay, Hero Image, Ecommerce, Banner

– Aspect Ratio: 1:1, 9:16, 16:9, 4:5, 5:4, 21:9

– Describe the Scene (free textual content)

The move:

`Form Trigger` → `Code` (file to base64) → `HTTP` add to KIE.AI → `Set` (map fields) → `AI Agent` + `OpenAI Chat Model` (immediate enhancement) → `Set` (clear up) → `HTTP` create job → `Wait` → `HTTP` ballot → `Code` (test state) → `IF` success/fail → `Form` completion display screen with the picture.

It makes use of Google’s nano-banana-2 (image-to-image) by KIE.AI. The mannequin retains the product precisely as-is and solely re-renders the scene round it.

Just a few issues which may assist in case you construct one thing related:

1. Getting a type file into an image-to-image mannequin. nano-banana-2 needs a picture URL, however a Form Trigger provides you a binary. A Code node turns the add right into a base64 knowledge URL, then KIE.AI’s base64 add endpoint (`/api/file-base64-upload`) fingers again a brief public URL you’ll be able to feed straight into the mannequin. No S3 or picture host required.

2. A prompt-enhancement agent, not uncooked person textual content. The person varieties one thing like “springtime, light and airy, add lemon and grapefruit.” A small agent (gpt-4.1-mini) expands that right into a dense pictures immediate: floor and background materials, lighting setup, digicam angle, temper. The system immediate’s one exhausting rule is “describe the target scene, never the product itself,” which retains the model’s precise product intact.

3. Async technology behind a type. Image jobs take a bit, so it’s a easy ballot loop: `Create Task` → `Wait 5s` → `Poll` → `Code` checks `state` → `IF` routes to success, failure, or again to the wait. The Form completion node then exhibits the completed picture on the identical type the person submitted.

Setup: two credentials, a KIE.AI HTTP Bearer key (on the three KIE.AI HTTP nodes) and an OpenAI key (on the chat mannequin). Activate, open the shape URL, accomplished.

Two issues I’d love enter on:

– KIE.AI outcome URLs are non permanent. For a totally self-contained template I left persistence out, however curious how others deal with “save the output somewhere permanent” cleanly inside one workflow.

– Any slicker sample than the Wait/IF ballot loop for long-running async API jobs in n8n? I maintain reaching for this form and marvel what others do.

Happy to reply questions on any of the nodes.

YouTube walkthrough HERE

Grab the template HERE


This web page was created programmatically, to learn the article in its unique location you’ll be able to go to the hyperlink bellow:
https://community.n8n.io/t/automated-ai-product-photography-studio/300145
and if you wish to take away this text from our website please contact us