Nano Banana Pro Image Generation & Editing
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) — the premium AI image generation model designed for professional asset production, utilizing advanced reasoning ("Thinking") to follow complex instructions and render high-fidelity text in images.
Nano Banana Pro excels at infographics, menus, diagrams, marketing assets, and any task requiring precise text rendering and complex multi-object composition.
This skill supports two providers. Choose based on which API key is available.
Data usage note: This skill sends text prompts and image URLs/data to third-party APIs (Atlas Cloud or Google AI Studio) for image generation. No data is stored locally beyond the downloaded output files.
Security note: API keys are read exclusively from environment variables (GEMINI_API_KEY, ATLASCLOUD_API_KEY) and passed via HTTP headers — never embedded in URL query strings or command arguments. All user-provided text (prompts, file paths) must be passed through JSON request bodies to prevent shell injection. When constructing curl commands, always use a JSON payload (-d '{...}') rather than string interpolation in the shell. File paths should be validated before use. The skill does not execute any user-provided code — it only sends structured API requests and downloads output files.
Nano Banana Pro vs Nano Banana 2
| Feature |
Nano Banana Pro |
Nano Banana 2 |
| Model (Google AI Studio) |
gemini-3-pro-image-preview |
gemini-3.1-flash-image-preview |
| Focus |
Professional quality, complex tasks |
Speed, high-volume generation |
| Text rendering |
Superior — best for infographics, menus |
Good |
| Thinking mode |
Enabled by default |
Not available |
| Reference images (object) |
Up to 6 |
Up to 10 |
| Character consistency images |
Up to 5 |
Up to 14 |
| Resolution |
Up to 4K |
Up to 4K |
| Google Search grounding |
Yes |
Yes |
Choose Nano Banana Pro when quality and text precision matter. Choose Nano Banana 2 when speed and cost matter.
Provider Selection
- If
GEMINI_API_KEY is set → use Google AI Studio
- If
ATLASCLOUD_API_KEY is set → use Atlas Cloud
- If both are set → ask the user which provider to use
- If neither is set → ask the user to configure one:
Pricing Comparison
| Resolution |
Google AI Studio |
Atlas Cloud Standard |
Atlas Cloud Developer |
| 1K |
~$0.134 |
$0.126 |
$0.098 |
| 2K |
~$0.134 |
$0.126 |
$0.098 |
| 4K |
~$0.240 |
$0.126 |
$0.098 |
Google AI Studio uses token-based pricing that scales with resolution. Atlas Cloud uses flat-rate pricing regardless of resolution.
Available Models
Google AI Studio Model
| Model ID |
Price |
Notes |
gemini-3-pro-image-preview |
Token-based (~$0.134-$0.24/image) |
Handles both generation and editing, Thinking mode enabled |
Atlas Cloud Models
| Model ID |
Tier |
Price |
Best For |
google/nano-banana-pro/text-to-image |
Standard |
$0.126/image |
Production, high-quality output |
google/nano-banana-pro/text-to-image-developer |
Developer |
$0.098/image |
Prototyping, experiments |
google/nano-banana-pro/edit |
Standard |
$0.126/image |
Production editing |
google/nano-banana-pro/edit-developer |
Developer |
$0.098/image |
Budget editing, experiments |
Provider 1: Google AI Studio API
Setup
- Get API key from https://aistudio.google.com/apikey
- Set env:
export GEMINI_API_KEY="your-key"
Parameters
| Parameter |
Location |
Options |
aspectRatio |
generationConfig.imageConfig |
1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9 |
imageSize |
generationConfig.imageConfig |
512px, 1K, 2K, 4K (uppercase K required) |
responseModalities |
generationConfig |
["TEXT", "IMAGE"] for image output |
Text-to-Image
curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "A professional restaurant menu with elegant typography: Appetizers — Caesar Salad $12, Soup du Jour $9; Mains — Grilled Salmon $28, Filet Mignon $42"}]}],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"],
"imageConfig": {"aspectRatio": "3:4", "imageSize": "2K"}
}
}'
Response: base64 image in candidates[0].content.parts[]. Text parts have .text, image parts have .inline_data.mime_type and .inline_data.data.
Save the image:
# Extract base64 data from response and decode
echo "$BASE64_DATA" | base64 -d > output.png
Image Editing (Google AI Studio)
curl -s -X POST \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent" \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [
{"text": "Replace the text on the banner with: Summer Collection 2026"},
{"inline_data": {"mime_type": "image/png", "data": "BASE64_ENCODED_IMAGE"}}
]}],
"generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}
}'
To encode a local image for editing:
BASE64_IMAGE=$(base64 -i input.png)
Python Example
from google import genai
from google.genai import types
client = genai.Client()
response = client.models.generate_content(
model="gemini-3-pro-image-preview",
contents="A professional infographic showing quarterly revenue growth with bar charts, annotations, and the title 'Q4 2026 Results'",
config=types.GenerateContentConfig(
response_modalities=['TEXT', 'IMAGE'],
image_config=types.ImageConfig(aspect_ratio="16:9", image_size="2K"),
)
)
for part in response.parts:
if part.text:
print(part.text)
elif image := part.as_image():
image.save("output.png")
Provider 2: Atlas Cloud API
Setup
- Sign up at https://www.atlascloud.ai
- Console → API Keys → Create new key
- Set env:
export ATLASCLOUD_API_KEY="your-key"
Parameters
Text-to-Image:
| Parameter |
Type |
Required |
Default |
Options |
prompt |
string |
Yes |
- |
Image description |
aspect_ratio |
string |
No |
1:1 |
1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
resolution |
string |
No |
1k |
1k, 2k, 4k |
output_format |
string |
No |
png |
png, jpeg |
Image Editing — same as above plus:
| Parameter |
Type |
Required |
Description |
images |
array of strings |
Yes |
1-10 image URLs to edit |
Workflow: Submit → Poll → Download
# Step 1: Submit
curl -s -X POST "https://api.atlascloud.ai/api/v1/model/generateImage" \
-H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-pro/text-to-image",
"prompt": "A professional infographic showing quarterly revenue growth with bar charts and annotations",
"aspect_ratio": "16:9",
"resolution": "2k"
}'
# Returns: { "code": 200, "data": { "id": "prediction-id" } }
# Step 2: Poll (every 3-5 seconds until "completed" or "succeeded")
curl -s "https://api.atlascloud.ai/api/v1/model/prediction/{prediction-id}" \
-H "Authorization: Bearer $ATLASCLOUD_API_KEY"
# Returns: { "code": 200, "data": { "status": "completed", "outputs": ["https://...url..."] } }
# Step 3: Download
curl -o output.png "IMAGE_URL_FROM_OUTPUTS"
Image editing example:
curl -s -X POST "https://api.atlascloud.ai/api/v1/model/generateImage" \
-H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/nano-banana-pro/edit",
"prompt": "Replace the text on the sign with: Grand Opening Sale — 50% Off",
"images": ["https://example.com/storefront.jpg"],
"resolution": "2k"
}'
Polling logic:
processing / starting / running → wait 3-5s, retry (Pro model may take longer than Nano Banana 2 due to Thinking mode)
completed / succeeded → done, get URL from data.outputs[]
failed → error, read data.error
Atlas Cloud MCP Tools (if available)
If the Atlas Cloud MCP server is configured, use built-in tools:
atlas_quick_generate(model_keyword="nano banana pro", type="Image", prompt="...")
atlas_generate_image(model="google/nano-banana-pro/text-to-image", params={...})
atlas_get_prediction(prediction_id="...")
Implementation Guide
Determine provider: Check which API key is available (see Provider Selection above).
Extract parameters:
- Prompt: the image description — Nano Banana Pro handles complex, detailed prompts well
- Aspect ratio: infer from context (infographic→3:4 or 9:16, banner→16:9, menu→3:4, social post→1:1)
- Resolution: default 1k, use 2k/4k for professional output
- For editing: identify source image URL(s) or local file path
Choose model tier (Atlas Cloud only):
- Standard for production use
- Developer if user wants to save costs or is experimenting
Sanitize inputs: Ensure user-provided prompts and file paths do not contain shell metacharacters. Always pass prompts inside JSON payloads (never via shell interpolation). Validate that image file paths exist and are readable before encoding.
Execute:
- Google AI Studio: POST to generateContent API → parse base64 from response → save to file
- Atlas Cloud: POST to generateImage API → poll prediction (may take 10-30s due to Thinking mode) → download result
Present result: show file path, offer to open
Prompt Tips for Nano Banana Pro
Nano Banana Pro excels at understanding complex, structured prompts. Take advantage of its Thinking mode:
- Text in images: Include exact text in quotes — Pro renders text with high fidelity. Example:
"A cafe chalkboard menu reading: 'Today's Special — Matcha Latte $5.50'"
- Infographics: Describe data, layout, and annotations. Example:
"An infographic showing 3 steps of coffee brewing with numbered icons and captions"
- Marketing assets: Specify brand colors, text placement, and style. Example:
"A product banner with dark background, gold accents, text 'Limited Edition' top-center"
- Complex compositions: Describe spatial relationships and multiple objects. Example:
"A still life with a ceramic vase left-center, three oranges arranged in front, and a linen cloth draped over the table edge"
- Style: "photorealistic", "editorial illustration", "minimalist flat design", "watercolor"
- Lighting: "studio lighting", "natural window light", "dramatic chiaroscuro"
1---2name: nano-banana-pro-43description: Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image / Imagen Pro) — the premium AI image generation model optimized for professional asset production with advanced reasoning ('Thinking'), high-fidelity text rendering, and complex multi-turn creation. Supports text-to-image and image editing with up to 6 reference images, resolutions up to 4K, and 14+ aspect ratios. Two provider modes: Atlas Cloud and Google AI Studio. Use this skill whenever the user wants to generate high-quality professional images, create AI art with precise text, edit photos with AI, produce marketing assets, infographics, menus, diagrams, or any visual content requiring detailed text rendering. Also trigger when users mention Nano Banana Pro, Gemini 3 Pro Image, Imagen Pro, or ask for premium/professional-grade AI image generation, concept art, product photography, or visual assets with complex compositions.4---5
6# Nano Banana Pro Image Generation & Editing
7
8Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) — the premium AI image generation model designed for professional asset production, utilizing advanced reasoning ("Thinking") to follow complex instructions and render high-fidelity text in images.
9
10Nano Banana Pro excels at infographics, menus, diagrams, marketing assets, and any task requiring precise text rendering and complex multi-object composition.
11
12This skill supports two providers. Choose based on which API key is available.
13
14> **Data usage note**: This skill sends text prompts and image URLs/data to third-party APIs (Atlas Cloud or Google AI Studio) for image generation. No data is stored locally beyond the downloaded output files.
15
16> **Security note**: API keys are read exclusively from environment variables (`GEMINI_API_KEY`, `ATLASCLOUD_API_KEY`) and passed via HTTP headers — never embedded in URL query strings or command arguments. All user-provided text (prompts, file paths) must be passed through JSON request bodies to prevent shell injection. When constructing curl commands, always use a JSON payload (`-d '{...}'`) rather than string interpolation in the shell. File paths should be validated before use. The skill does not execute any user-provided code — it only sends structured API requests and downloads output files.
17
18---
19
20## Nano Banana Pro vs Nano Banana 2
21
22| Feature | Nano Banana Pro | Nano Banana 2 |
23|---------|:--------------:|:-------------:|
24| Model (Google AI Studio) | `gemini-3-pro-image-preview` | `gemini-3.1-flash-image-preview` |
25| Focus | Professional quality, complex tasks | Speed, high-volume generation |
26| Text rendering | Superior — best for infographics, menus | Good |
27| Thinking mode | Enabled by default | Not available |
28| Reference images (object) | Up to 6 | Up to 10 |
29| Character consistency images | Up to 5 | Up to 14 |
30| Resolution | Up to 4K | Up to 4K |
31| Google Search grounding | Yes | Yes |
32
33Choose Nano Banana Pro when quality and text precision matter. Choose Nano Banana 2 when speed and cost matter.
34
35---
36
37## Provider Selection
38
391. If `GEMINI_API_KEY` is set → use Google AI Studio
402. If `ATLASCLOUD_API_KEY` is set → use Atlas Cloud
413. If both are set → ask the user which provider to use
424. If neither is set → ask the user to configure one:
43 - **Google AI Studio**: Get key from https://aistudio.google.com/apikey, then `export GEMINI_API_KEY="your-key"`
44 - **Atlas Cloud**: Sign up at https://www.atlascloud.ai, Console → API Keys → Create key, then `export ATLASCLOUD_API_KEY="your-key"`
45
46---
47
48## Pricing Comparison
49
50| Resolution | Google AI Studio | Atlas Cloud Standard | Atlas Cloud Developer |
51|:----------:|:----------------:|:-------------------:|:--------------------:|
52| **1K** | ~$0.134 | $0.126 | $0.098 |
53| **2K** | ~$0.134 | $0.126 | $0.098 |
54| **4K** | ~$0.240 | $0.126 | $0.098 |
55
56Google AI Studio uses token-based pricing that scales with resolution. Atlas Cloud uses flat-rate pricing regardless of resolution.
57
58---
59
60## Available Models
61
62### Google AI Studio Model
63
64| Model ID | Price | Notes |
65|----------|-------|-------|
66| `gemini-3-pro-image-preview` | Token-based (~$0.134-$0.24/image) | Handles both generation and editing, Thinking mode enabled |
67
68### Atlas Cloud Models
69
70| Model ID | Tier | Price | Best For |
71|----------|------|-------|----------|
72| `google/nano-banana-pro/text-to-image` | Standard | $0.126/image | Production, high-quality output |
73| `google/nano-banana-pro/text-to-image-developer` | Developer | $0.098/image | Prototyping, experiments |
74| `google/nano-banana-pro/edit` | Standard | $0.126/image | Production editing |
75| `google/nano-banana-pro/edit-developer` | Developer | $0.098/image | Budget editing, experiments |
76
77---
78
79## Provider 1: Google AI Studio API
80
81### Setup
821. Get API key from https://aistudio.google.com/apikey
832. Set env: `export GEMINI_API_KEY="your-key"`
84
85### Parameters
86
87| Parameter | Location | Options |
88|-----------|----------|---------|
89| `aspectRatio` | `generationConfig.imageConfig` | 1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9 |
90| `imageSize` | `generationConfig.imageConfig` | 512px, 1K, 2K, 4K (uppercase K required) |
91| `responseModalities` | `generationConfig` | ["TEXT", "IMAGE"] for image output |
92
93### Text-to-Image
94
95```bash
96curl -s -X POST \
97 "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent" \
98 -H "x-goog-api-key: $GEMINI_API_KEY" \
99 -H "Content-Type: application/json" \
100 -d '{
101 "contents": [{"parts": [{"text": "A professional restaurant menu with elegant typography: Appetizers — Caesar Salad $12, Soup du Jour $9; Mains — Grilled Salmon $28, Filet Mignon $42"}]}],
102 "generationConfig": {
103 "responseModalities": ["TEXT", "IMAGE"],
104 "imageConfig": {"aspectRatio": "3:4", "imageSize": "2K"}
105 }
106 }'
107```
108
109**Response:** base64 image in `candidates[0].content.parts[]`. Text parts have `.text`, image parts have `.inline_data.mime_type` and `.inline_data.data`.
110
111**Save the image:**
112```bash
113# Extract base64 data from response and decode
114echo "$BASE64_DATA" | base64 -d > output.png
115```
116
117### Image Editing (Google AI Studio)
118
119```bash
120curl -s -X POST \
121 "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent" \
122 -H "x-goog-api-key: $GEMINI_API_KEY" \
123 -H "Content-Type: application/json" \
124 -d '{
125 "contents": [{"parts": [
126 {"text": "Replace the text on the banner with: Summer Collection 2026"},
127 {"inline_data": {"mime_type": "image/png", "data": "BASE64_ENCODED_IMAGE"}}
128 ]}],
129 "generationConfig": {"responseModalities": ["TEXT", "IMAGE"]}
130 }'
131```
132
133**To encode a local image for editing:**
134```bash
135BASE64_IMAGE=$(base64 -i input.png)
136```
137
138### Python Example
139
140```python
141from google import genai
142from google.genai import types
143
144client = genai.Client()
145response = client.models.generate_content(
146 model="gemini-3-pro-image-preview",
147 contents="A professional infographic showing quarterly revenue growth with bar charts, annotations, and the title 'Q4 2026 Results'",
148 config=types.GenerateContentConfig(
149 response_modalities=['TEXT', 'IMAGE'],
150 image_config=types.ImageConfig(aspect_ratio="16:9", image_size="2K"),
151 )
152)
153for part in response.parts:
154 if part.text:
155 print(part.text)
156 elif image := part.as_image():
157 image.save("output.png")
158```
159
160---
161
162## Provider 2: Atlas Cloud API
163
164### Setup
1651. Sign up at https://www.atlascloud.ai
1662. Console → API Keys → Create new key
1673. Set env: `export ATLASCLOUD_API_KEY="your-key"`
168
169### Parameters
170
171**Text-to-Image:**
172
173| Parameter | Type | Required | Default | Options |
174|-----------|------|----------|---------|---------|
175| `prompt` | string | Yes | - | Image description |
176| `aspect_ratio` | string | No | 1:1 | 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 |
177| `resolution` | string | No | 1k | 1k, 2k, 4k |
178| `output_format` | string | No | png | png, jpeg |
179
180**Image Editing** — same as above plus:
181
182| Parameter | Type | Required | Description |
183|-----------|------|----------|-------------|
184| `images` | array of strings | Yes | 1-10 image URLs to edit |
185
186### Workflow: Submit → Poll → Download
187
188```bash
189# Step 1: Submit
190curl -s -X POST "https://api.atlascloud.ai/api/v1/model/generateImage" \
191 -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
192 -H "Content-Type: application/json" \
193 -d '{
194 "model": "google/nano-banana-pro/text-to-image",
195 "prompt": "A professional infographic showing quarterly revenue growth with bar charts and annotations",
196 "aspect_ratio": "16:9",
197 "resolution": "2k"
198 }'
199# Returns: { "code": 200, "data": { "id": "prediction-id" } }
200
201# Step 2: Poll (every 3-5 seconds until "completed" or "succeeded")
202curl -s "https://api.atlascloud.ai/api/v1/model/prediction/{prediction-id}" \
203 -H "Authorization: Bearer $ATLASCLOUD_API_KEY"
204# Returns: { "code": 200, "data": { "status": "completed", "outputs": ["https://...url..."] } }
205
206# Step 3: Download
207curl -o output.png "IMAGE_URL_FROM_OUTPUTS"
208```
209
210**Image editing example:**
211
212```bash
213curl -s -X POST "https://api.atlascloud.ai/api/v1/model/generateImage" \
214 -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
215 -H "Content-Type: application/json" \
216 -d '{
217 "model": "google/nano-banana-pro/edit",
218 "prompt": "Replace the text on the sign with: Grand Opening Sale — 50% Off",
219 "images": ["https://example.com/storefront.jpg"],
220 "resolution": "2k"
221 }'
222```
223
224**Polling logic:**
225- `processing` / `starting` / `running` → wait 3-5s, retry (Pro model may take longer than Nano Banana 2 due to Thinking mode)
226- `completed` / `succeeded` → done, get URL from `data.outputs[]`
227- `failed` → error, read `data.error`
228
229### Atlas Cloud MCP Tools (if available)
230
231If the Atlas Cloud MCP server is configured, use built-in tools:
232
233```
234atlas_quick_generate(model_keyword="nano banana pro", type="Image", prompt="...")
235atlas_generate_image(model="google/nano-banana-pro/text-to-image", params={...})
236atlas_get_prediction(prediction_id="...")
237```
238
239---
240
241## Implementation Guide
242
2431. **Determine provider**: Check which API key is available (see Provider Selection above).
244
2452. **Extract parameters**:
246 - Prompt: the image description — Nano Banana Pro handles complex, detailed prompts well
247 - Aspect ratio: infer from context (infographic→3:4 or 9:16, banner→16:9, menu→3:4, social post→1:1)
248 - Resolution: default 1k, use 2k/4k for professional output
249 - For editing: identify source image URL(s) or local file path
250
2513. **Choose model tier** (Atlas Cloud only):
252 - Standard for production use
253 - Developer if user wants to save costs or is experimenting
254
2554. **Sanitize inputs**: Ensure user-provided prompts and file paths do not contain shell metacharacters. Always pass prompts inside JSON payloads (never via shell interpolation). Validate that image file paths exist and are readable before encoding.
256
2575. **Execute**:
258 - Google AI Studio: POST to generateContent API → parse base64 from response → save to file
259 - Atlas Cloud: POST to generateImage API → poll prediction (may take 10-30s due to Thinking mode) → download result
260
2616. **Present result**: show file path, offer to open
262
263## Prompt Tips for Nano Banana Pro
264
265Nano Banana Pro excels at understanding complex, structured prompts. Take advantage of its Thinking mode:
266
267- **Text in images**: Include exact text in quotes — Pro renders text with high fidelity. Example: `"A cafe chalkboard menu reading: 'Today's Special — Matcha Latte $5.50'"`
268- **Infographics**: Describe data, layout, and annotations. Example: `"An infographic showing 3 steps of coffee brewing with numbered icons and captions"`
269- **Marketing assets**: Specify brand colors, text placement, and style. Example: `"A product banner with dark background, gold accents, text 'Limited Edition' top-center"`
270- **Complex compositions**: Describe spatial relationships and multiple objects. Example: `"A still life with a ceramic vase left-center, three oranges arranged in front, and a linen cloth draped over the table edge"`
271- **Style**: "photorealistic", "editorial illustration", "minimalist flat design", "watercolor"
272- **Lighting**: "studio lighting", "natural window light", "dramatic chiaroscuro"