GPT-5.1 model now available in AI Gateway
November 13, 2025
OpenAI’s latest GPT-5.1 model (gpt-5.1) is now available through Netlify’s AI Gateway. This model brings enhanced performance and efficiency with no additional setup required.
Use the OpenAI SDK directly in your Netlify Functions without managing API keys. The AI Gateway handles authentication, rate limiting, and caching automatically. Here’s an example using the GPT-5.1 model:
import { OpenAI } from "openai";
export default async () => { const openai = new OpenAI();
const response = await openai.chat.completions.create({ model: "gpt-5.1", messages: [ { role: "user", content: "Compare GPT-5.1's improvements over GPT-5 Pro" } ] });
return new Response(JSON.stringify(response), { headers: { "Content-Type": "application/json" } });};The GPT-5.1 model works seamlessly across Edge Functions, Background Functions, and Scheduled Functions. You also get access to Netlify’s advanced caching primitives and built-in rate limiting.
Learn more in the AI Gateway documentation.