Actions15
- Audio Actions
- Document Actions
- File Search Actions
- Image Actions
- Media File Actions
- Text Actions
- Video Actions
Image → Generate an Image
AI-generatedSummary
Generate one or more images from a text prompt using a specified Gemini image generation model.
Inputs
- Model (required) — Select the image generation model to use, either from a searchable list or by entering a model ID manually.
- Prompt (required) — Provide a text description that guides the image generation, e.g., 'A photo of a cat wearing a hat'.
- Options — Additional optional parameters including the number of images to generate (1 to 4), the aspect ratio of the generated images (choices: 1:1, 16:9, 3:4, 4:3, 9:16), and a negative prompt to specify elements to exclude from the image.
Output shape
Multiple binary files containing the generated images along with JSON metadata about the model used.
Returns an array of outputs, each containing JSON with the model info and binary data for one generated image file named 'generated-image.png'. Supports generating multiple images per execution as specified in 'Number of Images' option. The operation handles different model types differently based on their names but returns images in binary format consistently.
Examples
Example 1: Generate three square images of a cat playing guitar, excluding the color red.
Model: select a Gemini image generation model from the list; Prompt: 'A cat playing guitar'; Options: Number of Images: 3; Aspect Ratio: 1:1; Negative Prompt: 'red'