Skip to main content

Vercel AI Gateway

Use this when Vercel AI Gateway sits in front of the actual model vendors and you want that ownership boundary documented directly in the provider profile.

At A Glance

FieldValue
Built-in kindvercel_ai_gateway
Provider groupGateway And Compatibility Providers
Protocol familyopenai_chat_completions
Feature familyopenai_compatible
Auth schemebearer
Credential envsAI_GATEWAY_API_KEY, VERCEL_API_KEY
Aliasesvercel-ai-gateway, vercel_ai, vercel-ai, vercel
Default base URLhttps://ai-gateway.vercel.sh/v1
Request endpointhttps://ai-gateway.vercel.sh/v1/chat/completions
Models endpointhttps://ai-gateway.vercel.sh/v1/models

Minimal Config

active_provider = "vercel_ai_gateway"

[providers.vercel_ai_gateway]
kind = "vercel_ai_gateway"
api_key = { env = "AI_GATEWAY_API_KEY" }
model = "auto"

Verify It

loong doctor
loong list-models
loong ask --message "Say hello and name the active provider."
If list-models is unreliable for this account or region, pin an explicit provider.model or add preferred_models instead of leaving recovery implicit.

Auth And Routing Contract

ContractValue
Auth optionalno
Model probe auth optionalyes
Default API key envAI_GATEWAY_API_KEY
OAuth envnone
Primary request routehttps://ai-gateway.vercel.sh/v1/chat/completions
Primary model-catalog routehttps://ai-gateway.vercel.sh/v1/models