Unlock exclusive introductory pricing for the newly launched Gemini 3.5 Flash.
G

Nano Banana 2

Entrée:$0.4/M
Sortie:$2.4/M
Publié:Feb 26, 2026

Core Capabilities Overview: Resolution: Up to 4K (4096×4096), on par with Pro. Reference Image Consistency: Up to 14 reference images (10 objects + 4 characters), maintaining style/character consistency. Extreme Aspect Ratios: New 1:4, 4:1, 1:8, 8:1 ratios added, suitable for long images, posters, and banners. Text Rendering: Advanced text generation, suitable for infographics and marketing poster layouts. Search Enhancement: Integrated Google Search + Image Search. Grounding: Built-in thinking process; complex prompts are reasoned before generation.

Nouveau
Populaire
Usage commercial

Playground pour Nano Banana 2

Explorez le Playground de Nano Banana 2 — un environnement interactif pour tester les modèles et exécuter des requêtes en temps réel. Essayez des invites, ajustez les paramètres et itérez instantanément pour accélérer le développement et valider les cas d'utilisation.

Technical Specifications of Gemini 3.1 Flash Image Preview

ItemGemini 3.1 Flash Image Preview
ProviderGoogle
Model familyGemini 3.1 (Flash tier)
Primary focusFast multimodal generation with image preview
Input typesText, Image
Output typesText, Image (preview generation)
Context windowUp to 1M tokens (Gemini 3.x Flash tier standard)
Latency tierLow-latency, high-throughput
Streaming supportYes
Tool callingYes (Gemini API tools framework)
Version3.1

What is Nano Banana 2

Nano Banana 2 is the popular nickname used by the press and developer community for the newly released Gemini-3.1-Flash-Image model. Google positions it as the “Flash”-tier image engine that brings near-Pro visual fidelity to a much lower latency and cost tier — suitable for high-volume generation, rapid iterative editing, and integrated product workflows across Google services. It inherits Gemini 3.1’s multimodal reasoning and adds image-centric capabilities (legible text in images, multi-image composition, wide aspect ratio support, native 4K).

Main features

  • High-speed, multi-resolution generation: Flash-tier speed with options for 0.5K / 1K / 2K / 4K outputs and new extreme aspect ratios (1:4, 4:1, 1:8, 8:1).
  • Real-time web grounding: Integrates both text and image search results to ground generated content in current web information when “Thinking” or search grounding is enabled. Useful for up-to-date references and factual infographics.
  • Improved text rendering: Better short-text and graphic text rendering (fonts, sizes) than earlier Flash models; still imperfect on long paragraphs/small text.
  • Multi-input editing and multi-turn workflows: Strong support for combining several images as inputs and for iterative edits across turns.

📊 Benchmark Performance — Image Generation & Editing (Elo scores)

CapabilityGemini 3.1 Flash Image (Nano Banana 2)Gemini 2.5 Flash Image (Nano Banana)Gemini 3 Pro Image (Nano Banana Pro)GPT-Image 1.5Seedream 5.0 LiteGrok Imagine Image Pro
Text-to-Image — Overall Preference1079.0 ± 7.01073.0 ± 5.0942.0 ± 6.01021.0 ± 5.01047.0 ± 5.0928.0 ± 8.0
Text-to-Image — Visual Quality1140.0 ± 6.01129.0 ± 6.0929.0 ± 6.01043.0 ± 5.0975.0 ± 5.0759.0 ± 10.0
Text-to-Image — Infographics (Factuality)1114.0 ± 14.01074.0 ± 12.0881.0 ± 13.01102.0 ± 13.0985.0 ± 12.0890.0 ± 22.0
Editing — General1065.0 ± 9.01047.0 ± 9.0913.0 ± 9.01051.0 ± 10.0995.0 ± 8.0937.0 ± 9.0
Editing — Character1056.0 ± 7.01049.0 ± 7.0952.0 ± 7.01050.0 ± 8.01025.0 ± 7.0894.0 ± 8.0
Editing — Creative1023.0 ± 7.01031.0 ± 7.0976.0 ± 7.01004.0 ± 7.01017.0 ± 7.0938.0 ± 7.0
Editing — Object/Environment1029.0 ± 8.01018.0 ± 8.0945.0 ± 8.01042.0 ± 10.0976.0 ± 8.0946.0 ± 9.0
Editing — Multi-Input1037.0 ± 8.01016.0 ± 8.0919.0 ± 9.01056.0 ± 12.01014.0 ± 9.0N/A
Editing — Stylization1045.0 ± 7.01031.0 ± 7.0862.0 ± 8.01045.0 ± 9.0996.0 ± 7.0984.0 ± 7.0

