Gemini 3.1 Flash Lite Preview now available in AI Gateway

March 3, 2026

Google’s Gemini 3.1 Flash Lite Preview is now available through AI Gateway. You can call this model from Netlify Functions without configuring API keys; the AI Gateway provides the connection to Google for you.

Example usage in a Function:

import { GoogleGenAI } from '@google/genai';
export default async () => {
const ai = new GoogleGenAI({});
const response = await ai.models.generateContent({
model: 'gemini-3.1-flash-lite-preview',
contents: 'How can AI improve my coding?'
});
return Response.json(response);
};

This model works across any function type and is compatible with other Netlify primitives such as caching and rate limiting, giving you control over request behavior across your site.

Learn more in the AI Gateway documentation.