Google Imagen
Google image generation via the Gemini Interactions API (Nano Banana models, Imagen itself is shut down), generate, multi-turn and multi-image edits, saved to a local folder (paid per image)
Beta v0.1.0 Node.js 8 actions
About
A Graphrt plugin for Google image generation through the Gemini API.
What it can do
- generate_image: prompt to image, with aspect ratio (1:1 ... 21:9, plus 1:4, 4:1, 1:8, 8:1 on Nano Banana 2.1 and 3.1 Flash) and size (512, 1K, 2K, 4K). previous_interaction_id continues an earlier interaction, so you can edit its image conversationally without uploading it again.
- edit_image: edit or combine up to 14 input images (https URLs or local files) with a prompt.
- create_interaction: low-level call with your own content blocks (text, base64 images, Files API URIs).
- get_interaction, list_models, get_model: reads (free). delete_interaction: node only.
- api_request: any other Gemini API endpoint (GET only when called by an agent)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- List models
google-imagen.list_models - Get model
google-imagen.get_model - Generate image
google-imagen.generate_image - Create interaction
google-imagen.create_interaction - Get interaction
google-imagen.get_interaction - Delete interaction
google-imagen.delete_interaction - Gemini API request
google-imagen.api_request - Edit image
google-imagen.edit_image
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
GEMINI_API_KEYRequiredAPI key from <https://aistudio.google.com/apikey> (sent as x-goog-api-key) -
GOOGLE_IMAGEN_OUTPUT_DIRFor filesAbsolute directory where generated images are saved, each base64 image in the result is replaced by "[saved to <path>]". Unset: nothing is saved and the result keeps the base64 (large) -
GOOGLE_IMAGEN_UPLOAD_DIRFor local inputsAbsolute directory that edit_image may read local images from. Unset: only https URLs are accepted
How to use it
In Graphrt Desktop
- Open Plugins and search for Google Imagen.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install google-imagen workflow.yaml
- id: poster
type: google-imagen.generate_image
prompt: "A vintage travel poster of Bandung with bold lettering"
aspect_ratio: "3:4"
image_size: 2K
- id: night
type: google-imagen.generate_image
prompt: "Same poster, but at night with city lights"
previous_interaction_id: "{{#poster.data.result.id#}}"
- id: combined
type: google-imagen.edit_image
prompt: "Put the product from the second image on the table in the first"
images: ["https://example.com/table.jpg", "https://example.com/product.png"]