Nano Banana 2 API for Developers
Nano Banana 2 API
Generate and edit production-ready images with Nano Banana 2 via API. Stronger instruction following, subject consistency, and detail precision — no GPU setup required.
Free to start
No watermarks on paid plans
Subscription or usage-based
Auto-scaling

Hybrid generation

Surreal cityscape

Ethereal portrait

Cinematic subway

Style fusion

Tropical resort

F1 showroom

Eiffel symmetry
Trusted by teams at














Everything You Need to Ship Nano Banana 2
Production-ready image generation with stronger instruction following.
Instruction Following
Stronger prompt adherence than Nano Banana — more precise control over output details.
Subject Consistency
Better consistency across multiple generations for campaigns and batch workflows.
Production-Ready Output
Higher fidelity results suitable for client delivery and commercial production.
Native Editing
Edit existing images with prompt-based modifications built into the model.
Auto-Scaling Infrastructure
Scales compute to match demand automatically. No GPU provisioning or cold starts.
Commercial-Ready
Paid plans support non-watermarked outputs for commercial delivery.
Integrate in 3 Steps
Add production-grade AI image generation to your app in minutes.
1
Get Your API Key
Sign up free and generate an API key from the Developer dashboard. You get free credits to start.
2
Send Your Request
Pass a detailed text prompt to the AI image generator endpoint and select the nano-banana-2 model. For editing, include a source image.
3
Get Results & Scale
Receive generated or edited images via response. Deploy to production — infrastructure scales automatically.
Code Examples
Nano Banana 2 in a few lines of code. Install an SDK or use the REST API directly.
from magic_hour import Client
from os import getenv
client = Client(token=getenv("API_TOKEN"))
res = client.v1.ai_image_generator.generate(
image_count=1,
style={
"prompt": "A surreal landscape at golden hour with layered clouds",
"tool": "general",
},
aspect_ratio="1:1",
model="nano-banana-2",
name="Nano Banana 2",
resolution="1k",
)SDKs for Every Stack
Official open-source SDKs with full TypeScript/type support. Install and start building.
Nano Banana 2 API Pricing
Subscription plans for standard usage.
Prefer usage-based pricing?
Email us or message us in Intercom and we will set up your usage-based pricing.
API Calculator
Use our calculator to estimate your API costs.
Tier
Estimated monthly cost
$1.73
Based on 24 FPS
Built for Builders
See how developers use the Nano Banana 2 API to power real products.
Client-Ready Creative
Generate production-quality images for client delivery and commercial campaigns.
Product Photography
Create precise product images with strong instruction following for e-commerce.
Brand Consistency
Generate brand-consistent visual assets with repeatable quality across campaigns.
Marketing Production
Create polished marketing visuals with detail control for A/B testing and personalization.
Design Systems
Generate consistent UI and design assets with reliable instruction following.
Professional Portraits
Create detailed, consistent portrait images for professional use cases.
Try before integrating
Try Nano Banana 2 Free — No Code Required
Test quality first with the free tool, then plug the same output quality into your app with the API when you are ready.
Nano Banana 2 API — Frequently Asked Questions
Magic Hour's Nano Banana 2 API lets developers generate and edit images via REST API with SDKs for Python, Node.js, Go, and Rust.
Nano Banana 2 offers stronger instruction following, better subject consistency, and higher detail precision. It costs more but produces more production-ready output.
50/75/100 credits per image at 1K/2K/4K resolution.
Yes. Free users can generate at 1K resolution.
1K, 2K, and 4K for both generation and editing.
Yes. Nano Banana 2 supports text-to-image generation and native image editing through the same API.
Use Nano Banana 2 for most production workflows. Use Nano Banana Pro for the highest-quality output with maximum creative control.
Official SDKs for Python, Node.js, Go, and Rust.