Nano Banana Pro
Text-to-Image • Google • ProxiedGoogle's higher-quality image generation model with improved detail and prompt adherence.
| Model Info | |
|---|---|
| Terms and License | link ↗ |
| More information | link ↗ |
| Pricing | View pricing in the Cloudflare dashboard ↗ |
Usage
const response = await env.AI.run( 'google/nano-banana-pro', { prompt: 'A sleek modern wireless headphone on a minimalist white marble surface with soft studio lighting and subtle shadows', aspect_ratio: '1:1', output_format: 'png', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana-pro/product-photography.png" }, "gatewayMetadata": { "keySource": "Unified" }}Examples
Fantasy Illustration — Epic fantasy scene
const response = await env.AI.run( 'google/nano-banana-pro', { prompt: 'An epic fantasy illustration of a wizard casting a spell in an ancient library, magical runes floating in the air, dust motes catching golden light streaming through stained glass windows', aspect_ratio: '16:9', image_size: '2K', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana-pro/fantasy-illustration.png" }, "gatewayMetadata": { "keySource": "Unified" }}Architectural Visualization — Modern architecture render
const response = await env.AI.run( 'google/nano-banana-pro', { prompt: 'A photorealistic architectural visualization of a modern glass house perched on a cliff overlooking the ocean at sunset', aspect_ratio: '16:9', output_format: 'jpg', image_size: '4K', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana-pro/architectural-visualization.jpg" }, "gatewayMetadata": { "keySource": "Unified" }}Character Design — Game character concept art
const response = await env.AI.run( 'google/nano-banana-pro', { prompt: 'A detailed character design sheet for a steampunk inventor, showing front view, side view, and detail callouts for mechanical arm and goggles', aspect_ratio: '3:2', }, { gateway: { id: 'default' }, })console.log(response)
{ "state": "Completed", "result": { "image": "https://pub-04a6d208d361438ea01b797e6973bd19.r2.dev/catalog/google__nano-banana-pro/character-design.png" }, "gatewayMetadata": { "keySource": "Unified" }}Parameters
stringrequiredarraymaxItems: 3stringenum: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9stringenum: jpg, png, webpstringenum: 1K, 2K, 4Kstringformat: uri