
Netlify has added Nano Banana 2 Lite, built on Google's Gemini 3.1 Flash-Lite image model, to its AI Gateway. Developers can now call the lightweight image generation model directly from Netlify Functions without managing API keys or authentication infrastructure.
The model is designed for high-volume image generation at lower cost, according to Netlify's changelog. It integrates with existing Netlify primitives including caching and rate limiting, and works across all Function types.
How it works
Developers can use the Google GenAI SDK within their Functions to generate images. The AI Gateway handles authentication automatically, routing requests to Google's infrastructure without requiring manual API key configuration.
According to sample code in the changelog, a basic implementation accepts a text prompt via query parameter and returns a binary image with the appropriate content type:
import { GoogleGenAI } from '@google/genai';
export default async (request: Request) => {
const url = new URL(request.url);
const prompt = url.searchParams.get('prompt') || 'two happy bananas holding flashlights';
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
model: 'gemini-3.1-flash-lite-image',
prompt: prompt
});
return new Response(imageData, {
headers: { 'Content-Type': 'image/png' }
});
};
The approach follows Netlify's recent pattern of embedding AI capabilities directly into its platform infrastructure. The company redesigned its Functions API earlier this year to better support AI agent workflows, introducing typed handlers and config-driven setup.
Gateway handles infrastructure
Netlify's AI Gateway abstracts away the connection layer between Functions and external AI providers. Developers write code against the provider's SDK as usual, but the Gateway intercepts calls and handles authentication, rate limiting, and caching at the platform level.
This is the same infrastructure that powers Netlify's support for other models, including Claude Sonnet 5, which was added earlier this year. Claude Fable 5 was re-enabled in the Gateway on July 1 after a brief period of unavailability, according to the changelog.
The zero-configuration approach mirrors capabilities in competing deployment platforms like Vercel, which also provides managed access to AI models through its serverless functions.
Built for volume and cost
Nano Banana 2 Lite targets use cases where developers need to generate images at scale without the overhead of more capable, expensive models. Google positioned the Flash-Lite variant of Gemini 3.1 as optimized for speed and throughput.
Netlify's implementation makes the model available immediately to existing projects. Teams already using Netlify Functions can integrate image generation by installing the Google GenAI SDK and deploying updated function code. No changes to project configuration, environment variables, or authentication flows are required.
The model is available now across all Netlify plans. Full documentation is available in Netlify's AI Gateway docs.
Sources
1 checkedHow we cover tool news: Create With's tool desk drafts these reports with AI from the sources listed above and checks them against those sources before publishing.




