Nano Banana 2.1 is Google's image generation and editing model on the Flash tier, released 2026-10, succeeding Nano Banana 2 and Nano Banana Pro. It improves product recontextualization, mask- and ink-based editing, and factual accuracy, with photorealistic skin tones, detailed materials, and coherent backgrounds. It outputs images at 1K, 2K, and 4K with extended aspect ratios.
This model isn’t available on MirAPI yet, so the prices shown are the official list prices. Create an account to get notified when it goes live.
Capabilities
Parameters
Request parameters this model accepts through the API.
Quick start
POST /v1beta/models/{model}:generateContentcurl https://api.mirapi.ai/v1beta/models/:generateContent \ -H "x-goog-api-key: $MIRAPI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "contents": [{"parts": [{"text": "A red bicycle leaning on a white wall"}]}], "generationConfig": { "responseModalities": ["TEXT", "IMAGE"], "imageConfig": {"aspectRatio": "1:1"} } }' # the image is base64 in candidates[0].content.parts[].inlineData.data
import os, base64, requests url = "https://api.mirapi.ai/v1beta/models/:generateContent" resp = requests.post( url, headers={"x-goog-api-key": os.environ["MIRAPI_API_KEY"]}, # changed json={ "contents": [{"parts": [{"text": "A red bicycle leaning on a white wall"}]}], "generationConfig": { "responseModalities": ["TEXT", "IMAGE"], "imageConfig": {"aspectRatio": "1:1"}, }, }, ).json() for part in resp["candidates"][0]["content"]["parts"]: if "inlineData" in part: open("image.png", "wb").write(base64.b64decode(part["inlineData"]["data"]))
import fs from "node:fs"; const url = "https://api.mirapi.ai/v1beta/models/:generateContent"; const res = await fetch(url, { method: "POST", headers: { "x-goog-api-key": process.env.MIRAPI_API_KEY!, "Content-Type": "application/json" }, // changed body: JSON.stringify({ contents: [{ parts: [{ text: "A red bicycle leaning on a white wall" }] }], generationConfig: { responseModalities: ["TEXT", "IMAGE"], imageConfig: { aspectRatio: "1:1" }, }, }), }); const { candidates } = await res.json(); const img = candidates[0].content.parts.find((p) => p.inlineData); fs.writeFileSync("image.png", Buffer.from(img.inlineData.data, "base64"));
Links
1M free tokens to start, no card required. It’s OpenAI-compatible, so you only change the base URL.