generate_image
Generate original images from text prompts with Google Gemini AI and optional reference images for style guidance. Use it to create new visuals; modify existing assets with the edit tool.
Instructions
Create a new image using Google Gemini AI from a text description, optionally providing reference images to guide the result. Use the edit_image tool when you need to modify an existing asset.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"description": "<description>"
},
"name": "generate_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Gemini model ID. Options include gemini-3-pro-image-preview (complex/high-fidelity) and gemini-3.1-flash-image-preview (fast/cost-efficient). Default: gemini-3-pro-image-preview. | |
| style | No | Additional style for the image (optional). Examples: "minimalist", "colorful", "professional", "artistic" | |
| images | No | Optional array of image file paths to use as visual context (absolute or relative). | |
| imageSize | No | Output image size (longest dimension). 512 is Flash models only. Must be uppercase K (1K, 2K, 4K). | 1K |
| outputPath | No | Path where to save the image (optional). If not specified, saves in current directory. Can be a folder or complete path with filename. | |
| aspectRatio | No | Output aspect ratio. Valid values: 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9. | 1:1 |
| description | Yes | Detailed description of the image to generate. For better social media results, include details about colors, style and composition. | |
| watermarkPath | No | Path to watermark image file to overlay in a corner (optional) | |
| watermarkPosition | No | Optional watermark position when using `watermarkPath`. | bottom-right |