Generate Product Mockups with Gemini 2.5 Flash Image via OpenRouter
## This n8n template uses AI to generate product mockups by composing a product image onto a model or template image. This workflow provides a powerful solution for creating dynamic marketing assets and e-commerce visuals. Use cases are many: Instantly create virtual try-on images for apparel, place your product into different scenes for advertisements, or generate custom marketing material without needing a physical photoshoot. ### Good to know - This workflow uses the **OpenRouter API** to access Google's Gemini model. You will need an OpenRouter account. - The model used is `google/gemini-2.5-flash-image-preview:free`. While this specific model may be free, costs can vary depending on the model you choose and your usage on OpenRouter. Always check their latest pricing. - The workflow is triggered by a form. To use it, you must activate the workflow and use its Production URL. ### How it works - A user submits a **product image**, a **template/model image**, and a **text prompt** via the n8n form trigger. - The images are then converted to **Base64 strings** so they can be used in an API request. - A multimodal payload is sent to the OpenRouter API. Gemini's image generation model is used, which takes all 3 inputs (the two images and the prompt) to understand how to compose the final image. - Gemini generates a new image based on the instructions and returns it as a Base64 string. - The workflow extracts this output string and uses a Convert to file node to convert the data back into a binary image file, ready for use. ### How to use - First, set up your **OpenRouter API credential** in n8n. - Activate the workflow. - Open the **Production URL** for the form trigger. - Upload your product image, your template image, and write a descriptive prompt. - Submit the form to execute the workflow and generate your image. ### Requirements - An active n8n instance. - An OpenRouter account and API key. ### Customizing this workflow - You can easily change the AI model by editing the JSON body in the **HTTP Request** node. OpenRouter provides access to a wide variety of models from different providers. - Add a final step to automatically save the generated image. You can connect nodes for services like **Google Drive, AWS S3, or Dropbox** after the Convert to File node. - Replace the **Form Trigger** with a **Webhook Trigger** to run this workflow programmatically from another application or service.
This n8n template uses AI to generate product mockups by composing a product image onto a model or template image.
This workflow provides a powerful solution for creating dynamic marketing assets and e-commerce visuals. Use cases are many: Instantly create virtual try-on images for apparel, place your product into different scenes for advertisements, or generate custom marketing material without needing a physical photoshoot.
Good to know
- This workflow uses the OpenRouter API to access Google's Gemini model. You will need an OpenRouter account.
- The model used is
google/gemini-2.5-flash-image-preview:free. While this specific model may be free, costs can vary depending on the model you choose and your usage on OpenRouter. Always check their latest pricing. - The workflow is triggered by a form. To use it, you must activate the workflow and use its Production URL.
How it works
- A user submits a product image, a template/model image, and a text prompt via the n8n form trigger.
- The images are then converted to Base64 strings so they can be used in an API request.
- A multimodal payload is sent to the OpenRouter API. Gemini's image generation model is used, which takes all 3 inputs (the two images and the prompt) to understand how to compose the final image.
- Gemini generates a new image based on the instructions and returns it as a Base64 string.
- The workflow extracts this output string and uses a Convert to file node to convert the data back into a binary image file, ready for use.
How to use
- First, set up your OpenRouter API credential in n8n.
- Activate the workflow.
- Open the Production URL for the form trigger.
- Upload your product image, your template image, and write a descriptive prompt.
- Submit the form to execute the workflow and generate your image.
Requirements
- An active n8n instance.
- An OpenRouter account and API key.
Customizing this workflow
- You can easily change the AI model by editing the JSON body in the HTTP Request node. OpenRouter provides access to a wide variety of models from different providers.
- Add a final step to automatically save the generated image. You can connect nodes for services like Google Drive, AWS S3, or Dropbox after the Convert to File node.
- Replace the Form Trigger with a Webhook Trigger to run this workflow programmatically from another application or service.
New buyers can create an account from the cart to unlock a controlled $10 first-purchase credit on eligible orders of $25+.
Related bundle
Content Repurposing Engine
8 hand-picked workflows for $29.00.
That is $3.63 each, vs $9.99 for this one alone.
View bundleSecure checkout powered by Stripe
Support
How to import this workflow into n8n
- 1Purchase or download the workflow to get the n8n workflow JSON file.
- 2In your n8n instance, open Workflows and choose "Import from File" (or paste the JSON with Ctrl+V on the canvas).
- 3Open each node marked with a credential warning and connect your own accounts and API keys.
- 4Run the workflow once manually to verify the data flow, then toggle it to Active.
Related AI workflows
- Launch Your First AI-Powered Chatbot with Actionable Tools$9.99
- Automate AI Video Creation and YouTube Upload with Google Sheets$14.99
- Build a WhatsApp Assistant with Memory, Google Suite, Multi-AI, Research, and Imaging$24.99
- Automate Blog Post Creation and Publishing with GPT, Leonardo AI, and WordPress$14.99
- Automate SEO Keyword Generation with ChatGPT from Google Sheets$3.99
- Email Agent$500.99
Need this deployed? We'll set it up for you.
Our automation experts deploy this workflow in your stack, connect your accounts, and verify it works — or build a custom solution from scratch.