netlify-ai-gateway

Installation
SKILL.md

Netlify AI Gateway

IMPORTANT: Only use models listed in the "Available Models" section below. AI Gateway does not support every model a provider offers. Using an unsupported model returns an HTTP error from the gateway.

First-deploy requirement: The AI Gateway only activates after a site has had at least one production deploy. Local dev (netlify dev, @netlify/vite-plugin) will NOT have gateway access on a brand-new project until you deploy to production once.

Netlify AI Gateway provides access to AI models from multiple providers without managing API keys directly. It is available on all Netlify sites.

How It Works

The AI Gateway acts as a proxy — you use standard provider SDKs but point them at Netlify's gateway URL. Netlify auto-injects both the base URL and a placeholder API key for each provider, then authenticates upstream on your behalf.

Setup

  1. Enable AI on your site in the Netlify UI
  2. Deploy to production at least once — the gateway does not activate until then
  3. Install the provider SDK you want to use

Don't set your own OPENAI_API_KEY, ANTHROPIC_API_KEY, or GEMINI_API_KEY. Doing so disables Netlify's auto-injection and routes calls directly to the provider, bypassing the gateway.

Related skills

More from netlify/context-and-tools

Installs
148
GitHub Stars
17
First Seen
Feb 27, 2026