generate_image
Generate images from text prompts, edit existing images using natural language, and compose multiple images with flexible aspect ratios. All outputs include SynthID watermarking.
Instructions
Generate or edit images using Gemini 2.5 Flash Image (Nano Banana). Supports text-to-image generation, image editing with natural language prompts, and multi-image composition. All generated images include a SynthID watermark.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
aspect_ratio | No | Output aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | 1:1 |
image_only | No | If true, requests image-only output without text response | |
input_images | No | Optional array of file paths to input images for editing or composition | |
output_path | Yes | Path where the generated image will be saved (must end in .png) | output.png |
prompt | Yes | Text prompt describing the image to generate or edits to make |
Input Schema (JSON Schema)
{
"properties": {
"aspect_ratio": {
"default": "1:1",
"description": "Output aspect ratio. Options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9",
"enum": [
"1:1",
"2:3",
"3:2",
"3:4",
"4:3",
"4:5",
"5:4",
"9:16",
"16:9",
"21:9"
],
"type": "string"
},
"image_only": {
"default": false,
"description": "If true, requests image-only output without text response",
"type": "boolean"
},
"input_images": {
"description": "Optional array of file paths to input images for editing or composition",
"items": {
"type": "string"
},
"type": "array"
},
"output_path": {
"default": "output.png",
"description": "Path where the generated image will be saved (must end in .png)",
"type": "string"
},
"prompt": {
"description": "Text prompt describing the image to generate or edits to make",
"type": "string"
}
},
"required": [
"prompt",
"output_path"
],
"type": "object"
}