Nano Banana 2
Nano Banana 2 is Google’s latest image generation and editing model, also called Gemini 3.1 Flash Image, built to combine fast “Flash” speed with stronger visual quality, sharper instruction-following, and more precise edits.
Nano Banana 2 Image to Image API
Reference image(s). Formats: jpeg, png, webp. Max 30MB each. Up to 14 images.
Drag and drop an image, or click to browse
Supports JPEG, PNG, WEBP. Max 30MB. You can also paste from clipboard (Ctrl+V).
Describe the desired transformation (max 20,000 chars)
Result
Results will appear here
Cost: $0.08/image
Nano Banana 2 API Implementation Guide
Get API Key
Generate your API key from the dashboard and set it as an environment variable.
export MODELHUNTER_KEY="your_api_key"Make Your First Call
Follow the API documentation for complete code examples in cURL, JavaScript, and Python, including request format, polling, and error handling.
View API Documentation →Nano Banana 2 Key Info
Capabilities
- Text to Image API
- Image to Image API
Pricing
Price per image by resolution
| 1K | 2K | 4K |
|---|---|---|
| $0.08/image | $0.12/image | $0.16/image |
$0.08 per image (1K)
Use Cases
Output Formats
Nano Banana 2 API Documentation
Run the playground first, then open the full API docs for integration details.
About
Edit and transform images with up to 14 reference images
Code Examples
1curl -X POST https://api.modelhunter.ai/api/v1/gemini/image-to-image \2-H "Authorization: Bearer YOUR_API_KEY" \3-H "Content-Type: application/json" \4-d '{5"model": "nano-banana-2",6"input": {7"image_input": [8"https://example.com/image.jpg"9],10"prompt": "A futuristic cityscape at sunset with neon signs",11"aspect_ratio": "auto",12"resolution": "1K"13}14}'
Schema
View Full API DocsInput
modelModel ID for this capability.
Value: nano-banana-2
image_inputReference image(s). Formats: jpeg, png, webp. Max 30MB each. Up to 14 images.
promptDescribe the desired transformation (max 20,000 chars)
aspect_ratioAspect Ratio
Options: auto, 1:1, 3:2, 2:3, 16:9, 9:16
Default: auto
resolutionResolution
Options: 1K, 2K, 4K
Default: 1K
google_searchEnable real-time web grounding for the prompt
Default: false
output_formatOutput Format
Options: jpg, png
Default: jpg
webhookUrlURL to receive a webhook notification when the task completes.
metadataCustom key-value metadata to attach to the task for tracking.
Response (HTTP 202)
successWhether the request was accepted successfully.
data.idUnique task ID. Use this to poll GET /api/v1/tasks/{id} for results.
data.statusTask status: pending, processing, completed, failed.
data.typeGeneration type: image-to-image.
data.providerProvider name: gemini.
data.modelModel ID used for generation.
data.created_atISO 8601 timestamp of when the task was created.
data.estimated_secondsEstimated time in seconds until the task completes.