- Context Window
- 131K
- In
- $0.557per million tokens
- Out
- $3.34per million tokens
google/ gemini-3.1-flash-imageSpecifications
In$0.557
Out$3.34
- Context Window
- 131K
- Modalities
- image, text
- Price
- $0.557 in · $3.34 out, per million tokens
- Model ID
- google/gemini-3.1-flash-image
Quick start
google/gemini-3.1-flash-image
$0.557 in · $3.34 out, per million tokens
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',
messages: [{ role: 'user', content: 'Hello!' }]
})
console.log(response.choices[0].message.content)
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",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
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",
"messages": [{"role": "user", "content": "Hello!"}]
}'
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",
Messages: []openai.ChatCompletionMessage{
{Role: openai.ChatMessageRoleUser, Content: "Hello!"},
},
},
)
fmt.Println(resp.Choices[0].Message.Content)
}
More from Google
View all Google models →$12.25Bill a month
The same bill for this mix.
Nano Banana 2 (Gemini 3.1 Flash Image)$12.25131K
Gemini 3 Flash Preview$12.251M
- Gemini 2.5 Flash Gemini 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...
- Nano Banana (Gemini 2.5 Flash Image) Gemini 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,...
- Gemini 2.5 Flash Lite Gemini 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...
- Gemini 2.5 Pro Gemini 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...
- Gemini 2.5 Pro Preview 06-05 Gemini 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...
- Gemini 3 Flash Preview Gemini 3 Flash Preview is a high speed, high value thinking model designed for agentic workflows, multi turn chat, and coding assistance. It delivers near Pro level reasoning and tool...
Use Nano Banana 2 (Gemini 3.1 Flash Image) via Hanzo AI
One API key. Every major model. OpenAI-compatible. Start free.
