Nano Banana API for Developers
Nano Banana API
Generate and edit images with Nano Banana via API. Precise, realistic results with native editing capabilities — no GPU setup required.
Free to start
No watermarks on paid plans
Subscription or usage-based
Auto-scaling

Floor plan

House model

Male portrait

Female portrait

Product shot

Polaroid photo

Comic art
Trusted by teams at














Everything You Need to Ship Nano Banana
Generation and editing in one model with up to 4K output.
Generate & Edit
Both text-to-image generation and native image editing in one model.
Up to 4K Output
Generate at 1K, 2K, or 4K resolution for production-grade assets.
Realistic Results
Precise, realistic outputs with consistent quality across generations.
Native Editing
Edit existing images with prompt-based modifications — no separate editing model needed.
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 AI image generation and editing 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 text prompt to the AI image generator endpoint and select the nano-banana 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 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",
name="Nano Banana",
resolution="1k",
)SDKs for Every Stack
Official open-source SDKs with full TypeScript/type support. Install and start building.
Nano Banana 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 API to power real products.
Product Photography
Generate realistic product images and edit existing catalog photos.
Marketing Asset Creation
Create and refine marketing visuals with generation and editing in one workflow.
Social Media Content
Produce polished social media images with consistent quality.
Portrait & Headshot
Generate professional portrait images with natural lighting and clean backgrounds.
Design Iteration
Rapidly generate and edit design concepts in a single workflow.
Content at Scale
Power image generation pipelines with balanced quality-to-cost ratio.
Try before integrating
Try Nano Banana 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 API — Frequently Asked Questions
Magic Hour's Nano Banana API lets developers generate and edit images via REST API with SDKs for Python, Node.js, Go, and Rust.
Nano Banana supports both text-to-image generation and native image editing — object removal, style changes, and prompt-based modifications.
25/40/50 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.
Use Nano Banana for quick ideation and drafts. Use Nano Banana 2 for demanding text, logic, or client-critical detail.
Yes. Generate images and then use editing capabilities to refine them — all through the same API.
Official SDKs for Python, Node.js, Go, and Rust.