# Nano Banana 2 > Gemini 3.1 Flash with image generation capabilities. High-efficiency image generation model with support for text rendering, reference images, search grounding, and thinking mode. The efficient counterpart to Gemini 3 Pro Image. ## Quick Reference - Model ID: gemini-3.1-flash-image-preview - Creator: Google - Status: active - Family: gemini-3.1-flash - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Context Window: 1048576 tokens - Max Input Images: 14 - Max Output Tokens: 65536 - Input Modalities: text, image, audio, video, file - Output Modalities: text, image - Capabilities: function_calling, structured_output, batch, streaming, system_prompt, tool_use, grounding, thinking, code_execution, json_mode ## Model Identifiers - Primary Slug: gemini-3.1-flash-image-preview - Aliases: gemini-3.1-flash-image - Alternative Names: Nano Banana 2 ## Dates - Released: February 2026 ## Tags multimodal, image-generation, fast ## Available Providers ### Gemini API - Config Key: gemini/gemini-3.1-flash-image-preview - Provider Model ID: gemini-3.1-flash-image-preview - Regions: global - Pricing: - notes: ["$0.045 per output image at 512px (0.5K) (747 tokens)", "$0.067 per output image at 1024x1024px (1K) (1120 tokens)", "$0.101 per output image at 2048x2048px (2K) (1680 tokens)", "$0.151 per output image at 4096x4096px (4K) (2520 tokens)"] - source: official - currency: USD - components: [{"type" => "input", "metric" => "token", "unit_size" => 1000000, "unit_price" => 0.25}, {"type" => "output", "metric" => "token_text", "unit_size" => 1000000, "unit_price" => 1.5}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "0.5K"}, "unit_price" => 0.045}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "1K"}, "unit_price" => 0.067}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "2K"}, "unit_price" => 0.101}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "4K"}, "unit_price" => 0.151}, {"type" => "input", "metric" => "token", "unit_size" => 1000000, "conditions" => {"batch" => true}, "unit_price" => 0.125}, {"type" => "output", "metric" => "token_text", "unit_size" => 1000000, "conditions" => {"batch" => true}, "unit_price" => 0.75}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "0.5K"}, "unit_price" => 0.0225}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "1K"}, "unit_price" => 0.034}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "2K"}, "unit_price" => 0.05}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "4K"}, "unit_price" => 0.076}] - source_url: https://ai.google.dev/gemini-api/docs/pricing#gemini-3.1-flash-image-preview - effective_at: 2026-02-26 ### fal.ai - Config Key: fal/gemini-3.1-flash-image-preview - Provider Model ID: fal-ai/nano-banana-2 - Pricing: - notes: ["$0.08 per image at 1K (standard rate)", "0.5K outputs charged at 0.75x ($0.06)", "2K outputs charged at 1.5x ($0.12)", "4K outputs charged at 2x ($0.16)", "Web search adds $0.015 per request"] - source: official - currency: USD - components: [{"type" => "output", "metric" => "image", "conditions" => {"resolution" => "0.5K"}, "unit_price" => 0.06}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "1K"}, "unit_price" => 0.08}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "2K"}, "unit_price" => 0.12}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "4K"}, "unit_price" => 0.16}] - source_url: https://fal.ai/models/fal-ai/nano-banana-2 - effective_at: 2026-02-26 ### Vertex AI - Config Key: vertex/gemini-3.1-flash-image-preview - Provider Model ID: gemini-3.1-flash-image-preview - Regions: global - Pricing: - notes: ["$0.045 per output image at 512px (0.5K) (747 tokens)", "$0.067 per output image at 1024x1024px (1K) (1120 tokens)", "$0.101 per output image at 2048x2048px (2K) (1680 tokens)", "$0.151 per output image at 4096x4096px (4K) (2520 tokens)"] - source: official - currency: USD - components: [{"type" => "input", "metric" => "token", "unit_size" => 1000000, "unit_price" => 0.25}, {"type" => "output", "metric" => "token_text", "unit_size" => 1000000, "unit_price" => 1.5}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "0.5K"}, "unit_price" => 0.045}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "1K"}, "unit_price" => 0.067}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "2K"}, "unit_price" => 0.101}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "4K"}, "unit_price" => 0.151}, {"type" => "input", "metric" => "token", "unit_size" => 1000000, "conditions" => {"batch" => true}, "unit_price" => 0.125}, {"type" => "output", "metric" => "token_text", "unit_size" => 1000000, "conditions" => {"batch" => true}, "unit_price" => 0.75}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "0.5K"}, "unit_price" => 0.0225}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "1K"}, "unit_price" => 0.0335}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "2K"}, "unit_price" => 0.0505}, {"type" => "output", "metric" => "image", "conditions" => {"batch" => true, "resolution" => "4K"}, "unit_price" => 0.0755}] - source_url: https://cloud.google.com/vertex-ai/generative-ai/pricing - effective_at: 2026-02-26 ### Replicate - Config Key: replicate/gemini-3.1-flash-image-preview - Provider Model ID: google/nano-banana-2 - Pricing: - notes: ["$0.067 per output image at 1K", "$0.101 per output image at 2K", "$0.151 per output image at 4K"] - source: official - currency: USD - components: [{"type" => "output", "metric" => "image", "conditions" => {"resolution" => "1K"}, "unit_price" => 0.067}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "2K"}, "unit_price" => 0.101}, {"type" => "output", "metric" => "image", "conditions" => {"resolution" => "4K"}, "unit_price" => 0.151}] - source_url: https://replicate.com/google/nano-banana-2 - effective_at: 2026-02-26 ## Performance Metrics Provider performance over the last 30 days. ### gemini - Median Generation Time (p50): 13298ms - 95th Percentile Generation Time (p95): 24656ms - Average Generation Time: 14840ms - Success Rate: 91.6% - Total Requests: 238 - Time to First Byte (p50): 13167ms - Time to First Byte (p95): 24410ms ### vertex - Median Generation Time (p50): 29915ms - 95th Percentile Generation Time (p95): 59391ms - Average Generation Time: 35186ms - Success Rate: 76.7% - Total Requests: 30 - Time to First Byte (p50): 29412ms - Time to First Byte (p95): 59209ms ## Arena Benchmarks ### Studio Ghibli Anime Style - Elo: 1245 - Record: 7W / 3L / 1T (11 battles) - Rank: #1 of 13 ### Man and Car in California - Elo: 1244 - Record: 17W / 20L / 3T (40 battles) - Rank: #7 of 13 ### Modern Clean Menu - Elo: 1239 - Record: 14W / 0L / 0T (14 battles) - Rank: #4 of 19 ### Adorable Baby Animals in Sunny Meadow - Elo: 1213 - Record: 8W / 1L / 1T (10 battles) - Rank: #3 of 23 ### Vintage Cafe Logo - Elo: 1210 - Record: 10W / 0L / 0T (10 battles) - Rank: #3 of 19 ### Over-the-top cartoon caricature - Elo: 1194 - Record: 10W / 4L / 0T (14 battles) - Rank: #5 of 13 ### Geometric Composition - Elo: 1193 - Record: 7W / 1L / 0T (8 battles) - Rank: #5 of 22 ### Bald man challenge - Elo: 1189 - Record: 11W / 1L / 0T (12 battles) - Rank: #4 of 14 ### Apollo 11: Journey to Tranquility - Elo: 1168 - Record: 7W / 2L / 0T (9 battles) - Rank: #9 of 19 ### Isometric Miniature Diorama Scenes - Elo: 1167 - Record: 4W / 3L / 1T (8 battles) - Rank: #10 of 19 ### Fantasy Warrior - Elo: 1153 - Record: 5W / 2L / 2T (9 battles) - Rank: #13 of 19 ### Candid Street Photography - Elo: 1123 - Record: 4W / 2L / 0T (6 battles) - Rank: #19 of 22 ### Night Sky Transformation - Elo: 1099 - Record: 1W / 3L / 1T (5 battles) - Rank: #14 of 15 ## Use Cases & Category Performance ### Product, Branding & Commercial (Text-to-Image) - Rank: #1 of 19 - Elo: 1272 - Record: 10W / 0L / 0T (10 battles) - Win Rate: 100.0% ### Text Rendering (Text-to-Image) - Rank: #2 of 21 - Elo: 1310 - Record: 31W / 2L / 0T (33 battles) - Win Rate: 93.9% ### Portrait (Text-to-Image) - Rank: #4 of 19 - Elo: 1228 - Record: 5W / 2L / 2T (9 battles) - Win Rate: 55.6% ### Portrait (Image Editing) - Rank: #5 of 14 - Elo: 1243 - Record: 11W / 1L / 0T (12 battles) - Win Rate: 91.7% ### Photorealism (Image Editing) - Rank: #7 of 16 - Elo: 1228 - Record: 29W / 24L / 4T (57 battles) - Win Rate: 50.9% ### Anime (Image Editing) - Rank: #6 of 13 - Elo: 1199 - Record: 7W / 3L / 1T (11 battles) - Win Rate: 63.6% ### Photorealism (Text-to-Image) - Rank: #14 of 22 - Elo: 1175 - Record: 4W / 2L / 0T (6 battles) - Win Rate: 66.7% ## Image Gallery 18 images available for this model. - Curated examples: 5 - "A breathtaking, hyper-realistic wide shot of a celestial forge floating amidst a swirling nebula of liquid gold and d..." - "A wide-angle cinematic shot of a high-end, minimalist photography studio where a sleek, professional-grade camera len..." - "A cinematic wide shot of an ornate, sun-drenched European conservatory library, where lush tropical ferns and climbin..." - "Cinematic wide shot of a master carpenter's sun-drenched workshop, dust motes dancing in shafts of morning light, int..." - "A sun-drenched, cozy ceramic studio with hand-painted pottery on wooden shelves. In the center, a focused artisan sha..." - Competition results: 13 - Studio Ghibli Anime Style: #1 of 13 (Elo 1245) - Man and Car in California: #7 of 13 (Elo 1244) - Modern Clean Menu: #4 of 19 (Elo 1239) - Adorable Baby Animals in Sunny Meadow: #3 of 23 (Elo 1213) - Vintage Cafe Logo: #3 of 19 (Elo 1210) - Over-the-top cartoon caricature: #5 of 13 (Elo 1194) - Geometric Composition: #5 of 22 (Elo 1193) - Bald man challenge: #4 of 14 (Elo 1189) - Apollo 11: Journey to Tranquility: #9 of 19 (Elo 1168) - Isometric Miniature Diorama Scenes: #10 of 19 (Elo 1167) - Fantasy Warrior: #13 of 19 (Elo 1153) - Candid Street Photography: #19 of 22 (Elo 1123) - Night Sky Transformation: #14 of 15 (Elo 1099) ## Example Prompt The following prompt was used to generate an example image in our playground: A sun-drenched, cozy ceramic studio with hand-painted pottery on wooden shelves. In the center, a focused artisan shapes a clay vase on a spinning wheel. Outside the large window, a capybara rests peacefully in the tall garden grass. ## Code Examples ### Text to Image (Generation) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/generations \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemini-3.1-flash-image-preview", "prompt": "A serene mountain landscape at sunset", "size": "1024x1024" }' # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.generate({ model: 'gemini-3.1-flash-image-preview', prompt: 'A serene mountain landscape at sunset', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.generate( model="gemini-3.1-flash-image-preview", prompt="A serene mountain landscape at sunset", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ### Image Editing #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/edits \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -F "model=gemini-3.1-flash-image-preview" \ -F "image=@source.png" \ -F "prompt=Add a starry night sky to this image" \ -F "size=1024x1024" # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; import fs from 'fs'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.edit({ model: 'gemini-3.1-flash-image-preview', image: fs.createReadStream('source.png'), prompt: 'Add a starry night sky to this image', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.edit( model="gemini-3.1-flash-image-preview", image=open("source.png", "rb"), prompt="Add a starry night sky to this image", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ## About ## Overview Nano Banana 2 (slug: `gemini-3.1-flash-image-preview`) is a high-efficiency multimodal model developed by Google that bridges the gap between reasoning and visual synthesis. As the streamlined counterpart to the Gemini 3 Pro Image, it provides a unified interface for complex text generation and fast image creation. It is distinctive for its "Thinking Mode," allowing the model to perform internal reasoning cycles before generating an image or structured text response. ## Strengths * **High-Efficiency Generation:** Optimized for speed and low latency, making it suitable for real-time applications where rapid image iteration is required. * **Complex Text Rendering:** Excels at incorporating legible, accurate typography within generated images, a common failure point for many diffusion-based models. * **Deep Reasoning Integration:** Features a native thinking mode that allows the model to process complex prompts, spatial relationships, and logical constraints before producing visual or textual output. * **Grounding and Tool Use:** Supports search grounding and code execution, enabling the model to verify facts or perform calculations prior to generating content. * **Reference Image Support:** Capable of using existing images as structural or stylistic guides to maintain consistency across generated assets. ## Limitations * **Efficiency vs. Fidelity:** While fast, it may lack the extreme aesthetic refinement and intricate textural detail found in the larger Gemini 3 Pro Image model. * **Preview Status:** As a preview release, the model may exhibit occasional inconsistencies in following highly nuanced stylistic prompts compared to more mature, production-stable versions. * **Context Overhead:** The use of internal reasoning (Thinking Mode) can increase processing time for simple tasks where a direct generation would have sufficed. ## Technical Background Part of the Gemini 3.1 Flash family, this model utilizes a multimodal transformer architecture trained for both discriminative and generative tasks. It integrates a latent diffusion-based image generation head directly into the language model pipeline, allowing for seamless transitions between modalities. By employing a "distilled" training approach, Google has optimized the model for high throughput while retaining the core reasoning capabilities of the Gemini 3.1 architecture. ## Best For Nano Banana 2 is ideal for building interactive design tools, rapid prototyping of social media assets, and automated content pipelines where both text and imagery are required. Its support for structured output and JSON mode makes it an excellent choice for developers needing to programmatically control visual attributes. You can experiment with these multimodal features and integrate them into your workflow through Lumenfall’s unified API and playground. ## Frequently Asked Questions ### How much does Nano Banana 2 cost? Nano Banana 2 starts at $0.0225 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### What can Nano Banana 2 do? Nano Banana 2 supports Function calling, Structured output, Batch, Streaming, System prompt, Tool use, Grounding, Thinking, Code execution, and Json mode. It accepts text, image, audio, video, and file input and produces text and image output. ### How do I use Nano Banana 2 via API? You can use Nano Banana 2 through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "gemini-3.1-flash-image-preview". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer Nano Banana 2? Nano Banana 2 is available through Gemini API, fal.ai, Vertex AI, and Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider. ## Links - Model Page: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview - About: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview/about - Providers, Pricing & Performance: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview/providers - API Reference: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview/api - Benchmarks: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview/benchmarks - Use Cases: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview/use-cases - Gallery: https://lumenfall.ai/models/google/gemini-3.1-flash-image-preview/gallery - Playground: https://lumenfall.ai/playground?model=gemini-3.1-flash-image-preview - API Documentation: https://docs.lumenfall.ai