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
Nano Banana example: top-down 3D residential floor plan with rooms, staircase, and layout labels
Floor plan
Nano Banana example: miniature greenhouse-style building model on blueprints in warm sunlight
House model
Nano Banana example: headshot of a man with curly hair and a charcoal sweater on a gray backdrop
Male portrait
Nano Banana example: soft-lit portrait of a woman in a cream turtleneck with hands near her face
Female portrait
Nano Banana example: dramatic product shot of a milk bottle with splashes, almonds, and ice
Product shot
Nano Banana example: Polaroid-style frame with warm indoor portrait and wood paneling
Polaroid photo
Nano Banana example: open comic book with colorful panels and a stylized penguin character
Comic art

Trusted by teams at

meta
nba
loreal
puma
cisco
deel
shopify
decathlon
dallas-mavericks
pittsburgh-pirates
tala
dyson
dazn
wsc-sports

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.
Get Started Free

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",
)
API Docs

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.

Start Building with the Magic Hour Nano Banana API

Free credits on signup. SDKs for Python, Node.js, Go, and Rust. Production-ready in minutes.