Nano Banana is Google's Gemini 2.5 Flash Image model, released 2025-10, focused on image generation and editing with strong contextual understanding. It handles multi-turn visual conversations and supports controllable aspect ratios, making it suitable for iterative design and creative workflows.
Channels
Every channel serves the same model, but they differ in price and stability. On each API key in the Platform, you pick a primary and a backup channel per vendor, and each billing line shows which channel served the request.
Context pricing
This model’s price depends on how much input context a request carries. The headline price is the cheapest band, and a longer prompt moves the whole request into a higher one.
Capabilities
Parameters
Request parameters this model accepts through the API.
Quick start
POST /v1beta/models/{model}:generateContentcurl https://api.mirapi.ai/v1beta/models/gemini-2.5-flash-image: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/gemini-2.5-flash-image: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/gemini-2.5-flash-image: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.