Nano Banana 2 Lite API: Pricing, Code & Integration Guide
Google's Nano Banana 2 family now has a fast, cheap tier built for volume: Nano Banana 2 Lite, officially Gemini 3.1 Flash Lite Image. The Nano Banana 2 Lite API generates images in roughly 4 seconds at $0.034 per 1K-resolution image — Google's stated drop-in replacement for the original Nano Banana model. This guide covers everything you need to integrate the Nano Banana 2 Lite API through Muapi: what the model does differently from full Nano Banana 2, the complete parameter reference, real pricing math, async polling, error handling, and production-scale batch patterns.
What Is Nano Banana 2 Lite?
Where Nano Banana 2 Lite Fits in the Lineup
Nano Banana 2 Lite is Google's fastest, most cost-efficient text-to-image model in the Gemini Image lineup. Google positions the Nano Banana 2 Lite API for near-real-time, high-volume workflows — rapid ideation, interactive prototyping, and visual drafting at scale — where latency and per-image cost matter more than squeezing out the last bit of fidelity.
The lineup runs Pro (highest quality, slowest) → Nano Banana 2 (balanced, multi-image composition) → Nano Banana 2 Lite (fastest, cheapest). Lite is purpose-built for the same kind of high-volume use case that Seedance 2 Mini serves on the video side: e-commerce drafts, social content thumbnails, rapid prompt iteration, and any pipeline that needs dozens or hundreds of variants without burning through budget.
Despite the speed focus, Google's own announcement is explicit that the model keeps the qualities that made the Nano Banana line popular in the first place:
- Reliable prompt adherence — descriptive prompts still produce tight, on-target results
- Strong character consistency — recognizable subjects across generations
- Legible in-image text rendering — readable text baked into the image, not garbled
Google recommends Nano Banana 2 Lite as a direct replacement for the original Nano Banana (gemini-2.5-flash-image), citing better quality, faster speed, and a lower price than the model it succeeds. The trade-off versus full Nano Banana 2 and Nano Banana 2 Pro is headroom: Lite is a single-image text-to-image model, not a multi-image compositor, and it won't hold up as well under close inspection on complex, detail-dense scenes.
Where Nano Banana 2 Lite Is Available
Outside of Muapi, Google ships Nano Banana 2 Lite through Google AI Studio, the Gemini API, the Gemini Enterprise Agent Platform, and consumer surfaces like Search AI Mode, the Gemini app, NotebookLM, and Google Photos. Calling it through the Nano Banana 2 Lite API on Muapi gives you a single unified REST endpoint, USD billing, and no Google Cloud account or quota negotiation required.
Technical Specifications
Output Specs
| Spec | Value |
|---|---|
| Provider | |
| Model | Gemini 3.1 Flash Lite Image |
| Resolution | 1K |
| Aspect Ratios | 1:1, 2:3, 3:2, 4:3, 3:4, 9:16, 16:9, Auto |
| Output Format | JPG or PNG |
| Typical Latency | ~4 seconds |
| Cost | $0.034 per image |
Input Parameters
| Parameter | Type | Description |
|---|---|---|
prompt | string | Required. Description of the desired image — subject, setting, lighting, style, mood. Specific descriptions produce tighter results given the model's strong prompt adherence. |
aspect_ratio | string | 1:1, 2:3, 3:2, 4:3, 3:4, 9:16, 16:9, or Auto. Default 1:1. |
output_format | string | jpg or png. Default jpg. |
Auto lets the model infer the best aspect ratio from your prompt text rather than forcing a fixed frame — useful when you're generating a batch of varied subjects and don't want to pre-decide framing for each one.
How to Call the Nano Banana 2 Lite API via Muapi
Authentication and Base URL
All requests use Bearer token auth. Get your key from the Muapi dashboard.
Base URL: https://muapi.ai/api/v1
Auth: Authorization: Bearer YOUR_API_KEY
The Nano Banana 2 Lite API on Muapi is asynchronous — every POST returns a request_id, not a finished image. You then poll a separate endpoint until the job completes. Never re-POST the same request after receiving a request_id — that creates a duplicate generation and charges your account twice.
Text-to-Image Request
# cURL
curl -X POST https://muapi.ai/api/v1/nano-banana-2-lite \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A sun-drenched Mediterranean courtyard with terracotta pots and bougainvillea, golden afternoon light, photorealistic.",
"aspect_ratio": "16:9",
"output_format": "jpg"
}'
# Response: { "request_id": "req_abc123", "status": "processing" }
# Python
import requests
response = requests.post(
"https://muapi.ai/api/v1/nano-banana-2-lite",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"prompt": "A sun-drenched Mediterranean courtyard with terracotta pots and bougainvillea, golden afternoon light, photorealistic.",
"aspect_ratio": "16:9",
"output_format": "jpg",
},
)
request_id = response.json()["request_id"] # save this — needed to poll
Auto Aspect Ratio Request
When you're generating a batch of visually different subjects and don't want to hardcode framing per prompt, let the model decide:
# cURL
curl -X POST https://muapi.ai/api/v1/nano-banana-2-lite \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Macro shot of dew drops on a spider web at sunrise, shallow depth of field.",
"aspect_ratio": "Auto",
"output_format": "png"
}'
# Python
response = requests.post(
"https://muapi.ai/api/v1/nano-banana-2-lite",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={
"prompt": "Macro shot of dew drops on a spider web at sunrise, shallow depth of field.",
"aspect_ratio": "Auto",
"output_format": "png",
},
)
request_id = response.json()["request_id"]
Async Polling, Job Status, and Error Handling
Polling for Results
Poll GET /predictions/{request_id}/result every 2–3 seconds. Budget around 4 seconds for a typical Nano Banana 2 Lite API call — there's no need for the long timeout windows you'd set for video models.
# Python — polling loop with timeout
import time, requests
def poll_result(request_id, api_key, timeout=30, interval=2):
url = f"https://muapi.ai/api/v1/predictions/{request_id}/result"
headers = {"Authorization": f"Bearer {api_key}"}
deadline = time.time() + timeout
while time.time() < deadline:
r = requests.get(url, headers=headers)
data = r.json()
status = data.get("status")
if status in ("succeeded", "completed"):
return data["output"]["image"] # image URL
elif status in ("failed", "error"):
raise RuntimeError(f"Job failed: {data.get('error')}")
time.sleep(interval)
raise TimeoutError(f"Job {request_id} did not complete within {timeout}s")
HTTP Error Reference
| Code | Cause | What to Do |
|---|---|---|
400 | Invalid params — bad aspect_ratio, missing prompt | Fix request params, do not retry |
402 | Insufficient balance | Top up at muapi.ai/topup |
422 | Prompt policy violation — copyrighted character, face detection | Revise prompt |
429 | Rate limit exceeded | Wait for Retry-After header, then retry |
5xx | Server error | Exponential backoff, max 3 retries |
# Python — generation with retry logic
def generate_with_retry(payload, api_key, max_retries=3):
url = "https://muapi.ai/api/v1/nano-banana-2-lite"
headers = {"Authorization": f"Bearer {api_key}"}
for attempt in range(max_retries):
r = requests.post(url, headers=headers, json=payload)
if r.status_code == 200:
return r.json()["request_id"]
elif r.status_code == 429:
time.sleep(int(r.headers.get("Retry-After", 30)))
elif r.status_code in (400, 402, 422):
r.raise_for_status() # client error — do not retry
else:
time.sleep(2 ** attempt) # exponential backoff for 5xx
raise RuntimeError("Max retries exceeded")
Key rule for the Nano Banana 2 Lite API: only retry the POST if you received a 5xx with no request_id in the response. If you got a request_id, poll that job — it may still be processing.
Pricing and Cost Planning
Muapi charges a flat rate per generated image. No subscription required.
| Resolution | Cost per Image | 10 Images | 100 Images | 1,000 Images |
|---|---|---|---|---|
| 1K | $0.034 | $0.34 | $3.40 | $34.00 |
Because the cost is flat regardless of aspect ratio or output format, the only real lever for cost control with the Nano Banana 2 Lite API is generation count — batch your drafts, pick winners, and avoid blindly regenerating identical prompts. For comparison, full Nano Banana 2 costs noticeably more per image; a 100-image batch that costs $3.40 on Lite costs several times that on the full model. See muapi.ai/topup for prepaid credit tiers.
Production Workflow Patterns
Wide-Then-Narrow Drafting
The most cost-efficient pattern with the Nano Banana 2 Lite API separates wide exploration from final selection:
- Draft pass: Generate 10–20 prompt variants at $0.034 each (~$0.34–$0.68 total)
- Review: Pick the best 1–3 outputs
- Final pass: Either ship the Lite output directly, or re-run the winning prompt on full Nano Banana 2 for a higher-fidelity final asset
This pattern mirrors the draft-to-final pipelines used for video models like Seedance — cheap, fast iteration up front, with spend concentrated only on what's actually shipped.
Batch Production for Thumbnails and Product Drafts
For thumbnail or product-shot batches, cap concurrency at 5–10 simultaneous jobs to stay within rate limits:
from concurrent.futures import ThreadPoolExecutor, as_completed
def make_image(prompt, api_key, aspect_ratio="1:1"):
request_id = generate_with_retry(
{"prompt": prompt, "aspect_ratio": aspect_ratio, "output_format": "jpg"},
api_key,
)
return poll_result(request_id, api_key)
prompts = [
"Minimalist product shot of a ceramic mug, studio lighting, white background",
"Same mug, lifestyle context, wooden kitchen counter, morning light",
"Same mug, flat-lay composition with coffee beans scattered around",
]
with ThreadPoolExecutor(max_workers=8) as executor:
futures = {executor.submit(make_image, p, API_KEY): p for p in prompts}
for f in as_completed(futures):
print(f"Ready: {f.result()}") # download promptly
Pairing with Full Nano Banana 2
A common pipeline uses the Nano Banana 2 Lite API to explore composition and framing cheaply, then hands the winning prompt and seed concept to full Nano Banana 2 for multi-image composition work — placing the drafted subject into a real product photo, blending references, or applying style transfer. Lite settles "what should this look like" before you pay for "make this production-ready."
Nano Banana 2 Lite vs. the Rest of the Lineup
| Model | Speed | Cost | Best For |
|---|---|---|---|
| Nano Banana 2 Lite | ~4s | $0.034/image | High-volume drafting, prototyping, budget pipelines |
| Nano Banana 2 | Slower | Higher | Multi-image composition, style transfer, scene assembly |
| Nano Banana 2 Pro | Slowest | Highest | Maximum fidelity, complex multi-element scenes |
If your pipeline generates dozens or hundreds of variants per session — A/B testing thumbnails, drafting product shots, or iterating on a creative brief — the Nano Banana 2 Lite API's per-image economics make that volume affordable. Step up to full Nano Banana 2 when a single shot needs to combine multiple reference images or survive close inspection at full size.
Alternatives and When to Use Nano Banana 2 Lite
Nano Banana 2 Lite is the right choice when iteration speed and cost matter more than maximum fidelity. Here's how it compares to other fast text-to-image options on Muapi:
| Model | Strength | Use Instead of Nano Banana 2 Lite When |
|---|---|---|
| Nano Banana 2 | Multi-image composition, higher fidelity | Final hero assets, blending/reference workflows |
| Nano Banana 2 Pro | Maximum detail and complex scenes | Dense, multi-element compositions |
| Seedance 2 Mini | Fast, cheap video instead of stills | You need motion, not a static image |
For the full multi-image composition workflow, see the Nano Banana 2 guide. Try the Nano Banana 2 Lite API interactively at muapi.ai/playground/nano-banana-2-lite.
FAQ
How fast is the Nano Banana 2 Lite API compared to full Nano Banana 2?
Google states Nano Banana 2 Lite delivers text-to-image output in about 4 seconds, making it the fastest model in the Nano Banana family. Full Nano Banana 2 and Nano Banana 2 Pro take longer per generation in exchange for stronger multi-image composition and finer detail handling. For most high-volume drafting use cases, the speed difference compounds fast — generating 50 drafts on Lite finishes in a few minutes, not tens of minutes.
Is Nano Banana 2 Lite a replacement for the original Nano Banana?
Yes — Google explicitly recommends Nano Banana 2 Lite as a direct replacement for the original Nano Banana (gemini-2.5-flash-image), citing better quality, faster generation, and a lower price point than the model it succeeds. If you have an existing integration against the original Nano Banana endpoint, switching to the Nano Banana 2 Lite API on Muapi is a drop-in upgrade with the same request shape.
Does the Nano Banana 2 Lite API support image editing or multi-image input?
No. The Nano Banana 2 Lite API endpoint on Muapi is text-to-image only — it takes a prompt and returns a generated image. For image editing, multi-image blending, or reference-based generation, use the full Nano Banana 2 or Nano Banana 2 Edit endpoints instead.
What aspect ratios does the Nano Banana 2 Lite API support?
1:1, 2:3, 3:2, 4:3, 3:4, 9:16, 16:9, and Auto. Auto lets the model choose the best framing based on your prompt, which is useful for batch generation across visually varied subjects where you don't want to pre-decide framing per prompt.
How much does the Nano Banana 2 Lite API cost per image?
$0.034 per 1K-resolution image, billed from prepaid Muapi credit with no subscription required. Pricing is flat regardless of aspect ratio or output format — 100 images costs $3.40 whether they're square thumbnails or 16:9 banners.
What is the correct way to avoid duplicate charges when retrying?
The async pattern means every successful POST creates and bills a new generation job. Only retry a POST if you received a 5xx error and no request_id was returned. If you received a request_id, poll that job — it may still be processing. The most common mistake is wrapping the POST in a blanket retry loop; this generates and charges duplicate jobs silently.
Can I use PNG output for transparency or lossless quality?
Yes. Set output_format to png for lossless output; the default is jpg, which produces smaller files and is the better choice for high-volume drafting where file size and bandwidth matter more than per-pixel precision.




