mountsea-ai/nano-banana-api
Nano Banana API SDK - AI image generation & editing. Nano Banana 2, Pro, Fast. Up to 4K. Cheapest API
🎨 Nano Banana API - AI Image Generation | Nano Banana 2 | Nano Banana Pro | Text-to-Image API
Access Nano Banana (Nano Banana 2, Nano Banana Pro, Nano Banana Fast) AI image generation and editing through a simple API. Create and edit stunning images with the cheapest Nano Banana API!
🤔 What is Nano Banana?
Nano Banana (also known as NanoBanana, Nano-Banana) is a powerful AI image generation model based on Google Gemini. This project provides the easiest and cheapest access to Nano Banana API through Mountsea AI.
Supported Models
| Model | Also Known As | Description | Speed | Quality |
|---|---|---|---|---|
| Nano Banana Fast | nano-banana-fast, NanoBananaFast | Speed-optimized model | ⚡ Fastest | High |
| Nano Banana Pro | nano-banana-pro, NanoBananaPro | Premium quality model | Standard | Highest |
| Nano Banana 2 | nano-banana-2, NanoBanana2 | Latest gen, all aspect ratios | Standard | Highest |
Key Features
- 🎨 Text-to-Image – Generate stunning images from text prompts
- ✏️ Image Editing – Edit existing images with AI
- 📐 Flexible Aspect Ratios – 1:1, 4:3, 16:9, 9:16, 3:2, 2:3, and more
- 🔍 Up to 4K Resolution – 1K, 2K, 4K (Pro & Nano Banana 2)
- ⚡ Fast Mode – Nano Banana Fast for rapid prototyping
- 💰 Cheapest API – Best pricing for AI image generation
🚀 Quick Start
Install SDK
# Python
pip install mountsea-nano-banana
# Node.js
npm install mountsea-nano-bananaGet Your API Key
- Visit Mountsea AI Platform
- Sign up and get your API key
- Start generating images!
Python SDK Example
from mountsea_nano_banana import NanoBananaClient
client = NanoBananaClient("your-api-key")
# Generate an image
task = client.generate("A fluffy orange cat running through a sunny meadow")
result = client.wait(task["taskId"])
print(result["imageUrl"])
# Edit an existing image
task = client.edit("Make the sky more dramatic", image_urls=["https://example.com/photo.jpg"])
result = client.wait(task["taskId"])Node.js SDK Example
const { NanoBananaClient } = require('mountsea-nano-banana');
const client = new NanoBananaClient('your-api-key');
// Generate
const task = await client.generate('A fluffy orange cat in a meadow');
const result = await client.wait(task.taskId);
console.log(result.imageUrl);
// Edit
const editTask = await client.edit('Make the sky dramatic', {
imageUrls: ['https://example.com/photo.jpg']
});Python Example (requests)
import requests
API_KEY = "your-api-key"
BASE_URL = "https://api.mountsea.ai"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
# Text-to-Image with Nano Banana Fast
response = requests.post(
f"{BASE_URL}/gemini/image/generate",
headers=headers,
json={
"prompt": "A fluffy orange cat running through a sunny meadow",
"action": "generate",
"model": "nano-banana-fast",
"aspect_ratio": "1:1",
"num_images": 1
}
)
task = response.json()
print(f"Task ID: {task['taskId']}")Nano Banana Pro (High Quality)
# Use Nano Banana Pro for maximum quality
response = requests.post(
f"{BASE_URL}/gemini/image/generate",
headers=headers,
json={
"prompt": "A breathtaking mountain landscape at golden hour, photorealistic",
"action": "generate",
"model": "nano-banana-pro",
"aspect_ratio": "16:9",
"resolution": "4K"
}
)Nano Banana 2 (Latest, All Aspect Ratios)
# Nano Banana 2 supports all aspect ratios including ultra-wide
response = requests.post(
f"{BASE_URL}/gemini/image/generate",
headers=headers,
json={
"prompt": "Futuristic cyberpunk cityscape with neon lights",
"action": "generate",
"model": "nano-banana-2",
"aspect_ratio": "21:9",
"resolution": "2K"
}
)Image Editing
# Edit existing images with AI
response = requests.post(
f"{BASE_URL}/gemini/image/generate",
headers=headers,
json={
"prompt": "Change the background to a tropical beach",
"action": "edit",
"model": "nano-banana-pro",
"image_urls": ["https://example.com/portrait.jpg"]
}
)JavaScript / Node.js
const axios = require('axios');
const API_KEY = process.env.MOUNTSEA_API_KEY || 'your-api-key';
const BASE_URL = 'https://api.mountsea.ai';
// Generate image with Nano Banana
const response = await axios.post(`${BASE_URL}/gemini/image/generate`, {
prompt: 'A fluffy orange cat in a sunny meadow, photorealistic',
action: 'generate',
model: 'nano-banana-fast',
aspect_ratio: '1:1'
}, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
}
});
console.log('Task ID:', response.data.taskId);cURL
# Generate with Nano Banana Fast
curl -X POST https://api.mountsea.ai/gemini/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A fluffy orange cat running through a sunny meadow",
"action": "generate",
"model": "nano-banana-fast",
"aspect_ratio": "1:1"
}'
# Generate with Nano Banana Pro (4K)
curl -X POST https://api.mountsea.ai/gemini/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A breathtaking mountain landscape at golden hour",
"action": "generate",
"model": "nano-banana-pro",
"aspect_ratio": "16:9",
"resolution": "4K"
}'
# Edit an image
curl -X POST https://api.mountsea.ai/gemini/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Add dramatic clouds to the sky",
"action": "edit",
"model": "nano-banana-pro",
"image_urls": ["https://example.com/photo.jpg"]
}'📖 Available Models
| Model | Resolutions | Aspect Ratios | Best For |
|---|---|---|---|
nano-banana-fast |
Default | Standard (1:1, 4:3, 16:9, etc.) | Quick prototyping |
nano-banana-pro |
1K, 2K, 4K | Standard (1:1, 4:3, 16:9, etc.) | Production quality |
nano-banana-2 |
1K, 2K, 4K | All (including 21:9, 1:4, 4:1, 1:8, 8:1) | Ultra-wide, flexible |
📐 Supported Aspect Ratios
| Standard (All Models) | Extended (Nano Banana 2 Only) |
|---|---|
| 1:1, 4:3, 3:4 | 21:9 |
| 16:9, 9:16 | 1:4, 4:1 |
| 3:2, 2:3 | 1:8, 8:1 |
| 5:4, 4:5 |
📖 API Endpoint
| Endpoint | Method | Description |
|---|---|---|
/gemini/image/generate |
POST | Generate or edit images |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt |
string | ✅ | Text description for generation/editing |
action |
string | ✅ | generate or edit |
model |
string | ❌ | nano-banana-fast (default), nano-banana-pro, nano-banana-2 |
aspect_ratio |
string | ❌ | Image aspect ratio (default: 1:1) |
resolution |
string | ❌ | 1K, 2K, 4K (Pro & Nano Banana 2 only) |
num_images |
number | ❌ | Number of images (default: 1) |
image_urls |
string[] | ❌ | Source images for editing (required when action=edit) |
💰 Pricing
🔥 Special: Best pricing for Nano Banana API!
| Package | Credits | Price |
|---|---|---|
| Starter | 10,000 | ¥100 |
| Basic | 50,000 | ¥500 |
| Pro | 200,000 | ¥2,000 |
| Business | 500,000 | ¥4,500 (10% OFF) |
| Enterprise | 1,000,000 | ¥8,000 (20% OFF) |
📚 Documentation
🔗 Related Projects
- Sora API - OpenAI Sora Video Generation
- Veo API - Google Veo 3 Video Generation
- Suno API - AI Music Generation
- Gemini API - Google Gemini Chat API
- OpenAI Compatible API - Multi-Model Chat API
🇨🇳 中文文档
🎨 Nano Banana API - AI 图片生成 | Nano Banana 2 | Nano Banana Pro | 文生图 API
通过简单的 API 访问 Nano Banana(Nano Banana 2、Nano Banana Pro、Nano Banana Fast)AI 图片生成和编辑能力。最便宜的 AI 图片生成 API!
🔥 特惠活动
Nano Banana API 积分最优价格! 立即开始 →
✨ 功能特点
- 🎨 文本生成图片 – 从文字描述生成精美图片
- ✏️ AI 图片编辑 – 使用 AI 编辑现有图片
- 📐 多种宽高比 – 1:1、4:3、16:9、9:16 等
- 🔍 最高 4K 分辨率 – 支持 1K、2K、4K
- ⚡ Fast 模式 – Nano Banana Fast 极速生成
- 🎯 Nano Banana 2 – 最新一代,支持超宽画幅
🚀 快速开始
安装 SDK
# Python
pip install mountsea-nano-banana
# Node.js
npm install mountsea-nano-banana获取 API 密钥
- 访问 Mountsea AI 平台
- 注册账号并获取 API 密钥
- 开始生成图片!
Python 示例
from mountsea_nano_banana import NanoBananaClient
client = NanoBananaClient("your-api-key")
# 文生图
task = client.generate("一只毛茸茸的橘猫在阳光明媚的草地上奔跑")
result = client.wait(task["taskId"])
print(result["imageUrl"])
# AI 编辑图片
task = client.edit("把背景换成热带海滩", image_urls=["https://example.com/photo.jpg"])cURL 示例
curl -X POST https://api.mountsea.ai/gemini/image/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "一只毛茸茸的橘猫在草地上奔跑",
"action": "generate",
"model": "nano-banana-fast",
"aspect_ratio": "1:1"
}'📚 文档
⭐ Star History
如果这个项目对你有帮助,请给我们一个 Star ⭐
📄 License
Powered by Mountsea AI – 全球领先的 AI API 一体化平台
Last API Check: 2026-03-06 | Status: online