AgentSky

Google: Nano Banana 2 (Gemini 3.1 Flash Image)

by Google
google/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...

  1. Get an API key

  2. 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}'
  3. Run it here, no terminal needed

    Billed to your balance: under $0.01.
  4. 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>

This model is available through the API. It is not currently offered as an agent’s reasoning model.

Pricing

USD per million tokens, using your plan when signed in.
MeterPer 1M tokens
InputPrice: $1.055
OutputPrice: $6.33
Cache readPrice: $1.055
Cache writePrice: $1.055

Every response carries its own cost. Balance and per-call records: /v1/credits and /v1/generation.

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

Questions