Google’s Gemini Nano Banana 2.1 now available in AI Gateway
By Steven Van ·
Developers can generate images from Netlify Functions without configuring API keys, using the Google Gen AI SDK.
Netlify Functions can now generate images with Google’s Gemini Nano Banana 2.1 without developers configuring API keys. Netlify AI Gateway handles the connection to Google.
Generate and return an image
Developers call the model through the Google Gen AI SDK using the model ID gemini-nano-banana-2.1. The announcement’s example takes a prompt from a GET request, requests a 16:9 image at 1K size, and returns the image directly with the appropriate content type. Errors return a JSON response.
Supported function types
The model is also available across Scheduled Functions, Background Functions, and Edge Functions, with automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.