Key takeaways from this benchmark table:

  • Across text-to-image generation and image editing categories, Gemini 3.1 Flash Image consistently leads or matches the highest scores among Flash-tier and many competitive image models.
  • The model shows especially strong results in Visual Quality and Infographic (Factuality) benchmarks—signaling that it excels not only in aesthetic quality but also in rendering structurally accurate content.
  • On Multi-Input editing, Nano Banana 2 also shows robust generalization, with higher scores than its previous Flash generation.

These evaluations are conducted via human side-by-side Elo comparisons on a diverse benchmark suite, reflecting both preference and fidelity across commonly used image generation/editing tasks.

Nano Banana 2 vs Nano Banana vs Nano Banana Pro

ModelPositioningRepresentative benchmark/notes
Gemini 3.1 Flash Image (Nano Banana 2)Flash tier: speed + high visual quality (2K–4K)Overall preference 1079.0 ± 7.0; visual quality 1140 ± 6.0 (internal GenAI-Bench).
Gemini 2.5 Flash Image (Nano Banana)Earlier Flash release (lower fidelity)Slightly lower preference/visual scores vs 3.1.
Gemini 3 Pro Image (Nano Banana Pro)Pro tier: higher perceived fidelity for complex tasks, higher cost/latencyDifferent tradeoffs; some metrics show different relative rankings in specialty tasks.
GPT-Image 1.5 / other commercial modelsCompetitors (open/closed)In Google’s internal benchmarks GPT-Image and others scored below Gemini 3.1 on visual quality and overall preference in the reported eval. Independent third-party comparisons vary.

When to choose Flash Image Preview:

  • Real-time image preview in apps
  • Cost-sensitive large-scale image generation
  • Interactive design assistants

How to access and integrate Nano Banana 2

Step 1: Sign Up for API Key

Log in to cometapi.com. If you are not our user yet, please register first. Sign into your CometAPI console. Get the access credential API key of the interface. Click “Add Token” at the API token in the personal center, get the token key: sk-xxxxx and submit.

Step 2: Send Requests to Nano Banana 2 API

Select the “gemini-3.1-flash-image-preview8” endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience. Replace <YOUR_API_KEY> with your actual CometAPI key from your account. Where to call it:Gemini generates image

Nano Banana 2 supports image editing, image generation, and multi-image workflows. For image editing, you need to upload the image URL. For more parameters, please refer to the documentation.

Step 3: Retrieve and Verify Results

Process the API response to get the generated answer. After processing, the API responds with the task status and output data. You can directly download the image to your local machine in the playground (usually in PNG format). An image URL is generated in the API process; please download it promptly.

FAQ

Tarification pour Nano Banana 2

Découvrez des tarifs compétitifs pour Nano Banana 2, conçus pour s'adapter à différents budgets et besoins d'utilisation. Nos formules flexibles garantissent que vous ne payez que ce que vous utilisez, ce qui facilite l'adaptation à mesure que vos besoins évoluent. Découvrez comment Nano Banana 2 peut améliorer vos projets tout en maîtrisant les coûts.

nano-banana-2(image)

variant / aliasPrice
gemini-3.1-flash-image (0.5K)≈ $0.03600
gemini-3.1-flash-image (1K)≈ $0.05360
gemini-3.1-flash-image (2K)≈ $0.08080
gemini-3.1-flash-image (4K)≈ $0.12080
gemini-3.1-flash-image-preview (0.5K)≈ $0.03600
gemini-3.1-flash-image-preview (1K)≈ $0.05360
gemini-3.1-flash-image-preview (2K)≈ $0.08080
gemini-3.1-flash-image-preview (4K)≈ $0.12080

Exemple de code et API pour Nano Banana 2

Accédez à des exemples de code complets et aux ressources API pour Nano Banana 2 afin de simplifier votre processus d'intégration. Notre documentation détaillée fournit des instructions étape par étape pour vous aider à exploiter tout le potentiel de Nano Banana 2 dans vos projets.

# Get your CometAPI key from https://api.cometapi.com/console/token
# Export it as: export COMETAPI_KEY="your-key-here"

mkdir -p ./output

curl -s "https://api.cometapi.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent" \
  -H "Authorization: $COMETAPI_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "A woman leaning on a wooden railing of a traditional Chinese building. She is wearing a blue cheongsam with pink and red floral motifs and a headdress made of colorful flowers, including roses and lilacs. Realistic painting style, focusing on the textural details of the clothing patterns and wooden buildings."
          }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["IMAGE"],
      "imageConfig": {
        "aspectRatio": "9:16"
      }
    }
  }' | python3 -c "
import sys, json, base64
data = json.load(sys.stdin)
parts = data['candidates'][0]['content']['parts']
for part in parts:
    if 'text' in part:
        print(part['text'])
    elif 'inlineData' in part:
        img = base64.b64decode(part['inlineData']['data'])
        with open('./output/gemini-3.1-flash-image-preview.png', 'wb') as f:
            f.write(img)
        print('Image saved to ./output/gemini-3.1-flash-image-preview.png')
