Gemini 3 Flash Preview now available in AI Gateway
December 17, 2025
Google’s Gemini 3 Flash 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 (request: Request, context: Context) => { const ai = new GoogleGenAI({}); const response = await ai.models.generateContent({ model: 'gemini-3-flash-preview', contents: 'How does AI work?' }); return new Response(JSON.stringify({ answer: response.text }), { headers: { 'Content-Type': 'application/json' } });};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.
See the AI Gateway documentation for details.