Skip to content
Dashboard

Nano Banana (Gemini 2.5 Flash Image)

Nano Banana (Gemini 2.5 Flash Image) is Google's native image generation and editing model, combining multimodal world knowledge with character consistency, targeted prompt-based edits, and multi-image fusion in a single model.

View API reference
Input and output price
Prices from: Input $0.30, Output $2.50, Per 1M tokens
24h uptime
Loading AI Gateway uptime
import { generateText } from 'ai'
const result = await generateText({
model: 'google/gemini-2.5-flash-image',
prompt: 'Render a picture of a red balloon.',
});
Read docs

Copy link to headingPlayground

Try out Nano Banana (Gemini 2.5 Flash Image) by Google. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.

google logo
Prompt
Describe what you want the model to generate.
Reference images(optional)
Add up to 4 images
Images to generate
google logo

Your generated image will appear here

Copy link to headingProviders

Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.

Provider
Input
Output
Cache
Web Search
Capabilities
ZDR
No Training
Regional Inference
Free Tier
Release Date
$0.30/M+2 more
$2.50/M+2 more
Read$0.03/M
08/26/2025
$0.30/M+1 more
$2.50/M+1 more
Read$0.03/M
$25/K
US
EU
08/26/2025

Copy link to headingUptime

Direct request success rate on AI Gateway and per-provider. Visit the docs for more info.

Copy link to headingThroughput

P50 throughput on live AI Gateway traffic, in tokens per second (TPS). Visit the docs for more info.

Copy link to headingLatency

P50 time to first token (TTFT) on live AI Gateway traffic, in milliseconds. View the docs for more info.

Getting started

Call Nano Banana (Gemini 2.5 Flash Image) through AI Gateway with the AI SDK generateText and streamText functions, or through the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages APIs by changing the base URL. AI Gateway authenticates the request and routes it to an available provider.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the text generation quickstart.

index.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-flash-image',
prompt: 'Why is the sky blue?',
});
console.log(result.text);
}
main().catch(console.error);

Top-level parameters

The same Nano Banana (Gemini 2.5 Flash Image) request in each API format AI Gateway supports.

top-level-params.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-flash-image',
system: 'You are a concise technical assistant.',
prompt: 'Summarize the tradeoffs between static generation and SSR.',
maxOutputTokens: 1024,
temperature: 0.5,
});
console.log(result.text);
}
main().catch(console.error);

Standard parameters like prompt, messages, temperature, and tools work as documented in the AI SDK docs. These are the parameters with model-specific behavior.

ParameterTypeRequiredDescription
modelstringYesModel ID in the form creator/model, e.g. google/gemini-2.5-flash-image. AI Gateway routes the request to an available provider.
maxOutputTokensnumberNoHard cap on generated tokens. Nano Banana (Gemini 2.5 Flash Image) supports up to 65,536 output tokens.
providerOptionsRecord<string, JSONValue>NoAI Gateway routing options under gateway, plus any provider-native options under the provider’s own namespace — see the table below.

Input limits

InputFormatsSourcesMax countMax sizeLimits
TextPrompt and response share the 33K-token context window
ImageURL, base64, Uint8ArraySent as image parts in messages; counts as input tokens

Provider options

Set AI Gateway routing options under providerOptions.gateway. For provider-specific options, pass them under the provider’s namespace as documented by the AI SDK.

Learn more in the AI SDK google provider docs.

provider-options.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-flash-image',
prompt: 'Why is the sky blue?',
providerOptions: {
gateway: {
only: ['google', 'vertex'],
},
},
});
console.log(result.text);
}
main().catch(console.error);

These AI Gateway routing options apply to every model. Provider-specific options pass through under the provider’s own namespace (for example providerOptions.anthropic) exactly as documented by the AI SDK.

ParameterTypeRequiredDescription
providerOptions.gateway.onlystring[]NoRestrict routing to these provider slugs. Requests fail over only within the listed providers.
providerOptions.gateway.orderstring[]NoPreferred provider order. Listed providers are tried first; unlisted providers remain available as fallbacks.
providerOptions.gateway.sort'cost' | 'ttft' | 'tps'NoRank candidate providers by price, time to first token, or tokens per second instead of the default routing order.
providerOptions.gateway.zeroDataRetentionbooleanNoRoute only to providers with a zero-data-retention policy for this model.

Routing across providers

AI Gateway serves the same model through multiple providers and fails over automatically. order expresses a preference while keeping every provider eligible; only is a hard allowlist — if none of the listed providers are available the request fails instead of falling back.

Options under a provider's own namespace (for example providerOptions.anthropic) are forwarded to that provider with the request. Providers ignore option namespaces that don't apply to them, so it is safe to set provider options alongside gateway routing options.

Image input

Send images alongside text as message parts. Images count as input tokens.

image-input.ts
import { generateText } from 'ai';
import 'dotenv/config';
async function main() {
const result = await generateText({
model: 'google/gemini-2.5-flash-image',
messages: [
{
role: 'user',
content: [
{ type: 'text', text: 'Describe this image.' },
{ type: 'image', image: 'https://example.com/photo.jpg' },
],
},
],
});
console.log(result.text);
}
main().catch(console.error);

Copy link to headingMore models by Google

