gemini-nano-banana-2.1
Google’s efficient image generation and conversational editing model with 1K–4K output, multi-image fusion, character consistency, accurate text, and search grounding.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Must be one of: gemini-nano-banana-2.1.
gemini-nano-banana-2.1 Length must be at least 1.
1Maximum 14 items.
14One flag per reference image; omit for URLs.
14false, true Width x height ratio, for example 21x9 or 9x16.
16x9, 1x1, 1x4, 1x8, 21x9, 2x3, 3x2, 3x4, 4x1, 4x3, 4x5, 5x4, 8x1, 9x16 Resolution affects upstream token usage; billing remains per token. Defaults to 1K.
1K, 2K, 4K Must be between 1 and 1. Defaults to 1.
1 <= x <= 1Must be one of: jpeg, png.
jpeg, png Use with output_format=jpeg; PNG does not accept compression.
0 <= x <= 100Requires updated code. Use [IMAGE] or [TEXT,IMAGE]; image tasks require IMAGE.
1 - 2 elementsIMAGE, TEXT Requires updated code. Omit to retain upstream default; LOW is unsupported.
HIGH, MEDIUM, MINIMAL Optional array of video URL strings. Supports HTTPS or gs URIs, with up to 10 videos and at most one YouTube link. The MIME type is inferred from the URL path extension. For URLs without a file extension, use the legacy extends video format to specify the MIME type explicitly. Cannot be combined with legacy video fields.
10Requires updated code. HTTPS or gs URI; omitted video_mime_type defaults to video/mp4.
Requires updated code; only used with extends.video_url.
video/3gpp, video/avi, video/mp4, video/mpeg, video/mpg, video/quicktime, video/webm, video/wmv, video/x-flv Requires updated code. Each item: {url,mime_type}; at most one YouTube video. Item and URL safety validation is enforced by code.
10Response
Business response. code=0 means the task was accepted; validation failures can return HTTP 200 with code=400.