---
title: "Gemini 3.1 Flash-Lite Preview now available in AI Gateway"
description: "Access Google Gemini 3.1 Flash-Lite Preview through Netlify AI Gateway with zero configuration. No API keys required."
source: "https://www.netlify.com/changelog/gemini-3-1-flash-lite-preview-ai-gateway/"
last_updated: "2026-07-15T16:47:02.000Z"
---
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](https://docs.netlify.com/build/ai-gateway/overview/).