tutorials

Gemini 3.1 Flash Lite Image API Guide: Nano Banana 2 Lite on Oakgen

Oakgen Team2 min read
Gemini 3.1 Flash Lite Image API Guide: Nano Banana 2 Lite on Oakgen

The API model id for Nano Banana 2 Lite is gemini-3.1-flash-lite-image. On Oakgen, use nano-banana-2-lite-text for text-to-image and nano-banana-2-lite-edit for image editing, with Oakgen handling provider access, uploads, retries, and output storage.

Start from the product route: Nano Banana 2 Lite image generator.

Model ids

Use these ids depending on where you are integrating:

| Surface | Model id | | --- | --- | | Google Gemini API | gemini-3.1-flash-lite-image | | Oakgen text-to-image | nano-banana-2-lite-text | | Oakgen image editing | nano-banana-2-lite-edit | | Oakgen model page | /models/nano-banana-2-lite |

Oakgen curl example

Use Oakgen when you want a simple generation API without building provider retries, image storage, and model switching yourself.

curl -X POST https://api.oakgen.ai/v1/generate/image \
  -H "Authorization: Bearer $OAKGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2-lite-text",
    "prompt": "A cinematic macro photo of a colorful spider on a dew-covered web, dark green background, rain droplets, shallow depth of field",
    "resolution": "1K",
    "aspect_ratio": "16:9"
  }'

Gemini Interactions API concept

Google's current Gemini image examples use an interaction-style request: send a model id, input, generation settings, and response modalities that include image output. Conceptually, the direct provider flow looks like this:

interaction = client.interactions.create(
    model="models/gemini-3.1-flash-lite-image",
    input="A cinematic macro photo of a colorful spider on a dew-covered web",
    generation_config={
        "thinking_level": "minimal",
        "image_config": {"image_size": "1K"},
    },
    response_modalities=["image", "text"],
)

Oakgen wraps that kind of provider access behind its own model ids so your application can focus on prompts, workflow, and outputs.

Pricing and latency intent

If your query is "Gemini 3.1 Flash Lite Image pricing," "Nano Banana 2 Lite API cost," or "fast AI image API," the buyer-intent answer is:

  • Use Nano Banana 2 Lite when you need low-latency, lower-cost creative exploration.
  • Use heavier models only for the short list of outputs that need final-production confidence.
  • Use Oakgen when you want one workflow across Lite, Nano Banana 2, GPT Image 2, Flux, and other image models.

When to use Oakgen instead of direct Gemini API

Use direct Google API access if you already have provider credentials, storage, retries, observability, billing, and model routing in place.

Use Oakgen if you want:

  • A hosted image generator UI for your team
  • One API id for text-to-image and editing workflows
  • Provider access without direct setup
  • Output storage and download URLs
  • Easy comparison with Nano Banana 2, GPT Image 2, and Flux 2 Pro

Limitations to handle

Review Lite outputs before publishing. Pay special attention to text, fine details, small faces, factual diagrams, localization, and complex edits that involve several references or blended images.

Generate with Nano Banana 2 Lite

Open Nano Banana 2 Lite on Oakgen to test prompts in the UI, then move the same model id into your API workflow when you are ready.

gemini-3.1-flash-lite-imageNano Banana 2 Lite APIGemini APIAI image API
Share

Related Articles