Gemini Image Generator
Gemini Image Generator creates images from a written description, using Google Gemini’s image models. With some models you can also give it reference images, such as a product photo, so the new image starts from them. The component returns the images as files so the flow can send, save or publish them.
It can also be an agent tool, which creates images when a user asks for them in the conversation.
When to use it
- Create images for campaigns or social media from a description.
- Prepare several proposals of the same idea in a single run, with Number of Images.
- Start from a product photo to create a lifestyle picture or an ad.
- Generate one image for each item of a list, with Batch Mode.
- Give an assistant the ability to create images when the user asks for them in the chat.
Configuration
| Field | What it does |
|---|---|
| Credential (required) | The credential of the Google Gemini service. Pick one with Choose an option or create one with Add new credential. More in Credentials. |
| Image Model | The image model used. The list fills in when you choose the credential, with the image models available to your account. |
| Aspect Ratio | Image format: 1:1 (square), 3:4, 4:3, 9:16 (portrait) or 16:9 (landscape). Default: 1:1. |
| Number of Images | How many images to create on each run, up to 4. Default: 1. Some models create a single image even if you ask for more. |
| Prompt | The description of the image you want, up to 4000 characters. |
| Image Files | Connection point for reference images, as image files. Only the models that accept starting images use them. |
Batch processing
With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.
Using it as an agent tool
You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.
As a tool, the agent writes the description and can choose the format and the number of images.
Output
- Image: the images created, as files. Connect them to components that receive files, for example the attachments of Gmail Message or Email, the file upload of Drive File Manager, or Image Understanding.
- Tool: the component as a tool, to connect it to an agent’s Tools input. When the agent uses it, the images are saved with the conversation’s files and the agent receives their names and the links to view them.
Example
The flower shop Jardín de Olmos wants three image proposals for its Mother’s Day campaign:
- Add Gemini Image Generator and choose the Google Gemini credential.
- Choose a model in Image Model,
4:3in Aspect Ratio and 3 in Number of Images. - In Prompt, write: “A bouquet of pink and white peonies in a ceramic vase, on a table by a window, soft spring light”.
- Connect Image to the file upload of Drive File Manager to save the proposals in the campaign folder.
Good practices
- Describe the object, the setting, the light and the style in concrete sentences.
- If you use reference images, explain in Prompt what should be kept and what should change.
- Try a single image before turning on Batch Mode with a long list: each image uses your Google Gemini account.