Skip to main content
Nano Banana 2 Lite is the Gemini image model that Google describes as its fastest and cheapest, built for 1K images, quick edits, and high-volume jobs.

What Lite supports

The OpenAI-compatible route has no ratio setting; text-only prompts return 1:1 images.
A modern logistics dashboard on a dark gray background with cyan highlights, generated by Nano Banana 2 Lite

Output of the generate example below: 1K, 16:9

Google notes that Lite isn’t optimized for many reference images or multi-turn editing. For those jobs, for 2K or 4K output, or for Google Search grounding, use Nano Banana 2.1 or Nano Banana 2; for the most demanding layouts, use Nano Banana Pro. The Nano Banana overview compares all five models.

Before you call

1

Create an API key

In Token management, open the create-token dialog (创建令牌), set Billing mode (计费模式) to Usage first (按量优先, recommended) or Per-call (按次计费), and click Create (创建). Lite has only a per-call price, and a Usage-based (按量计费) key can’t call it; the billing rules explain when a request is charged.
2

Set the key and install the dependencies

3

Add a save function for cURL

The cURL examples need jq. Define this shell function to save the last image in a Gemini-native response, which is the final result if interim images come back too, with the extension that matches its mimeType:
When the response holds no image, the function prints the error, promptFeedback, and finishReason fields instead.

Generate an image

The image comes back as Base64 in candidates[0].content.parts[].inlineData.data, and mimeType gives its format. Both examples decode it and save a PNG, JPEG, or WebP file to match.

Edit an image

Put the instruction first and the image after it in parts. A local file goes in as Base64 inlineData, with a mimeType that matches the file.
Build the request body with jq so a large image doesn’t exceed shell argument limits:
Typical Lite edits are background swaps, color changes, stickers, and quick variations. Say in the instruction what must stay unchanged. For compositions built from several reference images, use Nano Banana 2.1 or Nano Banana 2.

Use the OpenAI-compatible route

If your app already uses the OpenAI SDK, call Lite through chat completions. This route has no ratio or size settings, so a text-only prompt returns a 1:1 image at 1K. The image comes back as a Base64 data URL inside message.content. Save this script as nano_banana_lite_chat.py:
Generate an image, then edit a local file:

Run Lite at high volume

Lite suits drafts, previews, and interactive apps that create many images. The platform doesn’t limit concurrency, and an occasional 429 comes from upstream capacity; see Concurrency and 429. For production traffic:
  1. Reuse HTTP connections instead of creating a new client for every image.
  2. Retry 429 and 5xx responses and network errors with jittered exponential backoff.
  3. Set a business timeout, and check call logs before retrying a timed-out request so it isn’t billed twice.
  4. Don’t retry an HTTP 200 response that has no image. It’s already charged, and resending the same content usually returns nothing again.
  5. Log the model, status code, latency, and request time of each call.
  6. Before a sustained launch, send your expected peak concurrency, daily volume, and input image sizes to support at hi@laozhang.ai to confirm capacity.

Errors and billing

  • Lite supports only 1K. Don’t send 512, 2K, or 4K; use Nano Banana 2.1, Nano Banana 2, or Pro for other sizes.
  • Write sizes with an uppercase K. Google rejects lowercase values such as 1k.
  • A request can return HTTP 200 without an image, for example when the prompt doesn’t ask for one or a safety check blocks the output. It is charged as one call, so change the prompt or image before resending; see Avoid paying for empty responses.
  • HTTP 401 means the key or the Authorization: Bearer header is wrong. Retry 429 and 5xx responses with backoff.

FAQ

Can Lite output 2K or 4K images, or use Google Search grounding?

No to both. Lite outputs 1K only and doesn’t support grounding. Use gemini-nano-banana-2.1 (Nano Banana 2.1, $0.045 per call) for 1K to 4K, gemini-3.1-flash-image (Nano Banana 2) when you also need 512px, 14 aspect ratios, or web and image search grounding, and gemini-3-pro-image (Nano Banana Pro) for 1K to 4K with web search grounding on complex layouts. All three take the same requests, so you only change the model ID.

Is Lite good for multi-image composites or consistent characters?

Not really. Lite accepts up to 14 object images, but Google’s reference table lists no character or style references for it, and Google notes that it isn’t optimized for multiple reference inputs or multi-turn sequential editing. Lite handles single-image local edits, such as swapping colors or adjusting a background. To combine several images into one or keep the same person consistent across a series, use Nano Banana 2.1 or Nano Banana 2, which take up to 10 object images and 4 character images.

Is gemini-3.1-flash-lite-image a stable model ID?

Yes. Google’s model page lists it as the stable version, with no -preview suffix. Use it exactly as written.

Can I run Lite at high concurrency?

Yes. The platform doesn’t limit concurrency. Before launch, follow Run Lite at high volume for retries and timeouts, and tell support your expected peak so upstream capacity can be confirmed.