AI Gateway

Unified access to AI models, built in.

Netlify AI Gateway gives agents and developers instant access to the latest models from OpenAI, Anthropic, and Google. No API keys to manage, no separate accounts, no extra billing. Ship AI features from the first prompt.

Simple API
Use the official OpenAI, Anthropic, and Google SDKs you already know. Netlify injects the right environment variables at runtime.
Secure by default
Requests run through Netlify's gateway with built-in security. Prompts and model outputs are never stored.
Built-in governance
Per-account rate limits and usage analytics keep production traffic predictable across every project on your team.
Insights anytime
See token usage and credit consumption in your Netlify dashboard, scoped per account across all projects.
One API. Any model.

Use the SDKs you already love. Switch providers without rewriting code.

Drop in the official client library, call your chosen model, and ship. No keys to wire up. No base URLs to remember.

import OpenAI from 'openai';

// No API key or base URL configuration needed — Netlify
// automatically injects OPENAI_API_KEY and OPENAI_BASE_URL.
const openai = new OpenAI();

async function callOpenAI() {
  const completion = await openai.chat.completions.create({
    model: 'gpt-5',
    messages: [{ role: 'user', content: 'Hello!' }],
  });
  return completion;
}
Built into Netlify

Ship AI features faster and safer.

From your first prototype to production traffic, AI Gateway removes the operational glue between your code and the major model providers.

  • Skip account creation with OpenAI, Anthropic, and Google
  • Stop juggling API keys, billing, and credit balances
  • Get unified usage analytics across every project
  • Rate limits scoped per account, applied automatically
  • Works in serverless, edge, and background functions
  • Full local development support via the Netlify CLI
Frontier models

Access the best models.

Call the latest releases from the providers your team already trusts. Add or swap models without touching infrastructure.

OpenAI

  • gpt-5.5-pro
  • gpt-5.5
  • gpt-5.4-pro
  • gpt-5.4
  • gpt-5.4-mini
  • gpt-5.4-nano
  • gpt-5.3-codex
  • gpt-5.3-chat-latest
  • gpt-5.2-pro
  • gpt-5.2
  • gpt-5.2-codex
  • gpt-5.1
  • gpt-5.1-codex-max
  • gpt-5.1-codex
  • gpt-5.1-codex-mini
  • gpt-5-pro
  • gpt-5
  • gpt-5-codex
  • gpt-5-mini
  • gpt-5-nano
  • gpt-4.1
  • gpt-4.1-mini
  • gpt-4.1-nano
  • gpt-4o
  • gpt-4o-mini
  • o4-mini
  • o3
  • o3-mini
  • chat-latest

Anthropic

  • claude-opus-4-7
  • claude-opus-4-6
  • claude-opus-4-5
  • claude-opus-4-1-20250805
  • claude-opus-4-20250514
  • claude-sonnet-4-6
  • claude-sonnet-4-5
  • claude-sonnet-4-0
  • claude-sonnet-4-20250514
  • claude-haiku-4-5

Google

  • gemini-3.1-pro-preview
  • gemini-3.1-pro-preview-customtools
  • gemini-3.1-flash-image-preview
  • gemini-3.1-flash-lite
  • gemini-3.1-flash-lite-preview
  • gemini-3-pro-image-preview
  • gemini-3-flash-preview
  • gemini-2.5-pro
  • gemini-2.5-flash
  • gemini-2.5-flash-image
  • gemini-2.5-flash-lite
  • gemini-2.0-flash
  • gemini-2.0-flash-lite
  • gemini-flash-latest
  • gemini-flash-lite-latest

Ready to build with AI?

Start a new project or add AI Gateway to one you already deploy on Netlify. Free to try, billed only for the credits you use.

Keep exploring

Resources

Docs
AI Gateway overview
Set up AI Gateway, choose a model, and call your first inference in minutes.
Read the docs
Pricing
Credit-based plans
AI Gateway is available on Free, Personal, and Pro plans, with Enterprise available on request. Pay only for the credits you use.
View pricing
Local development
Run locally with the CLI
Use the Netlify CLI or the Vite plugin to call AI Gateway from your machine without managing keys.
See setup
Security
Security and privacy
Netlify does not store prompts or model outputs. Learn how AI Gateway handles your data.
Read more

Start building on Netlify.

Deploy your first project free, and turn on AI Gateway whenever you're ready.