---
title: "AI Gateway adds OpenRouter support for more AI model choice"
description: "AI Gateway now supports ZDR-compliant OpenRouter models like DeepSeek, Meta, Mistral, Qwen, and xAI, billed through your Netlify credits."
source: "https://www.netlify.com/changelog/2026-08-06-ai-gateway-openrouter/"
last_updated: "2026-08-06T21:40:43.000Z"
---
The AI Gateway now supports [OpenRouter](https://openrouter.ai/), 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](https://www.netlify.com/blog/build-with-open-models-in-production/).

## Supported models

For a full list of models available on OpenRouter, visit OpenRouter’s [models page](https://openrouter.ai/models).

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](https://openrouter.ai/docs/client-sdks/typescript/overview)** (`@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](https://developers.openai.com/api/docs/libraries)**: 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](https://openrouter.ai/docs/api-reference/overview)**: 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](https://openrouter.ai/models).

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](https://docs.netlify.com/build/ai-gateway/overview/).