Skip to main content
Nano Banana Pro Edit: professional 4K image editing
  • Stable model ID: gemini-3-pro-image
  • LaoZhang API price: currently $0.09/call; confirm price and charges in the console
  • Editing capabilities: Local edits, style transfer, multi-image fusion, text redraw, and complex composition
  • Production contracts: OpenAI-compatible and Gemini-native formats

API Console

Create an API key, review balance, and inspect call logs

🚀 Live Demo

YingTu AI - Try instantly, no code required
Use the image generation API guide to compare every route. LaoZhang API provides one global HTTPS endpoint and call logs without a fixed low gateway concurrency plan; final throughput still depends on Google upstream capacity, account state, and safety policy.

Prerequisites

1

Get API Key

Login to laozhang.ai console to get your API key
2

Configure Billing Mode

Edit token settings and select one of these billing modes (same price):
  • Pay-per-use Priority (Recommended): Use balance first, auto-switch when insufficient
  • Pay-per-use: Direct charge per request. Best for strict budget control
Both modes have identical pricing at $0.09/edit, only the billing method differs.
Token Settings
API calls will fail without proper billing configuration. Complete this setup first!

Model Overview

Nano Banana Pro Edit (gemini-3-pro-image) is designed for scenarios requiring precise control and high-quality output. Unlike simple filters or patches, it understands complex natural language instructions and makes logical modifications to images.

Core Capabilities

  • Precise Local Editing: “Replace that cat with a dog wearing glasses, but keep the same pose”
  • Perfect Style Transfer: “Transform this photo into cyberpunk-style oil painting with stronger lighting”
  • Multi-Image Creative Fusion: “Combine these two images to generate a brand new poster”
  • 4K HD Output: Supports 2K/4K resolution output for edited results

🌟 Core Features

  • ⚡ Fast Response: ~10 seconds average for editing
  • 💰 Cost-Controlled: $0.09/edit (current price shown in console)
  • 🔄 Dual Compatibility: Supports OpenAI SDK and Google native formats
  • 📐 Flexible Sizes: Google native format supports 14 aspect ratios
  • 🖼️ High Resolution: Supports 1K, 2K, 4K resolution output
  • 🧠 Thinking Mode: Built-in reasoning ability, understands complex editing instructions
  • 🌐 Search Grounding: Supports combining real-time search data for editing
  • 🎨 Multi-Image Reference: Supports up to 14 reference images for complex compositing
  • 📦 Base64 Output: Returns base64 encoded image data directly
  • 🔗 URL Direct Input: Google native format supports direct image URL input (overseas accessible required), no Base64 encoding needed

🔀 Two API Modes

💡 How to Choose?
  • For default ratio images, use OpenAI Compatible Mode - simple and fast
  • For custom aspect ratios (like 16:9, 9:16) or high-res (2K/4K), use Google Native Format

📋 Model Comparison

Comparison with Other Editing Models

Pro / Banana 2 / Standard Detailed Comparison

💰 Pricing Details
  • Nano Banana Pro: LaoZhang API is currently $0.09/edit; Google Standard is currently $0.134 at 1K/2K or $0.24 at 4K
  • Transparent billing: Review charges in call logs and confirm billing in the console

🚀 Quick Start

Prerequisites

1

Create Token

Login to LaoZhang API Token Management and create a pay-per-use type tokenToken Creation Interface
2

Select Billing Type

Important: Must select “Pay-per-use” type
3

Save Token

Copy the generated token in format sk-xxxxxx

Method 1: OpenAI Compatible Mode

Single Image Edit - Curl

Single Image Edit - Python SDK

Multi-Image Compositing - Python SDK

Method 2: Google Native Format (Custom Aspect Ratio + 4K)

Authentication Methods

Google native format supports three authentication methods:
💡 All three methods work the same. Choose whichever you prefer.

Supported Resolutions

💡 How to Set Resolution Pass "2K" or "4K" in generationConfig.imageConfig.imageSize. Default is "1K" if not specified.

Image Input Methods

