Nano Banana 2 AI Image Editing Model

Gemini 3.1 Flash with image generation capabilities. High-efficiency image generation model with support for text rendering, reference images, search grounding, and thinking mode. The efficient counterpart to Gemini 3 Pro Image.

gemini-3.1-flash-image API OpenAI-compatible

Connect to Nano Banana 2 via the Lumenfall OpenAI-compatible API to integrate high-speed text-to-image generation and image editing into your workflow. The unified endpoint allows for programmatic creation of visual assets and precise modifications to existing images through a single interface.

Base URL
https://api.lumenfall.ai/openai/v1
Model
gemini-3.1-flash-image-preview

Text to Image Generate

Create images from text descriptions

curl -X POST \
  https://api.lumenfall.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-3.1-flash-image-preview",
    "prompt": "A serene mountain landscape at sunset",
    "size": "1024x1024"
  }'
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }

Image Editing Edit

Transform existing images with text instructions

curl -X POST \
  https://api.lumenfall.ai/openai/v1/images/edits \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -F "model=gemini-3.1-flash-image-preview" \
  -F "[email protected]" \
  -F "prompt=Add a starry night sky to this image" \
  -F "size=1024x1024"
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }