AI Gateway adds OpenRouter support for more AI model choice

August 6, 2026

The AI Gateway now supports OpenRouter, giving you access to models from providers beyond Netlify’s direct integrations (OpenAI, Anthropic, Google Gemini).

This partnership opens up models from providers like DeepSeek, Meta, Mistral, Qwen, and xAI, all billed through your existing Netlify credits.

Learn more about our OpenRouter partnership through the Netlify blog on open models.

Supported models

For a full list of models available on OpenRouter, visit OpenRouter’s models page.

Note that Netlify only allows requests through OpenRouter for model providers that support a Zero Data Retention (ZDR) policy, meaning your prompts and outputs are never stored nor trained on. Models on OpenRouter that do not have any available provider guaranteeing this policy (at the time of your request) are not available via Netlify.

Set up OpenRouter for AI Gateway

As with the other providers, Netlify automatically injects OPENROUTER_API_KEY and OPENROUTER_BASE_URL into your Netlify Functions, Edge Functions, and Preview Server (unless you’ve already set your own values for either).

You can call an OpenRouter-served model using whichever client you prefer:

  • OpenRouter SDK (@openrouter/sdk): pass OPENROUTER_BASE_URL explicitly as serverURL when constructing the client, this is the one exception where the base URL isn’t picked up automatically.
  • OpenAI SDK: works out of the box, no extra config. Just pass a model ID in OpenRouter notation (e.g. deepseek/deepseek-v4-flash-0731).
  • REST API: call ${OPENROUTER_BASE_URL}/chat/completions with a bearer token from OPENROUTER_API_KEY.

Whichever client you use, you can find model IDs to pass in the OpenRouter models directory.

Note that a model listed in OpenRouter’s directory will not work through the AI Gateway if it does not support a Zero Data Retention (ZDR) policy since Netlify only routes to OpenRouter providers with this support.

To learn more about using AI Gateway, check out our official AI Gateway Netlify docs.