Google native format supports two image input methods:
💡 Two Methods Comparison
  • inline_data: Pass Base64 encoded data, suitable for local images
  • fileData: Pass image URL directly, more concise (recommended for online images)
⚠️ URL Method Limitations When using fileData.fileUri to pass image URL, the following conditions must be met:
  • Image URL must be directly accessible from overseas public network
  • Image server must not have anti-crawling mechanisms (e.g., Cloudflare verification, CAPTCHA, User-Agent detection)
  • For images with access restrictions, use inline_data method (download first, then convert to Base64)

4K HD Editing - Curl (Base64 Method)

4K HD Editing - Curl (URL Method)

Use fileData.fileUri to pass online image URL directly, no Base64 conversion needed:
💡 URL Method Key Points
  • Use fileData.fileUri instead of inline_data.data
  • Must specify mimeType (e.g., image/png, image/jpeg)
  • Optionally add role: "user" to specify the role
  • Image URL must be directly accessible from overseas public network

Python Code Examples

💡 Progressive Examples Example 1 edits image → Example 2 transforms its style → Example 3 fuses both images. Clear progression!

🎯 Editing Scenarios

1. Single Image Edit - Add Elements

2. Style Transfer

3. Multi-Image Compositing

💡 Best Practices

Edit Instruction Optimization

Multi-Image Processing Strategy

❓ FAQ

Both Nano Banana Pro and Nano Banana 2 support 4K. This page uses Pro through the Gemini-native format with an imageSize parameter:
Important: Must use uppercase “K” (1K, 2K, 4K).
Common image formats are supported:
  • JPG/JPEG
  • PNG
  • WebP
  • GIF (static)
JPG or PNG recommended for best results.
  • Recommended size: Single image ≤ 5MB
  • Maximum size: ≤ 10MB
  • Larger images increase processing time, recommend compressing before upload
  • Nano Banana Pro: Up to 14 images
  • Nano Banana: Up to 3 images
  • Too many images affects quality and processing time, recommend ≤ 4
Confirm current pricing and final charges in the LaoZhang API console.
Perfectly supported! Gemini 3 Pro has top-tier multilingual understanding. You can describe editing requirements in Chinese directly.
  1. Detailed description: Provide specific editing details
  2. Step by step: Describe complex edits in multiple steps
  3. Reference style: Specify art style
  4. Keep subject: Clearly state what needs to be preserved
Google native format supports two image input methods:1. URL Method (fileData.fileUri) - More concise
2. Base64 Method (inline_data) - More universal
⚠️ URL Method Limitations:
  • Image URL must be directly accessible from overseas public network
  • Image server must not have anti-crawling mechanisms (Cloudflare verification, CAPTCHA, etc.)
  • For images with access restrictions, use Base64 method
Recommended Scenarios:
  • Images hosted on AWS S3, Google Cloud Storage, Cloudinary, etc. → Use URL
  • Images on restricted networks or with access restrictions → Use Base64

🎯 Common Use Cases

  1. E-commerce Model Swap: Upload clothing and model photos, generate outfit effects
  2. Interior Design: Upload raw room photos, generate decorated results via prompt
  3. Game Assets: Quickly modify game icons or character appearances
  4. Social Media: Transform portrait photos into various art styles
  5. Product Display: Place products into different scene backgrounds
  6. Creative Posters: Fuse multiple assets to generate poster designs

Pro Image Generation

Learn how to generate images from text with Nano Banana Pro

Standard Image Editing

More affordable Nano Banana Standard editing version

Token Management

Create and manage your API tokens

Pricing

View detailed pricing and billing information

📝 Changelog

🔗 New fileData.fileUri Method
  • Support direct online image URL input, no download and Base64 encoding needed
  • Added Curl and Python code examples
  • Note: Image URL must be accessible from overseas public network without anti-crawling
  • Added related FAQ
🚀 Nano Banana Pro Edit Dedicated Page
  • Split from combined documentation into dedicated Pro version
  • Complete 4K resolution editing guide
  • Detailed multi-image compositing instructions
  • Complete code examples and best practices
  • Comparison with Nano Banana Standard