# Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) — Use via Hanzo AI API > 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 P... Access via Hanzo's OpenAI-compatible API. Context: 66K. Get started free. [Models](https://hanzo.ai/models)/[Google](https://hanzo.ai/models/google)/gemini-3.1-flash-image-preview # Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) [Google](https://hanzo.ai/models/google) 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... text [Get API Key](https://hanzo.ai/signup)[View Docs](https://docs.hanzo.ai)[Try in Chat](https://hanzo.ai/chat) ## Specifications Context Window 66K Modalities text Input $0.600 / M tokens Output $3.60 / M tokens Status available Category third-party Model ID google/gemini-3.1-flash-image-preview ## Quick Start TypeScript ``` import OpenAI from 'openai' const client = new OpenAI({ apiKey: process.env.HANZO_API_KEY, baseURL: 'https://api.hanzo.ai/v1' }) const response = await client.chat.completions.create({ model: 'google/gemini-3.1-flash-image-preview', messages: [{ role: 'user', content: 'Hello!' }] }) console.log(response.choices[0].message.content) ``` Python ``` from openai import OpenAI client = OpenAI( api_key=os.environ["HANZO_API_KEY"], base_url="https://api.hanzo.ai/v1" ) response = client.chat.completions.create( model="google/gemini-3.1-flash-image-preview", messages=[{"role": "user", "content": "Hello!"}] ) print(response.choices[0].message.content) ``` cURL ``` curl https://api.hanzo.ai/v1/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $HANZO_API_KEY" \ -d '{ "model": "google/gemini-3.1-flash-image-preview", "messages": [{"role": "user", "content": "Hello!"}] }' ``` Go ``` package main import ( "context" "fmt" "os" "github.com/sashabaranov/go-openai" ) func main() { cfg := openai.DefaultConfig(os.Getenv("HANZO_API_KEY")) cfg.BaseURL = "https://api.hanzo.ai/v1" client := openai.NewClientWithConfig(cfg) resp, _ := client.CreateChatCompletion(context.Background(), openai.ChatCompletionRequest{ Model: "google/gemini-3.1-flash-image-preview", Messages: []openai.ChatCompletionMessage{ {Role: openai.ChatMessageRoleUser, Content: "Hello!"}, }, }, ) fmt.Println(resp.Choices[0].Message.Content) } ``` ## More from Google [Google: Gemini 2.5 Flash1MGemini 2.5 Flash is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater...](https://hanzo.ai/models/google/gemini-2.5-flash)[Google: Nano Banana (Gemini 2.5 Flash Image)33KGemini 2.5 Flash Image, a.k.a. "Nano Banana," is now generally available. It is a state of the art image generation model with contextual understanding. It is capable of image generation,...](https://hanzo.ai/models/google/gemini-2.5-flash-image)[Google: Gemini 2.5 Flash Lite1MGemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance...](https://hanzo.ai/models/google/gemini-2.5-flash-lite)[Google: Gemini 2.5 Flash Lite (batch)1MGemini 2.5 Flash-Lite is a lightweight reasoning model in the Gemini 2.5 family, optimized for ultra-low latency and cost efficiency. It offers improved throughput, faster token generation, and better performance...](https://hanzo.ai/models/google/gemini-2.5-flash-lite:batch)[Google: Gemini 2.5 Flash (batch)1MGemini 2.5 Flash is Google's state-of-the-art workhorse model, specifically designed for advanced reasoning, coding, mathematics, and scientific tasks. It includes built-in "thinking" capabilities, enabling it to provide responses with greater...](https://hanzo.ai/models/google/gemini-2.5-flash:batch)[Google: Gemini 2.5 Pro1MGemini 2.5 Pro is Google’s state-of-the-art AI model designed for advanced reasoning, coding, mathematics, and scientific tasks. It employs “thinking” capabilities, enabling it to reason through responses with enhanced accuracy...](https://hanzo.ai/models/google/gemini-2.5-pro) [View all Google models →](https://hanzo.ai/models/google) ## Use Google: Nano Banana 2 (Gemini 3.1 Flash Image Preview) via Hanzo AI One API key. Every major model. OpenAI-compatible. Start free. [Get Free API Key](https://hanzo.ai/signup)[Browse All Models](https://hanzo.ai/models)