Google Nano Banana 2 Lite Text To Image API Documentation

Google Nano Banana 2 Lite Text To Image API Documentation

Playground

Try it on WaveSpeedAI!

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.

Features

Google Nano Banana 2 Lite Text-to-Image generates images from text prompts with a fast, lightweight image model. The public interface keeps the workflow simple: write a prompt, choose an aspect ratio, select an output format, and generate a single image result.


Why Choose This?

  • Fast text-to-image generation
    Generate images quickly from natural-language prompts.

  • Flexible aspect ratios
    Choose common square, portrait, landscape, and wide-format aspect ratio presets.

  • Simple generation controls
    The public form focuses on prompt, size, and output_format.

  • Single-image output
    Each request generates one image for predictable cost and behavior.

  • Standard image output
    Generated images are returned as URLs in the standard WaveSpeed prediction response.


Parameters

ParameterRequiredDescription
promptYesText prompt describing the image to generate.
aspect_ratioNoOutput aspect ratio preset. Default: 1:1.
output_formatNoOutput image format: png or jpeg. Default: png.
enable_sync_modeNoWait for the result to be generated and uploaded before returning the response. API only. Synchronous requests may hit timeouts because Google inference time can fluctuate. Default: false.
enable_base64_outputNoReturn output as a BASE64 string instead of a URL. API only. Default: false.

How to Use

  1. Write your prompt — Describe the subject, scene, style, lighting, and composition.
  2. Choose aspect ratio — Select the output size based on your target layout.
  3. Choose output format — Use png or jpeg depending on your workflow.
  4. Submit — Generate the image and retrieve the output URL.

Pricing

Output ImagesPrice
1$0.04

Best Use Cases

  • Creative image generation — Generate concept art, illustrations, thumbnails, and visual ideas from text.
  • Marketing assets — Create campaign images, social visuals, blog graphics, and promotional content.
  • Prompt testing — Quickly iterate on prompt wording, style direction, and composition.
  • Layout-specific generation — Generate square, portrait, landscape, or banner-style images for different use cases.

Pro Tips

  • Use clear prompts with subject, scene, lighting, style, and composition.
  • Keep the prompt focused on the main subject and visual intent.
  • Use png for higher-quality general output.
  • Use jpeg for smaller file sizes.
  • Choose the aspect ratio based on the final placement, such as square, portrait, landscape, or wide banner.

## Authentication

For authentication details, please refer to the [Authentication Guide](/api-authentication).

## API Endpoints

### Submit Task & Query Result

<ApiTabs submitUrl={model.submitUrl} resultUrl={model.resultUrl} payload={model.defaultValues} />

## Parameters

### Task Submission Parameters

#### Request Parameters

<RequestParams params={model.params} />

#### Response Parameters

<SubmitResponse />

#### Result Request Parameters

| Parameter | Type | Required | Default | Description |
|-----------|------|----------|---------|-------------|
| id | string | Yes | - | Task ID |

#### Result Response Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., "success") |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array&lt;string \| object&gt; | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.urls.get | string | URL to poll for the prediction result |
| data.status | string | Status: `created`, `processing`, `completed`, or `failed` |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
© 2026 WaveSpeedAI. All rights reserved.