Nano Banana 2.1 from Google is now available on AI Gateway. It improves image generation and editing over earlier Nano Banana models.
This release targets product recontextualization, mask- and ink-based editing, and factuality. Product recontextualization places an existing product in a new scene. Mask- and ink-based edits change only the region marked by a mask or by strokes drawn on the image. Factuality is how accurately images depict real-world subjects.
The model renders photorealistic skin tones, intricate materials, sharp lighting, and coherent backgrounds at the latency and cost of a Flash-tier model.
Call it through the AI SDK or the OpenAI-compatible Chat Completions API, or the AI CLI. AI CLI is an open-source command-line tool from Vercel Labs for generating text, images, video, and audio from your terminal. It runs on AI Gateway, so any Gateway model ID works with -m.
Use `google/gemini-nano-banana-2.1` as the model name. Generated images are returned in `result.files`:
Try Nano Banana 2.1 in the [model playground](https://vercel.com/ai-gateway/models/gemini-nano-banana-2.1).
AI Gateway provides a unified API for calling models, tracking usage and cost, and configuring retries, failover, and performance optimizations for higher-than-provider uptime. It includes built-in custom reporting, Zero Data Retention support, budgets for API keys, routing rules, and more.
AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including on Bring Your Own Key (BYOK) requests.
You can view all image models available on AI Gateway.