googleVision

Google: Nano Banana 2 (Gemini 3.1 Flash Image)

Gemini 3.1 Flash Image, 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...

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
Context window131k tokens
Input modalitiesimage, text
Output modalitiesimage, text
TokenizerGemini
Max output tokens32,768

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',
  messages: [{ role: 'user', content: 'Hello!' }],
})

Ready to use Google: Nano Banana 2 (Gemini 3.1 Flash Image)?

Get an API key and start making requests in minutes.

Get an API key