Model
Context
Latency
Throughput
Input
Output
Cache
Web Search
Capabilities
Providers
ZDR
No Training
Free Tier
Release Date
1M1.9 s417 tps
$0.75/M
$3.75/M
Read$0.08/M
$14/K+1 more
+3
google logo
vertex logo
09/02/2026
1M0.9 s279 tps
$0.75/M
$3.75/M
Read$0.08/M
$14/K+1 more
+3
google logo
vertex logo
08/13/2026
1M0.5 s307 tps
$0.30/M
$2.50/M
Read$0.03/M
$14/K+1 more
+3
google logo
vertex logo
07/21/2026
1M0.6 s255 tps
$0.25/M
$1.50/M
Read$0.03/M
$14/K+1 more
+3
google logo
vertex logo
05/07/2026
1M0.6 s199 tps
$0.50/M+1 more
$3/M+1 more
Read$0.05/M
$14/K+1 more
+3
google logo
vertex logo
12/17/2025
1M0.3 s271 tps
$0.10/M
$0.40/M
Read$0.01/M
$35/K+1 more
+3
google logo
vertex logo
06/17/2025

Copy link to headingAbout Nano Banana (Gemini 2.5 Flash Image)

Google introduced Nano Banana (Gemini 2.5 Flash Image) (internally codenamed nano-banana) on August 26, 2025 as a direct response to developer feedback on the earlier native image generation in Gemini 2.0 Flash. Users valued 2.0 Flash's low latency and ease of use but requested higher image quality and more capable creative control.

Four capabilities define the model. First, character consistency: it can place the same character or object into different environments, generate a product from multiple angles in new settings, or produce consistent brand assets across a series of prompts while preserving subject appearance. Second, prompt-based image editing: you use natural language to perform targeted local edits (blurring a background, removing a stain, altering a pose, colorizing a black-and-white photo) in a single call. Third, native world knowledge: unlike prior image generation models that excelled at aesthetics but lacked semantic grounding, Nano Banana (Gemini 2.5 Flash Image) draws on Gemini's world knowledge to interpret hand-drawn diagrams, answer questions grounded in real-world understanding, and follow complex editing instructions in one step. Fourth, multi-image fusion: the model accepts multiple input images and merges them, enabling product placement into new scenes, room restyling from a reference texture, and image-to-image blending.

All images created or edited with Nano Banana (Gemini 2.5 Flash Image) include an invisible SynthID digital watermark for downstream identification of AI-generated or AI-edited content.

Copy link to headingWhat To Consider When Choosing a Provider

  • Configuration: Image generation from Nano Banana (Gemini 2.5 Flash Image) is priced per image at N/A. Other input and output modalities follow Gemini 2.5 Flash rates. See the pricing panel on this page for current rates.
  • Zero Data Retention: Zero Data Retention is available for this model. It is offered on a per-provider and model basis. See the documentation for details.
  • Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.

Copy link to headingWhen to Use Nano Banana (Gemini 2.5 Flash Image)

Best for

  • Visual storytelling and character consistency: Campaigns, comics, or narrative applications that require the same character to appear coherently across multiple distinct images
  • Automated product photography: Generating a product catalog from a single reference image, showing items in multiple settings and angles at scale
  • Prompt-driven photo editing: Building user-facing editing tools that accept natural language instructions to perform precise, targeted modifications to uploaded images
  • Multi-image composition workflows: Fusing product images into lifestyle scenes, restyling interiors with reference textures, or merging source materials into a single photorealistic output
  • Education and knowledge-grounded visuals: Generating diagrams, illustrations, or annotated visuals that require semantic understanding of real-world concepts rather than purely aesthetic generation

Consider alternatives when

  • Text-only output needed: Image generation would add unnecessary cost and complexity
  • Video generation required: Still image output is not sufficient and a video model is the right fit
  • Latency-sensitive text pipelines: A standard Gemini 2.5 Flash model is more appropriate for purely text workflows
  • Embedding or retrieval workloads: A dedicated embedding model architecture is required

Nano Banana (Gemini 2.5 Flash Image) is a purpose-built native image generation model that advances beyond aesthetic generation by grounding output in Gemini's world knowledge, enabling use cases that depend on semantic accuracy, character consistency, and precise instruction-following at the pixel level. For teams building image-centric applications, editing tools, or automated creative pipelines, it delivers a unified model that handles generation and editing in a single API call.

Copy link to headingFrequently Asked Questions

  • What is the per-image cost for Nano Banana (Gemini 2.5 Flash Image)?

    Current pricing is shown on this page. AI Gateway routes across providers, and rates may vary by provider.

  • Can the model maintain a character's appearance across multiple generated images?

    Yes. Character consistency is one of the four headline capabilities described. The model can reproduce the same character or object in different environments, angles, and settings while preserving visual identity.

  • What types of prompt-based edits can the model perform?

    You can perform edits like blurring backgrounds, removing subjects from scenes, adding or replacing elements, changing colors, and applying style transfers. The model handles these through natural language prompts combined with input images.

  • How does multi-image fusion work?

    The model accepts multiple images as input and can merge them in a single prompt, for example, placing a product into a new scene, restyling a room using a reference texture or color scheme, or blending two source images together.

  • What is SynthID and are outputs watermarked?

    SynthID is Google's invisible digital watermark technology. All images created or edited with Nano Banana (Gemini 2.5 Flash Image) include a SynthID watermark that allows them to be identified as AI-generated or AI-edited.

  • What makes this model's world knowledge capability distinct from prior image generation models?

    Previous image generation models excelled at aesthetics but lacked deep semantic understanding. Nano Banana (Gemini 2.5 Flash Image) draws on Gemini's world knowledge to interpret hand-drawn diagrams, reason about real-world questions, and follow complex multi-step editing instructions in a single generation step.

  • What are the known limitations?

    Known limitations at preview launch include long-form text rendering within images, character consistency reliability, and factual accuracy of fine image details. Google is actively improving these areas.

Your use is subject to Google's Terms & Privacy Policies.