"

cURL Code Example

# Get your CometAPI key from https://api.cometapi.com/console/token
# Export it as: export COMETAPI_KEY="your-key-here"

mkdir -p ./output

curl -s "https://api.cometapi.com/v1beta/models/gemini-3.1-flash-image-preview:generateContent" \
  -H "Authorization: $COMETAPI_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "A woman leaning on a wooden railing of a traditional Chinese building. She is wearing a blue cheongsam with pink and red floral motifs and a headdress made of colorful flowers, including roses and lilacs. Realistic painting style, focusing on the textural details of the clothing patterns and wooden buildings."
          }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["IMAGE"],
      "imageConfig": {
        "aspectRatio": "9:16"
      }
    }
  }' | python3 -c "
import sys, json, base64
data = json.load(sys.stdin)
parts = data['candidates'][0]['content']['parts']
for part in parts:
    if 'text' in part:
        print(part['text'])
    elif 'inlineData' in part:
        img = base64.b64decode(part['inlineData']['data'])
        with open('./output/gemini-3.1-flash-image-preview.png', 'wb') as f:
            f.write(img)
        print('Image saved to ./output/gemini-3.1-flash-image-preview.png')
"

Python Code Example

from google import genai
from google.genai import types
from PIL import Image
import os

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"
BASE_URL = "https://api.cometapi.com"

client = genai.Client(
    http_options={"api_version": "v1beta", "base_url": BASE_URL},
    api_key=COMETAPI_KEY,
)

prompt = (
    "A woman leaning on a wooden railing of a traditional Chinese building. "
    "She is wearing a blue cheongsam with pink and red floral motifs and a headdress "
    "made of colorful flowers, including roses and lilacs. Realistic painting style, "
    "focusing on the textural details of the clothing patterns and wooden buildings."
)
aspect_ratio = "9:16"  # "1:1","2:3","3:2","3:4","4:3","4:5","5:4","9:16","16:9","21:9"

response = client.models.generate_content(
    model="gemini-3.1-flash-image-preview",
    contents=[prompt],
    config=types.GenerateContentConfig(
        response_modalities=["IMAGE"],
        image_config=types.ImageConfig(aspect_ratio=aspect_ratio),
    ),
)

os.makedirs("./output", exist_ok=True)

for part in response.parts:
    if part.text is not None:
        print(part.text)
    elif part.inline_data is not None:
        image = part.as_image()
        output_path = "./output/gemini-3.1-flash-image-preview.png"
        image.save(output_path)
        print(f"Image saved to {output_path}")

JavaScript Code Example

import fs from "fs";
import path from "path";

// Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
const api_key = process.env.COMETAPI_KEY || "<YOUR_COMETAPI_KEY>";
const base_url = "https://api.cometapi.com/v1beta";
const model = "gemini-3.1-flash-image-preview";

const prompt =
  "A woman leaning on a wooden railing of a traditional Chinese building. " +
  "She is wearing a blue cheongsam with pink and red floral motifs and a headdress " +
  "made of colorful flowers, including roses and lilacs. Realistic painting style, " +
  "focusing on the textural details of the clothing patterns and wooden buildings.";

const response = await fetch(`${base_url}/models/${model}:generateContent`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: api_key,
  },
  body: JSON.stringify({
    contents: [
      {
        role: "user",
        parts: [{ text: prompt }],
      },
    ],
    generationConfig: {
      responseModalities: ["IMAGE"],
      imageConfig: {
        aspectRatio: "9:16",
      },
    },
  }),
});

const data = await response.json();

const outputDir = "./output";
if (!fs.existsSync(outputDir)) {
  fs.mkdirSync(outputDir, { recursive: true });
}

for (const candidate of data.candidates) {
  for (const part of candidate.content.parts) {
    if (part.text) {
      console.log(part.text);
    } else if (part.inlineData) {
      const imageBuffer = Buffer.from(part.inlineData.data, "base64");
      const outputPath = path.join(outputDir, "gemini-3.1-flash-image-preview.png");
      fs.writeFileSync(outputPath, imageBuffer);
      console.log(`Image saved to ${outputPath}`);
    }
  }
}

Versions de Nano Banana 2

La raison pour laquelle Nano Banana 2 dispose de plusieurs instantanés peut inclure des facteurs potentiels tels que des variations de sortie après des mises à jour nécessitant des instantanés plus anciens pour la cohérence, offrant aux développeurs une période de transition pour l'adaptation et la migration, et différents instantanés correspondant à des points de terminaison globaux ou régionaux pour optimiser l'expérience utilisateur. Pour les différences détaillées entre les versions, veuillez consulter la documentation officielle.

Model iddescriptionAvailabilityRequest
gemini-3.1-flash-imageRecommend, Pointing to the latest modelGemini generates image
gemini-3.1-flash-image-previewOfficial PreviewGemini generates image