imageslist<string>* required
List of reference images for editing. Supports both image URLs and base64-encoded images.
Base64 format: `data:image/png;base64,{base64_data}`
Supported formats: JPEG, JPG, PNG, BMP, WEBP
Max file size per image: 20MB
Nano Banana 2 supports up to 14 reference images:
- Up to 10 images of objects (high-fidelity preservation)
- Up to 4 images of characters (character consistency)
promptstring* required
Text prompt for image editing. Describe the desired change conversationally.
For adding/removing elements: "Add a wizard hat on the cat's head"
For inpainting: "Change only the blue sofa to a brown leather chesterfield"
For style transfer: "Transform this photo into Van Gogh's Starry Night style"
resolutionEnumDefault: "1K"
Output resolution preset.
**Note:** Must use uppercase K (e.g. 1K, 2K, 4K). Lowercase will be rejected.
Possible values: 1K, 2K, 4K
web_searchbooleanDefault: false
Enable Google Search grounding for image editing. When enabled, the model can use Google Search (including Web Search and Image Search) to verify facts and generate imagery based on real-time data such as current weather, stock charts, recent events, or accurate depictions of real-world subjects.
aspect_ratioEnumDefault: "1:1"
Aspect ratio of the edited image (width:height).
Possible 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