Skip to main content
Gemini 3.1 Flash Lite Image is Google’s low-latency, cost-effective image generation and editing model, available through Anyfast via the native Gemini API. It is also known as Nano Banana Lite and is designed for high-volume interactive image use cases.
Google lists gemini-3.1-flash-lite-image as the stable model ID for Nano Banana Lite. The official model page shows a June 2026 latest update and describes the model as optimized for sub-2 second latency, lower TPU compute cost, and high-volume image generation and editing.

Key capabilities

  • Text-to-image — Generate images from text descriptions
  • Image editing — Pass a reference image in inline_data alongside your text instruction
  • Low latency — Targeted for sub-2 second end-to-end latency
  • Aspect ratio control1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9
  • Resolution control — Supports 1K (1024px). 2K and 4K are not supported.
  • Thinking control — Supports minimal and high thinking levels
  • Multi-modal output — Return both the image and a text caption with responseModalities: ["TEXT", "IMAGE"]
  • Watermarking — SynthID is always on, with C2PA watermarking
Note: If you need the generated image returned as a URL, select the Aggregate-NanoUrl group when creating your API token.

Text-to-image example

curl "https://www.anyfast.ai/v1beta/models/gemini-3.1-flash-lite-image:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          { "text": "Generate an image of a sunset over mountains" }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {
        "aspectRatio": "16:9",
        "imageSize": "1K"
      }
    }
  }'

Image editing example (with reference image)

Include both a text instruction and an inline_data reference image in the same parts array.
# First encode your image to base64:
# BASE64=$(base64 -i your_photo.jpg)
#
# Then send the request:
curl "https://www.anyfast.ai/v1beta/models/gemini-3.1-flash-lite-image:generateContent?key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [
          {
            "text": "Hi, this is a picture of me. Can you add a llama next to me?"
          },
          {
            "inline_data": {
              "mime_type": "image/jpeg",
              "data": "<YOUR_BASE64_ENCODED_IMAGE>"
            }
          }
        ]
      }
    ],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {
        "aspectRatio": "1:1",
        "imageSize": "1K"
      }
    }
  }'

Parameters

ParameterTypeRequiredDescription
keystringYesAPI key (query parameter)
contents[].parts[].textstringYesText prompt or instruction
contents[].parts[].inline_data.mime_typestringNoReference image type: image/jpeg, image/png, image/webp
contents[].parts[].inline_data.datastringNoBase64-encoded reference image
generationConfig.responseModalitiesarrayYes["IMAGE"] or ["TEXT", "IMAGE"]
generationConfig.imageConfig.aspectRatiostringNo1:1 / 3:2 / 2:3 / 3:4 / 4:3 / 4:5 / 5:4 / 9:16 / 16:9 / 21:9
generationConfig.imageConfig.imageSizestringNo1K only. 2K and 4K are not supported.

API Reference

View the interactive API playground for Gemini 3.1 Flash Lite Image.