GPT-5.1-Codex-Max now available in AI Gateway and Agent Runners

December 4, 2025

OpenAI’s GPT-5.1-Codex-Max model is now available through Netlify’s AI Gateway and Agent Runners with zero configuration required.

Use the OpenAI SDK directly in your Netlify Functions without managing API keys or authentication. The AI Gateway handles everything automatically. Here’s an example using the GPT-5.1-Codex-Max model:

import OpenAI from 'openai';
export default async () => {
const openai = new OpenAI();
const response = await openai.responses.create({
model: 'gpt-5.1-codex-max',
input: 'What improvements are in GPT‑5.1-Codex-Max?'
});
return new Response(JSON.stringify(response), {
headers: { 'Content-Type': 'application/json' }
});
};

GPT-5.1-Codex-Max is available across Background Functions, Scheduled Functions, and Edge Functions. You get automatic access to Netlify’s caching, rate limiting, and authentication infrastructure.

Learn more in the AI Gateway documentation.

You can also leverage GPT-5.1-Codex-Max with Agent Runners to build powerful AI-powered workflows, including expanded tool use and support for long-running agent tasks. Learn more in the Agent Runners documentation.