Nano Banana 2.1 image generation on the OpenAI images endpoint
Model launch · 2026-10-08
Nano Banana 2.1 (gemini-nano-banana-2.1), Google's latest image generation model, now works on OneFast's OpenAI-compatible image endpoints:
POST /v1/images/generations— text to imagePOST /v1/images/edits— edit or combine images
Set the resolution with size (for example 1024x1024 or 2048x2048); quality: "hd" maps to 2K.
cURL
curl https://api.onefast.ai/v1/images/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "gemini-nano-banana-2.1", "prompt": "A product photo of a ceramic mug on a wooden table", "size": "2048x2048"}'
Google has announced that Nano Banana 2 (gemini-3.1-flash-image) will be retired on October 29, 2026, with Nano Banana 2.1 as its replacement — new projects should start on 2.1. See Image generation for parameters and examples.