GPT-5.6 is here 🎉 20% off all GPT 🎉 All July 🔥Learn more

This model has been deprecated

Deprecated since 2026-06-25. New requests are no longer accepted — please switch to an active alternative.

Gemini

Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)

Image GenerationDEPRECATED
google/gemini-3.1-flash-image-preview

Gemini 3.1 Flash Image Preview, a.k.a. "Nano Banana 2," is Google’s latest state of the art image generation and editing model, delivering Pro-level visual quality at Flash speed. It combines advanced contextual understanding with fast, cost-efficient inference, making complex image generation and iterative edits significantly more accessible.

Context Window
64K
Max Output Tokens
64K
Released
2026-03-03
Capabilities
VisionWeb Search
Available Providers
GeminiGeminiGoogleCloudVertex
Supported Protocols
OpenAIopenaiGeminigemini

Pricing

TypePrice
Input Tokens$0.5/M
Output Tokens$3/M
Output Image$60/M
Web Search$0.014/R

Code Examples

from google import genai
client = genai.Client(
api_key="YOUR_OFOX_API_KEY",
http_options={"api_version": "v1beta", "base_url": "https://api.ofox.io/gemini"},
)
response = client.models.generate_content(
model="google/gemini-3.1-flash-image-preview",
contents="Generate an image of a beautiful sunset over mountains",
)
print(response.text)

Frequently Asked Questions

Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) on Ofox.ai costs $0.5/M per million input tokens and $3/M per million output tokens. Pay-as-you-go, no monthly fees.