Reference · Tools

Gemini Image Generation

Generate images using Gemini native image generation.

Action (binary) AI v1 Binary data

Gemini Image Generation produces images inside a normal Gemini call, using multimodal response modalities so a single request can return both explanatory text and the picture itself. The image arrives as decoded binary in the binary store, ready for the next node. Use it when the text and the visual belong together — generating a product blurb and its hero image in one step.

Node type
Action (binary)
Parameters
5
Outputs
Output, Error
Credentials
Google AI

Gemini Image Generation

Generate images using Gemini native image generation

Overview

Gemini Image Generation calls the Gemini generateContent API with an image response modality, so the picture is produced natively inside a Gemini model rather than by a separate image service. The model returns inline image data, which is decoded and written to a binary property on the output item; any text the model returns alongside it is collected into a response field. Authentication is via a Google AI API key.

Category: AI
Tool Name: gemini_image_gen
Version: 1

Appearance: Icon: gemini | Color: #ffffff

Node Type

Action (Binary) — handles file/binary data operations

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Google AI credentials. See the Credentials Guide for setup instructions.

Parameters

ParameterTypeRequiredDefaultDescription
ModeloptionsNoThe Gemini image model — the Nano Banana family, which accepts the same generateContent + responseModalities request shape. The dropdown lists the models currently available for this node; leave it unset to use the default.
PromptstringYesA text description of the desired image. Gemini will generate an image (and optionally text) based on this prompt. Supports expressions like {{ $json.description }}.
OptionscollectionNo{}Optional output settings.
— Output Binary PropertystringNodataName of the binary property to write the output image to. Names are case-sensitive — see the upstream node’s Binary Data panel for the exact names to use.
— Response Field NamestringNoresponseJSON field name where the text response from the model will be stored.
Include InputbooleanNofalseWhether to include the original input item fields in the output alongside the generated image.
Max ConcurrencynumberNo5Maximum number of items to process concurrently. Keep low to respect Google AI rate limits.

Output Data

One output item per input item. The generated image is written to the binary property named by Output Binary Property (default data); if the model returns more than one image, the extras are written alongside it under the same name with an index suffix — data_1, data_2, and so on. Binary data arriving from upstream is preserved.

The output item’s JSON contains only the fields below. The input item’s JSON is merged in only when Include Input is on:

FieldDescription
responseAny text the model returned alongside the image. Renamed by Response Field Name.
modelThe model that produced the image.
imageCountHow many images were returned — 0 when the model produced none.
finishReasonWhy generation stopped, when the model reports one.
promptFeedbackPrompt-level feedback (for example a block reason), when the model reports it.
usageToken usage metadata, when the model reports it.
partTypesPresent only when no image came back — the shapes the model returned instead, which explains an empty result.

Reference the result downstream by expression, e.g. {{ $json.imageCount }}, and the image itself through the binary property name you configured.

Usage Examples

  • Generate an image from a text prompt using Gemini
  • Create an image with accompanying text description
  • Draw a watercolor painting from a description
  • Generate AI artwork using Gemini multimodal capabilities

Example Configuration

Generate a single image with the defaults:

{
  "type": "gemini_image_gen",
  "parameters": {
    "prompt": "A photorealistic golden retriever puppy playing in autumn leaves"
  }
}

Build the prompt from an upstream field and keep the source data on the item:

{
  "type": "gemini_image_gen",
  "parameters": {
    "prompt": "{{ $json.description }}",
    "includeInput": true,
    "maxConcurrency": 3,
    "options": {
      "binaryPropertyName": "generatedImage",
      "responseFieldName": "modelResponse"
    }
  }
}

Batch thumbnails one at a time to stay inside rate limits:

{
  "type": "gemini_image_gen",
  "parameters": {
    "prompt": "{{ $json.thumbnailPrompt }}",
    "includeInput": true,
    "maxConcurrency": 1,
    "options": {
      "binaryPropertyName": "thumbnail",
      "responseFieldName": "caption"
    }
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Gemini Image Generation calls the Gemini generateContent API with multimodal response modalities to produce images natively within Gemini models. Use this tool when you need AI-generated visuals alongside explanatory text in a single model call, authenticated via a Google AI API key. It outputs a response field containing collected text parts and decoded inline image data (base64-encoded PNG or JPEG) stored in the binary store, with errors routed to a dedicated error output.

Frequently asked questions

How does this differ from the Google Imagen node?

This generates images natively within a Gemini model call, so you can get text and imagery from one request. Google Imagen uses purpose-built image models through the predict API, with controls like sample count and aspect ratio that this node does not expose.

What form does the image arrive in?

Inline base64 data from the API is decoded and written to the binary store as PNG or JPEG, then referenced on the output item. Downstream nodes read it as binary — you do not handle base64 yourself.

Do I get the model's text as well as the image?

Yes. Text parts from the response are collected into a response field on the same item, so an explanation or caption travels with the image it describes.

Which credential does it need?

A Google AI credential. The node calls the Gemini generateContent API, so the key must have access to an image-capable Gemini model.

Build with the Gemini Image Generation node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Google AI credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.