Enjoy 50% OFF Vidu Q3 & Q3 Pro models • Only on WaveSpeedAI | May 20 – Jun 2
Google·image·From $0.045/run

Nano Banana 2 API

Google Gemini 3.1 Flash Image — fast, affordable image generation tuned for high-volume creator and mobile workflows.

Nano Banana 2 sample output

About the Nano Banana 2 API

What Nano Banana 2 does, how it fits in the Google model lineup, and why teams reach for it.

Nano Banana 2 is a image generation and editing model from Google, available through the WaveSpeedAI REST API. Google Gemini 3.1 Flash Image — fast, affordable image generation tuned for high-volume creator and mobile workflows.

The Nano Banana 2 family on WaveSpeedAI ships 4 REST endpoints covering Text-To-Image, Image-To-Image workflows. Each variant carries its own pricing, parameter knobs, and example outputs — pick the one that matches your input modality and production constraints, or call several from the same API key to compose multi-step pipelines.

Run Nano Banana 2 through the same API key, billing account, and rate-limit envelope you use for the other 1,000+ AI models on WaveSpeedAI. No separate vendor setup, no per-provider SDKs, no per-vendor rate-limit envelopes — one integration covers everything from text-to-image and text-to-video through audio synthesis, 3D generation, upscaling, and editing.

All Nano Banana 2 API endpoints

4 endpoints available now on WaveSpeedAI — pick the variant that matches your workflow.

See Nano Banana 2 in action

Real outputs generated by the Nano Banana 2 API. Hover any video to preview, click to open the full-size viewer.

How to use the Nano Banana 2 API

Four steps from signup to a finished generation. Full Python, Node.js, and cURL examples are in the API section below.

  1. 1

    Get an API key

    Sign up for a WaveSpeedAI account and copy your API key from the dashboard. New accounts come with free starter credits — enough to run the playground a few dozen times before billing kicks in.

  2. 2

    Submit a prediction

    POST your input as JSON to https://api.wavespeed.ai/api/v3/google/nano-banana-2/text-to-image. The endpoint returns a prediction id immediately — generations are async so you don't hold an open connection during inference.

  3. 3

    Poll for completion

    GET https://api.wavespeed.ai/api/v3/predictions/{request_id}/result every 1-2 seconds. The response includes a status field; keep polling until it flips from "queued" or "processing" to "completed".

  4. 4

    Read the output URL

    Once status is "completed", read the URL from data.outputs[0]. The URL points to your generated media on the WaveSpeedAI CDN — image, video, audio, or 3D file depending on the Nano Banana 2 variant you called.

What you can build with Nano Banana 2

Common workflows developers and creators use the Nano Banana 2 API for.

High-volume marketing creatives

Generate dozens of ad variants from a single brief — fast turnaround, low per-image cost makes Nano Banana 2 the right pick for A/B testing pipelines.

marketingadsa/b

Mobile-first creator workflows

Optimized for fast generation on lower-spec devices — suitable for phone-first creator apps where round-trip latency matters more than peak quality.

mobilecreatorfast

Social media post variations

Spin out platform-sized variants (1:1 Instagram, 9:16 Stories/Reels, 16:9 LinkedIn) from one prompt in seconds.

socialinstagramreels

Educational illustrations

Quick blog-post or tutorial imagery — accurate text rendering means diagrams and labelled illustrations come out usable.

blogeditorialillustration

Prototype UI mockups

Generate placeholder screenshots, app store imagery, or product UI sketches for design reviews.

uiprototypemockup

Tips for prompting Nano Banana 2

Practical advice for getting better outputs from Nano Banana 2 — drawn from the patterns that work across image models in production pipelines.

Describe lighting, composition, and style — not just subject

Move past 'a cat' to 'a tabby cat on a windowsill, soft afternoon light streaming in, shallow depth of field, cinematic 35mm composition'. Subject + scene + lighting + camera language is the prompt formula that pulls best from image-model training data.

Use style anchors instead of artist names

'In the style of editorial photography' or 'studio product shot, white seamless background' beats vague 'high quality, masterpiece' boilerplate AND avoids the legal / licensing concerns that come with naming living artists in commercial work.

Specify resolution and aspect ratio explicitly

Don't rely on defaults. Set the target aspect ratio (1:1, 4:3, 16:9) and resolution up front. Cropping or upscaling later loses fidelity that the model could have placed correctly in the first generation.

Iterate on a locked seed before re-rolling

Lock the seed, change one prompt element at a time. Much faster than re-rolling random seeds for every change — you isolate cause-and-effect on each prompt edit and reach the target image with fewer total generations.

Use the edit endpoint for refinements, not full re-generation

Generate the base image once, then use the model's edit / inpaint endpoint to refine specific elements — text, lighting, individual subjects. Edits preserve everything you liked about the base and cost less per iteration than full re-generations.

Nano Banana 2 API pricing

