Nano Banana 2 API

Nano Banana 2 API · Generate and edit

Explore compositions from 0.5K through 4K, with text generation and reference editing in one task API.

Product photographEditorial coverInterior conceptTravel postcardPackaging conceptStory illustrationFood still lifeCampaign background
Input
Resolution
Aspect ratio
Count
Enable the final fallback tier after ordinary channels fail. Its price applies only if that tier succeeds.
The Playground always screens prompts and input images. To disable screening via the API, set nsfw_check to false.
Advanced settings
Requires Google Search.
Output
Example asset · 1:1
/ Features

Nano Banana 2 API features

Flash-speed iteration

Explore several scene directions or refine reference edits with a model designed for rapid generation.

Draft at 0.5K, finish up to 4K

Choose 0.5K, 1K, 2K or 4K to move from small drafts to detailed production assets.

Scenes with believable structure

Use Gemini’s visual knowledge to draft scenes with recognizable objects, settings and relationships.

Legible text and localized designs

Add signage, captions or short marketing copy in the image, and check spelling when adapting the same design for another language.

Consistent subjects across scenes

Reuse reference images to carry character likeness or product appearance into different settings and story panels.

Richer lighting and textures

Describe the time of day, surface materials and light direction to bring out detail in product and editorial images.

Follows detailed visual briefs

Specify how subjects should be arranged and what must appear in frame to guide layouts with several requirements.

Targeted color and photo edits

Use a reference image to change colors, restyle a specific element or improve the clarity of a draft while guiding what to retain.

/ Use cases

Nano Banana 2 API · Use cases

Product photograph

For ecommerce teams, explore product lighting and camera placement before commissioning a finished campaign.

Editorial cover

For editors, sketch a cover composition with deliberate space for typography added during layout.

Interior concept

For interior designers, compare materials and lighting in a reading-room concept before selecting furnishings.

Travel postcard

For travel publishers, develop an illustrated destination concept and check geographic details before use.

Packaging concept

For packaging designers, explore surface patterns and colorways; add final labels in production artwork.

Story illustration

For illustrators, develop a scene and use approved references when revisiting the same character.

Food still life

For food brands, compare tabletop styling and framing while checking that ingredients remain recognizable.

Campaign background

For campaign designers, prepare an uncluttered background for compositing approved brand text and logos.

/ Examples

Nano Banana 2 API · Examples

The first card shows an image generated using the displayed prompt. The remaining cards offer prompts to try.

Mediterranean coastal village at golden hour
Mediterranean coastal village at golden hour
Mediterranean coastal village at golden hour
Image1:1

Mediterranean coastal village at golden hour

Editorial travel photograph of a whitewashed Mediterranean coastal village above turquoise water at golden hour, winding stone steps, blue shutters, pink bougainvillea, layered foreground and distant horizon, clear natural color, no text.

238 chars
Image4:5

Editorial cover

Editorial cover illustration of an orange bicycle beside a quiet canal, generous empty space above, clean geometric composition, no lettering.

142 chars
Image16:9

Interior concept

A small reading room with walnut bookshelves, a linen armchair and warm morning light, realistic materials, eye-level interior photograph.

138 chars
Image3:2

Travel postcard

A watercolor postcard illustration of a mountain village in autumn, red roofs, winding footpath, muted gold foliage, no text.

125 chars
Image1:1

Packaging concept

A minimalist cylindrical tea tin in sage green on a warm grey studio background, subtle embossed leaf pattern, front three-quarter view, no logos.

146 chars
Image3:4

Story illustration

A small fox carrying a lantern across a snowy bridge at dusk, hand-painted storybook style, warm amber light and cool blue shadows.

131 chars
Image1:1

Food still life

Top-down food photograph of three figs on a cream ceramic plate, wrinkled linen napkin, soft side lighting, simple balanced composition.

136 chars
Image9:16

Campaign background

Abstract paper-cut landscape with layered coral and indigo hills, small golden sun, open central space for later typography, crisp edges.

137 chars

Nano Banana 2 API · Pricing

Output prices compare one 1:1 image at the same resolution with zero reference images. Prices are in USD.

+10%
Top up $1,500+ and get 10% bonus credits.
View top-up options
ResolutionAPIstable standardFinal fallbackWaveSpeedfal
0.5KWith bonus ≈ $0.017 / imageRegular $0.019 / image3.8 credits / imageWith bonus ≈ $0.060 / imageRegular $0.066 / image13.2 credits / image$0.045 / image160.5% more than APIstable$0.06 / image247.4% more than APIstable
1KWith bonus ≈ $0.014 / imageRegular $0.015 / image3 credits / imageWith bonus ≈ $0.080 / imageRegular $0.088 / image17.6 credits / image$0.07 / image413.3% more than APIstable$0.08 / image486.7% more than APIstable
2KWith bonus ≈ $0.016 / imageRegular $0.0175 / image3.5 credits / imageWith bonus ≈ $0.120 / imageRegular $0.132 / image26.4 credits / image$0.105 / image560% more than APIstable$0.12 / image654.3% more than APIstable
4KWith bonus ≈ $0.020 / imageRegular $0.0225 / image4.5 credits / imageWith bonus ≈ $0.160 / imageRegular $0.176 / image35.2 credits / image$0.14 / image584.4% more than APIstable$0.16 / image682.2% more than APIstable
  • Final fallback is opt-in. We reserve the highest authorized amount and charge only successful outputs at the tier used. Unused credits are released, and existing tasks keep their saved prices.
