API
Nano Banana 2
imageNano Banana 2 API combines real-time world knowledge with advanced reasoning to deliver stronger prompt understanding and more accurate visual results. Generate consistent multi-subject images in native 4K, support flexible aspect ratios, and create polished global typography across complex compositions. Integrate Nano Banana 2 API to build smarter, high-quality image workflows at scale.
Body
application/jsonmodelstringrequirednano-banana-2input.promptstringrequiredDescribe the image to create, or the changes to make to your reference images. Whitespace is trimmed.
Maximum length: 5,000 characters
input.imagesstring[]optionalOptional reference images. Use publicly accessible HTTPS URLs or data:image/* base64 URIs. Omit for text-to-image.
Maximum items: 14
input.aspect_ratiostringoptionalOutput width-to-height ratio. Auto lets the model choose.
Default: auto
input.resolutionstringoptionalOutput resolution tier; values are case-insensitive. Omit or leave empty to use the default.
Default: 2k
Response
Successful response
task_idstringrequiredstatusstringrequired