Pricing is per-output. The final charge scales with the parameters you set in each variant's playground (resolution, duration, output count, references).

EndpointTypeStarting price
google/nano-banana-2/text-to-image-fasttext-to-image$0.045
google/nano-banana-2/text-to-imagetext-to-image$0.070
google/nano-banana-2/edit-fastimage-to-image$0.045
google/nano-banana-2/editimage-to-image$0.070

Call the Nano Banana 2 API

Sign up for an API key at wavespeed.ai/accesskey, then submit a prediction via REST. The playground generates ready-to-paste samples for any combination of inputs.

HTTP example
# 1. Submit a prediction
curl -X POST "https://api.wavespeed.ai/api/v3/google/nano-banana-2/text-to-image" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY" \
  -d '{}'

# 2. Poll the result until status = "completed"
curl -X GET "https://api.wavespeed.ai/api/v3/predictions/{request_id}/result" \
  -H "Authorization: Bearer $WAVESPEED_API_KEY"

# Read the output URL from data.outputs[0].
Node.js example
// npm install wavespeed
const WaveSpeed = require('wavespeed');
const client = new WaveSpeed(); // reads WAVESPEED_API_KEY

const result = await client.run("google/nano-banana-2/text-to-image", {});
console.log(result.outputs[0]); // → URL of the generated output
Python example
# pip install wavespeed
import wavespeed

output = wavespeed.run(
    "google/nano-banana-2/text-to-image",
    {}
)
print(output["outputs"][0])  # → URL of the generated output

Nano Banana 2 vs alternatives

When to pick Nano Banana 2 over similar models on WaveSpeedAI.

Nano Banana 2 vs Nano Banana Pro

Pro ships 4K + 14-input multi-image editing and the strongest text rendering of any image model. Nano Banana 2 is the faster, cheaper sibling for high-volume work where 1K-2K output is fine and you don't need multi-subject composition.

Nano Banana 2 vs GPT Image 2

GPT Image 2 leads on photorealism and instruction-following accuracy, and ships with the cleanest commercial-use license. Nano Banana 2 wins on speed, cost-per-image, and text rendering quality at lower resolutions.

Nano Banana 2 vs Seedream 5 Lite

Both target the cost-optimized image-gen tier. Seedream 5 Lite handles CJK text and Asian-context prompts better; Nano Banana 2 handles English text rendering and Western editorial styles better.

Nano Banana 2 API — Frequently asked questions

Pricing, license, integration — common questions about running Nano Banana 2 on WaveSpeedAI.

What is the Nano Banana 2 API?

Nano Banana 2 is a Google image generation model exposed as a REST API on WaveSpeedAI. Google Gemini 3.1 Flash Image — fast, affordable image generation tuned for high-volume creator and mobile workflows. You can call it programmatically or try it from the playground linked above.

How do I call the Nano Banana 2 API?

Sign up for a WaveSpeedAI account, copy your API key from /accesskey, then POST to https://api.wavespeed.ai/api/v3/google/nano-banana-2/text-to-image with your input as JSON. The endpoint returns a prediction id; poll the prediction endpoint until status flips to "completed", then read the output URL from data.outputs[0]. Full Python / Node.js / cURL examples are above.

How much does the Nano Banana 2 API cost?

Nano Banana 2 starts at $0.045 per run. The exact cost scales with the parameters you set (resolution, duration, output count, references). The live cost preview next to the Generate button in the playground shows the exact price for your current input.

Which Nano Banana 2 variants are available?

WaveSpeedAI hosts 4 Nano Banana 2 endpoints: google/nano-banana-2/text-to-image-fast, google/nano-banana-2/text-to-image, google/nano-banana-2/edit-fast, google/nano-banana-2/edit. Each variant has its own playground page and pricing.

Can I use Nano Banana 2 outputs commercially?

Commercial usage rights follow the Google model license. Most Google models permit commercial output use; see each model's playground page for the specific license summary, and WaveSpeedAI's Terms of Service for platform-level conditions.

Why use Nano Banana 2 on WaveSpeedAI instead of going direct?

One API key + one billing account across Nano Banana 2 AND 1,000+ other AI models from other providers. No per-vendor SDK setup, no separate rate-limit envelopes, no rewrite-per-vendor integration code. Pricing is typically at parity with or below Google's direct API.

About Google

The team behind Nano Banana 2 and the broader Google model lineup on WaveSpeedAI.

Google's AI work happens primarily at Google DeepMind and Google Research. Its image and video models — Imagen, Veo, and Gemini-family multimodal models like Nano Banana (Gemini 3 Image) — share architecture and training infrastructure with the broader Gemini lineup. Outputs are noted for accurate text rendering, broad style coverage, and commercial-grade licensing.

Start building with Nano Banana 2 on WaveSpeedAI

Free starter credits on signup. One API key across 1,000+ AI models from Google and every other provider.