Nano Banana 2 (Gemini 3.1 Flash Image) Is Now Available in Puter.js!
On this page
Nano Banana 2 is now supported in Puter.js! Add Google's latest state-of-the-art image generation model to your website and scale to unlimited users for free with User-Pays model!
What is Nano Banana 2
Nano Banana 2, also known as Gemini 3.1 Flash Image, is Google DeepMind's latest image generation and editing model that combines Pro-level intelligence with Flash-speed performance. It achieves the highest Elo scores in text-to-image generation while maintaining low latency of 15-20 seconds per image.
Key capabilities include:
- Pro-level quality at Flash speed: Studio-quality output with 74-76% latency reduction versus previous versions
- Precise text rendering: Sharp, legible text in multiple languages for posters, ads, and infographics
- Up to 4K resolution: Image upscaling to 2K and 4K while preserving sharpness and vibrancy
- Subject consistency: Track up to 5 characters and 14 objects across workflows
- Real-world knowledge: Leverages Gemini's knowledge base and web search for accurate, grounded results
- Image editing: Masked editing, multi-input image blending, and stylization
Examples
Text-rich poster generation
Nano Banana 2 excels at rendering sharp, legible text in generated images:
puter.ai.txt2img("A vintage movie poster for 'The Last Voyage', featuring bold art deco typography with the tagline 'An Adventure Beyond Time' and 'Coming Soon 2026' at the bottom", {
model: "gemini-3.1-flash-image-preview"
})
.then(imageElement => {
document.body.appendChild(imageElement);
});
Localized product advertisement
Generate images with translated and localized text:
puter.ai.txt2img("Create a poster ad for a sparkling water called 'Aura Fizz'. The setting is a Japanese street at dusk with neon lights. The tagline should be 'Taste the Aura' translated accurately and authentically to Japanese. The can design should be minimalist. Make the aspect ratio 16:9.", {
model: "gemini-3.1-flash-image-preview"
})
.then(imageElement => {
document.body.appendChild(imageElement);
});
Infographic from a text prompt
puter.ai.txt2img("Create an infographic showing the lifecycle of a butterfly with labeled stages", {
model: "gemini-3.1-flash-image-preview"
})
.then(imageElement => {
document.body.appendChild(imageElement);
});
Get Started Now
Just add one library to your project:
// npm install @heyputer/puter.js
import { puter } from '@heyputer/puter.js';
Or add one script tag to your HTML:
<script src="https://js.puter.com/v2/"></script>
No Google API keys and no infrastructure setup. Start building with Nano Banana 2 immediately.
Learn more:
Free, Serverless AI and Cloud
Start creating powerful web applications with Puter.js in seconds!
Get Started Now