Pro quality at Flash speed
Built on Gemini 3.1 Flash, it brings Nano Banana Pro's reasoning, world knowledge, and visual fidelity into a faster, cheaper package, and it replaced the original Nano Banana.
Generate and edit images with Google's Nano Banana 2 through one unified API. A single REST endpoint, async jobs, and webhooks, with no Google Cloud setup to manage.
Integrate Nano Banana 2 with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.
model: "nano-banana-2"
Built on Gemini 3.1 Flash, it brings Nano Banana Pro's reasoning, world knowledge, and visual fidelity into a faster, cheaper package, and it replaced the original Nano Banana.
It generates in roughly 4 to 6 seconds at about half the per-image cost of Nano Banana Pro, which suits high-volume and iterative work.
It supports resolutions from 512px up to 4096px across 14 aspect ratios, covering everything from social posts to print.
It pulls from Gemini's knowledge base and real-time web search to render specific subjects accurately, and it excels at infographics, notes-to-diagrams, and data visualizations.
It keeps multiple characters and objects consistent across a series of images, alongside accurate multilingual text rendering and translation.
It offers minimal or high reasoning levels, and every output carries an invisible SynthID watermark plus C2PA Content Credentials.
A few outputs generated through the Nano Banana 2 API on Apiframe.
A data visualization of global coffee consumption by country, clean labels and legend.
A 4K product photo of a sneaker on concrete, soft daylight, sharp detail.
Turn these handwritten meeting notes into a clean flowchart diagram.
A greeting card reading 'Congratulations' in elegant script with a watercolor floral border.
Show these five characters together at a dinner table, each keeping their consistent look.
A bilingual menu board with dishes in English and Spanish, legible prices, modern layout.
Send a single POST /v2/images/generate request with your API key to
generate with Nano Banana 2. The call returns a jobId you can poll or
receive via webhook.
curl -X POST https://api.apiframe.ai/v2/images/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "nano-banana-2",
"nanoBananaParams": {
"resolution": "1K",
"image_input": "https://example.com/input.jpg",
"output_format": "jpg",
"google_search": false
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "nano-banana-2",
"nanoBananaParams": {
"resolution": "1K",
"image_input": "https://example.com/input.jpg",
"output_format": "jpg",
"google_search": False
}
},
)
print(response.json()) # { "jobId": "...", "status": "QUEUED" }const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
"prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "nano-banana-2",
"nanoBananaParams": {
"resolution": "1K",
"image_input": "https://example.com/input.jpg",
"output_format": "jpg",
"google_search": false
}
}),
});
const { jobId } = await response.json();
console.log(jobId);Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"status": "QUEUED"
}curl https://api.apiframe.ai/v2/jobs/JOB_ID \
-H "X-API-Key: afk_your_api_key_here"import requests, time
while True:
job = requests.get(
"https://api.apiframe.ai/v2/jobs/JOB_ID",
headers={"X-API-Key": "afk_your_api_key_here"},
).json()
if job["status"] in ("COMPLETED", "FAILED"):
break
time.sleep(2)
print(job["result"])let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
headers: { "X-API-Key": "afk_your_api_key_here" },
}).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);Request parameters accepted by the Nano Banana 2 endpoint. Model-specific options are nested under the params object shown below.
| Parameter | Type | Required | Default | Allowed / range | Description |
|---|---|---|---|---|---|
| prompt | string | required | — | — | Text description of what to generate. |
| model | string | required | "nano-banana-2" | "nano-banana-2" | The model identifier for this endpoint. |
| nanoBananaParams.resolution | string | optional | "1K" | "512px", "1K", "2K", "4K" | Resolution |
| nanoBananaParams.image_input | string (URL) | optional | — | — | Compose with or edit a reference image. |
| nanoBananaParams.output_format | string | optional | "jpg" | "jpg", "png", "webp" | Output format |
| nanoBananaParams.google_search | boolean | optional | false | — | Google search grounding |
| nanoBananaParams.image_search | boolean | optional | false | — | Image search grounding |
Common questions about the Nano Banana 2 API.
Google's Gemini 3.1 Flash Image, released in February 2026 to deliver Pro-level quality at Flash speed, replacing the original Nano Banana.
It is around four times faster and roughly half the cost with comparable quality, while Pro remains the pick for the most demanding text and branding work.
Up to 4K, with options from 512px to 4096px and 14 aspect ratios.
Around 4 to 6 seconds per image, and on Apiframe from 12 credits ($0.12) at 1K to 26 credits ($0.26) at 4K, about half the price of Pro.
Multiple characters and objects across images, supporting consistency for several characters and many objects at once.
Through Apiframe, as well as the Gemini app, Google AI Studio, the Gemini API, and Vertex AI.
Still have questions?
Get your API key and integrate Nano Banana 2 in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.