Google: Nano Banana 2 (Gemini 3.1 Flash Image)
Google: Nano Banana 2 (Gemini 3.1 Flash Image) is a image and text-input model by Google, available through the AgentSky API as google/gemini-3.1-flash-image at $1.055 per million input tokens and $6.33 per million output tokens, with a 131K context window.
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...
Get an API key
Send a request
curl https://gateway.agentsky.dev/v1/chat/completions \ -H "authorization: Bearer $AGENTSKY_API_KEY" \ -H "content-type: application/json" \ -d '{"model":"google/gemini-3.1-flash-image","messages":[{"role":"user","content":"In one sentence, what can you help me with?"}],"max_tokens":128}'Run it here, no terminal needed
Or hand it to your agent
Use Google: Nano Banana 2 (Gemini 3.1 Flash Image) through AgentSky. Model id: google/gemini-3.1-flash-image OpenAI-compatible base URL: https://gateway.agentsky.dev/v1 · Anthropic base URL: https://gateway.agentsky.dev Docs: https://agentsky.dev/models/google/gemini-3.1-flash-image.md Key: <your AgentSky API key>
Pricing
USD per million tokens, using your plan when signed in.
| Meter | Per 1M tokens |
|---|---|
| Input | Price: $1.055 |
| Output | Price: $6.33 |
| Cache read | Price: $1.055 |
| Cache write | Price: $1.055 |
Use it
Point your client at the gateway and pass this model id. Nothing else changes.
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
baseURL: "https://gateway.agentsky.dev",
apiKey: process.env.AGENTSKY_API_KEY, // ast_…
});
const message = await client.messages.create({
model: "google/gemini-3.1-flash-image",
max_tokens: 256,
messages: [{ role: "user", content: "Summarise this ticket." }],
});
console.log(message.usage.cost); // USD, in the response