Netlify AI Gateway is a service that allows developers to integrate popular AI models (OpenAI, Anthropic Claude, Google Gemini) into their applications without managing multiple provider accounts, API keys, or separate billing. It automatically sets environment variables for supported client libraries, routes requests through Netlify's infrastructure, and converts token usage into credits billed to your Netlify account.
Key Features:
- Automatic Configuration: Sets environment variables (
OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY, etc.) in Netlify compute contexts (Functions, Edge Functions, Preview Servers). - Unified Billing: Uses your existing Netlify credit quota instead of separate provider balances.
- Provider Support: Works with OpenAI, Anthropic, and Google Gemini models via official client libraries or REST APIs.
- Security & Privacy: Does not store prompts or model outputs; includes built-in rate limiting and usage analytics.
- Framework Compatibility: Supports any web framework that runs on Netlify (e.g., Astro, Next.js, TanStack Start) since code is packaged into Netlify Functions/Edge Functions.
- Local Development: Full support with Netlify CLI and Vite plugin for local testing.
Use Cases:
- Building AI-powered applications (chat apps, content generators) without managing multiple AI provider accounts.
- Simplifying AI integration in serverless or edge functions on Netlify.
- Centralizing AI usage tracking and billing across projects.
- Quickly prototyping with AI models using automatic environment variable injection.

