Google Nano Banana Lite Text to Image API

google/nano-banana-2-lite/text-to-image

Google Nano Banana 2 Lite Text to Image generates high-quality images from text prompts with low latency, flexible aspect ratios, and fast image creation for creative and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Examples

Google Nano Banana Lite Text to Image API example 1
Google Nano Banana Lite Text to Image API example 2
Google Nano Banana Lite Text to Image API example 3

Parameters

NameTypeDefaultConstraintsDescription
prompt *Prompttextarea≤ 5000 charsText prompt describing the image to generate.
aspect_ratioAspect Ratioselect1:11:1 | 3:2 | 2:3 | 3:4 | 4:3 | 4:5 | 5:4 | 9:16 | …Output aspect ratio.

API

Call this model through one unified REST API. Get a key on the API Keys page.

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/google/nano-banana-2-lite/text-to-image" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "A cozy modern reading nook by a large rain-speckled window, soft morning light, overflowing bookshelf, green velvet armchair, knitted blanket, steaming cup of tea on a wooden side table, indoor plants, realistic interior photography, warm neutral tones, high detail",
    "aspect_ratio": "4:5"
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/google/nano-banana-2-lite/text-to-image",
    headers=HEADERS,
    json={
        "input": {
            "prompt": "A cozy modern reading nook by a large rain-speckled window, soft morning light, overflowing bookshelf, green velvet armchair, knitted blanket, steaming cup of tea on a wooden side table, indoor plants, realistic interior photography, warm neutral tones, high detail",
            "aspect_ratio": "4:5"
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 300s server-side.
deadline = time.time() + 360
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/google/nano-banana-2-lite/text-to-image", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "prompt": "A cozy modern reading nook by a large rain-speckled window, soft morning light, overflowing bookshelf, green velvet armchair, knitted blanket, steaming cup of tea on a wooden side table, indoor plants, realistic interior photography, warm neutral tones, high detail",
      "aspect_ratio": "4:5"
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 300s server-side.
const deadline = Date.now() + 360 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

Documentation

Google Nano Banana Lite Text to Image API

A fast, low-latency text-to-image model built for efficient creative production.

Google Nano Banana 2 Lite Text to Image is a lightweight text-to-image model designed for rapid image generation from natural-language prompts. It combines low latency, flexible aspect ratios, no cold starts, and affordable pricing, making it a strong fit for both creative exploration and production-oriented visual workflows.

🚀 Key Features

  • Low-latency generation: Optimized for fast image creation, enabling quick iteration and responsive creative workflows.
  • No cold starts: Delivers more predictable performance for production use cases where responsiveness matters.
  • Flexible aspect ratios: Supports common square, portrait, landscape, widescreen, and ultrawide layouts.
  • Single-image output: Each request returns one image for predictable cost, behavior, and workflow simplicity.
  • Multiple output formats: Choose from PNG, JPEG, or WEBP depending on quality, file size, and delivery requirements.
  • Simple controls: Focused generation settings centered on Prompt, Aspect Ratio, and Output Format.

🛠️ Technical Specifications

ItemDetails
Model NameGoogle Nano Banana 2 Lite Text to Image
Model IDgoogle/nano-banana-2-lite/text-to-image
Model TypeText-to-image
Model ArchitectureLightweight text-to-image architecture(Lite)
InputPrompt
OutputSingle Image
Num Images1
Supported Aspect Ratio1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
Default Aspect Ratio1:1
Output Formatpng, jpeg, webp
Default Output Formatpng
Performance CharacteristicsLow latency, no cold starts
Typical WorkflowsCreative generation, marketing assets, prompt testing, layout-specific image creation

Sample Prompts

  1. A cinematic portrait of a young woman standing in neon rain, dramatic lighting, shallow depth of field, ultra detailed
  2. A minimalist product advertisement for a luxury skincare bottle on a marble surface, soft studio lighting, clean composition
  3. A fantasy floating city above the clouds at sunrise, epic scale, concept art, highly detailed atmosphere

💰 Pricing

ItemPrice
1 output image$0.035

💡 Best Use Cases

  • Creative ideation: Generate concept art, illustrations, thumbnails, and visual directions from text.
  • Marketing content production: Create campaign visuals, social media assets, blog graphics, and promotional imagery.
  • Prompt experimentation: Rapidly test wording, style direction, composition, and scene descriptions.
  • Layout-specific asset generation: Produce square, portrait, landscape, banner, or widescreen visuals for different channels.

🔗 Related Models

  • Google Nano Banana 2 Lite Edit: A lightweight editing-oriented variant for modifying existing images.
  • Google Nano Banana 2 Text To Image: A related text-to-image version for users evaluating broader or potentially higher-end generation capabilities.

Related models

xAI Grok Imagine Image v2.0 Text to Image
Text to ImageX Ai

xAI Grok Imagine Image v2.0 Text to Image

xAI Grok Imagine Image V2.0 Text-to-Image generates high-quality images from text prompts, with configurable aspect ratio, resolution, and quality for creative visuals, social content, marketing assets, and production workflows. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

from $0.080 / per run
Qwen Image 3.0 Pro Text to Image
Text to ImageQwen Image 3.0 Pro

Qwen Image 3.0 Pro Text to Image

Qwen Image 3.0 Pro is a professional-grade text-to-image model with superior quality and advanced prompt understanding. Up to 2k. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

from $0.080 / per run
OpenAI GPT Image 2 Text-to-Image
Text to ImageOpenAI

OpenAI GPT Image 2 Text-to-Image

OpenAI's GPT Image 2 Text-to-Image generates high-quality images from natural-language prompts. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

from $0.660 / per run
OpenAI GPT Image 2 Edit
Text to ImageOpenAI

OpenAI GPT Image 2 Edit

OpenAI's GPT Image 2 Edit enables image editing from natural-language instructions with one or more reference images. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

from $0.660 / per run
Nami Z-Image T2I Spicy
Text to Image

Nami Z-Image T2I Spicy

Generate an image from a text prompt with configurable width, height, prompt enhancement, and seed.

from $0.020 / per run
Nano Banana Text to Image
Text to ImageGoogle

Nano Banana Text to Image

Gemini 2.5 Flash Image. Lightweight and fast. The most affordable option for instant, high-volume generation.

from $0.040 / per run
Nano Banana Pro Text to Image
Text to ImageGoogle

Nano Banana Pro Text to Image

Gemini 3.0 Pro Image. The high-fidelity choice for 4K visuals, multilingual text rendering, and pro camera controls.

from $0.140 / per run
Nano Banana Pro Text to Image
Text to ImageGoogle

Nano Banana Pro Text to Image

Gemini 3.0 Pro Image. The high-fidelity choice for 4K visuals, multilingual text rendering, and pro camera controls.

from $0.070 / per run