Generate Image
generate_imageGenerate images from text prompts using multiple AI providers. Images are saved to disk and file paths returned.
Instructions
Generate images using multiple providers (Google Gemini, OpenAI, BFL FLUX, Reve). Images are saved to disk and the file paths are returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Response mode. image returns only the image; image_and_text also returns a description (Google models only) | image |
| model | No | Model to use. Available models depend on configured API keys | gpt-image-2 |
| prompt | Yes | Text prompt describing the image to generate | |
| thinking | No | Controls model thinking before generation (Google models only). none disables thinking; auto lets the model decide | auto |
| outputDir | No | Directory path where generated images will be saved. If NANO_BANANA_OUTPUT_DIR is set, relative paths are resolved from that base and all paths are sandboxed within it. | . |
| resolution | No | Output image resolution. Higher values may not be supported by all models | 1K |
| aspectRatio | No | Aspect ratio of the generated image | 1:1 |
| inputImages | No | File paths of images to include as input alongside the prompt (supports PNG, JPEG, WEBP, GIF). Supported by Google models, OpenAI gpt-image models (uses the images.edit endpoint) and Reve (sent as v2 references). |