Nano Banana 2 combines the high-speed capabilities of Gemini Flash with Pro-level world knowledge, reasoning, and visual quality, achieving fast editing and high-fidelity generation. It supports real-time knowledge enhancement, precise text rendering and translation, theme consistency for up to five roles and fourteen objects, accurate execution of complex instructions, and multi-resolution output from 512px to 4K, delivering clearer details and photorealistic visual performance.
Generate image
All API requests must be authenticated using a Bearer token in the Authorization header. Please ensure your API key is active.Authorization: Bearer sk-xxxxxx
These parameters come from the selected model form_schema. Switching models updates this list and the request example.
Choose the generation mode. Text to Image: generate from the prompt only. Image to Image: upload reference images and edit, restyle, or blend them per the prompt.
prompt*stringText description of the image. Nano Banana 2 (Gemini 3.1 Flash Image) generates or edits images from the prompt, with strong text rendering and multi-image blending.
size?stringAspect ratio of the output image. Default 1:1.
quality?stringOutput resolution, default 1K. 512 is the fastest, lowest resolution; 4K is the highest.
thinking_level?stringReasoning effort during generation. MINIMAL has the lowest latency; HIGH spends more reasoning to improve quality on complex scenes. Default MINIMAL.
gweb_search?booleanWhen enabled, the model can ground generation in real-time web search for up-to-date information.
created?integerParameter description for Created
data?arrayParameter description for Data