googleVision
Google: Nano Banana 2 (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...
Context
131k tokens
Input / 1M tokens
$0.50
Output / 1M tokens
$3
Benchmark
—
Pricing
Input tokens$0.50 per 1M tokens
Output tokens$3 per 1M tokens
Technical details
Model IDgoogle/gemini-3.1-flash-image-preview
Context window131k tokens
Input modalitiesimage, text
Output modalitiesimage, text
TokenizerGemini
Max output tokens65,536
Use with MegaBrain
import OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'https://getmegabrain.com/api/gateway/v1',
apiKey: process.env.MEGABRAIN_API_KEY,
})
const response = await client.chat.completions.create({
model: 'google/gemini-3.1-flash-image-preview',
messages: [{ role: 'user', content: 'Hello!' }],
})Ready to use Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview)?
Get an API key and start making requests in minutes.
Get an API key