Nano Banana 2 API — Gemini Image Editing
Google Gemini's image editing model via REST API. No GCP setup, free API key.

Why teams ship with Nano Banana 2
Nano Banana 2
Google Gemini's image editing model
Nano Banana 2 is Google's newer image editing release in the Gemini family — sharper outputs, better text rendering inside images, and stronger multi-subject composition vs. the original Nano Banana.
Instruction-based edit
Edit with natural language
Pass an existing image plus a plain-English instruction and the model performs the edit. No prompt-engineering hacks required: 'replace the background with a sunlit kitchen' just works.
Character consistency
Keep subjects identical across edits
Generate variations of the same character, product, or scene without identity drift. Essential for storyboards, ad variants, and avatar workflows.
Multi-image composition
Combine multiple reference images
Pass two or more init images and the model blends them into a single coherent output. Ideal for try-on, scene composition, and creative assembly use cases.
Single REST endpoint
No GCP, no service accounts
One API key, one POST request. ModelsLab handles the GCP plumbing so your team ships features instead of provisioning infrastructure.
Resolution
1024px and 2048px outputs
Generate at 1024×1024 for fast iteration, scale up to 2048×2048 for hero assets. Pair with the Real-ESRGAN API for 4x super-resolution to print-ready dimensions.
Async support
Webhook delivery for batch
Submit batches of edits and receive webhook callbacks as each completes. Perfect for catalog edits, bulk photo retouching, and marketing content pipelines.
Unified billing
Same API key across modalities
Use Nano Banana 2 alongside the image, video, audio, and LLM APIs on a single dashboard, single bill, single API key.
Examples
Nano Banana 2 image edit examples
Copy any prompt below and try it yourself in the playground.
Lighting Transformation
“Change this daytime landscape to golden hour sunset lighting. Keep the mountains sharp and increase the warmth of the sky to deep orange and pink tones.”
Background Replacement
“Replace the background with a modern minimalist office space. Keep the person in the foreground sharp and well-lit, matching the new indoor lighting.”
Style Transfer
“Apply the cinematic color grading and film grain from this reference photo to the product image. Maintain all product details and proportions.”
Object Removal
“Remove the power lines from this architectural photograph. Fill the sky naturally while preserving the building's sharp details and original lighting.”
For Developers
A few lines of code.
Image editing in one POST
ModelsLab handles the infrastructure: fast inference, auto-scaling, and a developer-friendly API. No GPU management needed.
- Serverless: scales to zero, scales to millions
- Pay per image, no minimums
- Python and JavaScript SDKs, plus REST API
import requestsresponse = requests.post("https://modelslab.com/api/v7/images/image-to-image",json={"key": "YOUR_API_KEY","prompt": "The girl in image 1 and the dog in image 2 together in same frame, in living room, sofa in the background","init_image": "","aspect_ratio": "1:1"})print(response.json())
Ready to create?
Start generating with Nano Banana 2 API — Gemini Image Editing on ModelsLab.