Library / Image, Video & Audio
Image, Video & Audio
Generate marketing images via webhook studio with Google Gemini
Serves a browser-based image studio from an n8n webhook, where users upload up to two reference images and Google Gemini returns a generated image on each request.
What it does
## Gemini Image Studio Serves its own HTML interface straight from a webhook: drop in up to two reference images, pick a mode, and Google Gemini returns a finished image. No bucket, no CDN, no frontend to deploy. ### How it works 1. A GET on the webhook returns a single-page studio interface, generated inside n8n from the values in Settings (UI). 2. The page downscales each upload in the browser, then POSTs the mode, the options and the images back to the same URL. 3. Validate & build prompt checks the request, decodes the images into binary and assembles the prompt for the chosen mode. Bad input gets a 400 with a readable reason. 4. One of three Gemini nodes runs depending on how many images arrived: text to image, a single-image edit, or a space + logo composite. 5. The result comes back as a data URL with its prompt and metadata, so the page can show it, download it, or feed it in again as the next reference. ### Setup steps - [ ] Attach a Google Gemini (PaLM) API credential to the three Gemini: nodes. - [ ] Set an image-capable model in Settings (generator) (gemini_model). - [ ] Adjust the title, subtitle and upload limits in Settings (UI). - [ ] Activate the workflow, then open the production webhook URL in a browser. ### Customization Six preset modes live in Validate & build prompt: reword their prompts, or add your own and mirror the key in Build studio page. Output ratios and upload limits sit in those same two nodes.
The steps
- Webhook /gemini-image-studio
- Settings (UI)
- Build studio page
- Respond with studio page
- Settings (generator)
- Validate & build prompt
- Request valid?
- Respond 400 (bad request)
- How many images?
- Gemini: text to image
- Gemini: edit 1 image
- Gemini: edit 2 images
- Merge generated image
- Pack image response
18 steps in total.
Similar automations
Code, Git & Developer ToolsBenchmark Local LLMs in LM Studio, Log to Sheets12 stepsCode, Git & Developer ToolsCompare Local LM Studio Models and Log Results25 stepsCode, Git & Developer ToolsCompare Local LLMs in LM Studio and Log Results12 stepsCode, Git & Developer ToolsCompare Local LM Studio Models and Log Results25 steps