Skip to Content
Models & GatewaysGatewaysOverview
Concepts

Model Gateways

Gateways provide unified access to multiple AI providers through a single API. They offer features like rate limiting, failover, caching, and consolidated billing.

Gateways use a three-part model format: {gateway}/{provider}/{model}. For example, vercel/openai/gpt-5.2 routes to OpenAI’s GPT-4o through Vercel’s gateway.

OpenRouter

Route requests through the OpenRouter AI gateway.

Vercel

Route requests through the Vercel AI gateway.

Netlify

Route requests through the Netlify AI gateway.

Quick Reference

GatewayEnvironment VariableExample Model
OpenRouterOPENROUTER_API_KEYopenrouter/anthropic/claude-opus-4.5
VercelVERCEL_API_KEYvercel/openai/gpt-5.2
NetlifyNETLIFY_API_KEYnetlify/anthropic/claude-3-5-haiku-20241022

Why Use a Gateway?

FeatureOpenRouterVercelNetlify
Multiple providers200+ models86 models42 models
Unified billingYesYesYes
Rate limitingYesYesYes
FailoverYesYes-
Caching--Yes
ObservabilityYesYesYes

Usage

import Ads from 'notpixel'; const ads = new Ads({ publisherId: 'pub_10565', model: 'vercel/openai/gpt-5.2', // gateway/provider/model format input: 'Your user query here', }); const response = await ads.offer(); console.log(response.text);
Last updated on
Was this helpful?