Перейти к содержанию
НОВОЕПознакомьтесь с Alaaddin — вашим ИИ-джинном с голосом. trig8n запускается 1 января 2027. Что нового

Библиотека / Изображения, видео и аудио

Изображения, видео и аудио

Генерация маркетинговых изображений через веб-студию на вебхуке с Google Gemini

Раздает браузерную студию изображений через вебхук n8n: пользователи загружают до двух референсных изображений, а Google Gemini возвращает сгенерированное изображение на каждый запрос.

Что делает

## 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.

Шаги

  1. Webhook /gemini-image-studio
  2. Settings (UI)
  3. Build studio page
  4. Respond with studio page
  5. Settings (generator)
  6. Validate & build prompt
  7. Request valid?
  8. Respond 400 (bad request)
  9. How many images?
  10. Gemini: text to image
  11. Gemini: edit 1 image
  12. Gemini: edit 2 images
  13. Merge generated image
  14. Pack image response

Всего шагов: 18.

Похожие автоматизации