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 The five additional ratios require the updated Vertex provider.
16:9, 16x9, 1:1, 1:4, 1:8, 1x1, 1x4, 1x8, 21:9, 21x9, 2:3, 2x3, 3:2, 3:4, 3x2, 3x4, 4:1, 4:3, 4:5, 4x1, 4x3, 4x5, 5:4, 5x4, 8:1, 8x1, 9:16, 9:21, 9x16, 9x21 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 可选视频 URL 字符串数组;HTTPS/gs URI,最多 10 个,最多一个 YouTube 链接。按 URL 路径后缀推断 MIME;无后缀链接请使用旧 extends 视频格式显式指定 MIME。不可与旧视频字段混用。.
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.