/ API

Nano Banana 2 API · API integration

The request follows the form. The website uses your session; API clients use your API key. See the docs for parameters, task creation and task queries.

  1. Prepare input

    Write a prompt and optionally add references.

  2. Review the quote

    Choose resolution, output count and optional fallback. Review the account quote before submitting.

  3. Retrieve images

    Query the returned task ID or receive a signed callback. Save result images within 14 days.

Parameter
Description
modelnano-banana-2
inputImage generation parameters.
input.promptDescribe the image or edit. Limits depend on the model; see the schema.
input.resolution0.5K / 1K / 2K / 4K
input.aspect_ratioAuto / 1:1 / 4:3 / 3:4 / 16:9 / 9:16 / 3:2 / 2:3 / 21:9 / 4:5 / 5:4 / 1:4 / 4:1 / 1:8 / 8:1
{
  "model": "nano-banana-2",
  "input": {
    "prompt": "Editorial travel photograph of a whitewashed Mediterranean coastal village above turquoise water at golden hour, winding stone steps, blue shutters, pink bougainvillea, layered foreground and distant horizon, clear natural color, no text.",
    "resolution": "1K",
    "aspect_ratio": "auto",
    "image_urls": [],
    "google_search": false,
    "google_image_search": false,
    "output_count": 1,
    "official_fallback": false,
    "nsfw_check": true
  }
}

The request follows the form. The website uses your session; API clients use your API key. See the docs for parameters, task creation and task queries.

/ Compare

Find the Nano Banana model for your workflow

Compare five models by what you want to create, how you edit and the output size you need. All five support text prompts and reference images through APIstable.

ModelStrengths and best usesOutput size
Nano BananaKeeps familiar subjects recognizable through prompt-based edits and combines elements from several photos. Suits 1K product mockups, style experiments and simple retouching.1K
Nano Banana ProHandles complex layouts, multilingual typography and detailed visual briefs. Suits finished posters, infographics and production assets that benefit from 4K.1K / 2K / 4K
Nano Banana 2You’re hereBalances rapid iteration with subject consistency and detailed output. Use 0.5K for early drafts and up to 4K for campaign visuals or storyboards.0.5K / 1K / 2K / 4K
Nano Banana 2 LiteOptimized for fast 1K drafts and lightweight reference edits. Suits reviewing variations of product scenes, thumbnails and social posts.1K
Nano Banana 2.1Emphasizes targeted edits, character and product consistency, and multilingual layout. Suits refining product imagery, adapting campaign graphics and editing across several references.1K / 2K / 4K
/ FAQ

Nano Banana 2 API FAQ

Find answers about pricing, generation results, and API access.

What can I create?

Explore compositions from 0.5K through 4K, with text generation and reference editing in one task API.

Which resolutions are available?

0.5K, 1K, 2K, 4K. Choose the resolution before submitting.

How do reference edits work?

Add public HTTPS URLs in image_urls and explain what to change and preserve. Outputs are not guaranteed to preserve every pixel.

Can I request several images?

Yes, output_count supports 1–4 independent items. Only successful items are charged.

How is the price calculated?

Each resolution has a fixed standard and fallback price. Credits round up to 0.1 per successful image.

Is fallback automatic?

Only if fallback is explicitly enabled and the preceding channel definitely fails. Unknown acceptance does not trigger another generation.

Why is a completed image still processing?

Result storage may still be recovering. Keep polling the original task instead of creating a duplicate. Supplier billing is reconciled separately.

Can I choose a seed or output format?

The API supports Google text search and image search. Image search requires text search to be enabled.

What if generation fails?

Failed items release their reserved credits. Daily cleanup fails unfinished items older than 24 hours at 00:00 Asia/Shanghai.

Will text and identities always be exact?

No. Check spelling, small details and likeness before use. Describe targeted edits and review each result.

How long are results retained?

Generated results are retained for 14 days. Download or copy them to your own storage.

Are these gallery prompts verified outputs?

These are editable prompt recipes, not verified model outputs. The model cover is concept artwork.

CREATE IMAGES

Try Nano Banana 2 now

Write a prompt or add references to generate an image.