Vercel AI Gateway
The Vercel AI Gateway provides a unified API to access hundreds of models through a single endpoint, with built-in observability and rate limiting.Vercel AI Gateway does not host models itself. It proxies requests to underlying providers (Anthropic, OpenAI, etc.). You still need a Vercel AI Gateway API key.
Prerequisites
- A Vercel account with AI Gateway enabled
- An AI Gateway API key (
AI_GATEWAY_API_KEY)
Quick setup
1. Get an API key
In the Vercel dashboard, enable AI Gateway and create an API key. Store it on the gateway host:2. Run onboarding
3. Configure
apiKey is the name of the environment variable, not the key value itself. Keep secrets in .env, not in committed config files.Provider settings
| Setting | Value |
|---|---|
| Provider ID | vercel-ai-gateway |
| API | Anthropic Messages compatible |
| Auth env var | AI_GATEWAY_API_KEY |
Model ID format
Model IDs follow the Vercel AI Gateway routing format:vercel-ai-gateway/<upstream-provider>/<model-id>.
WednesdayAI accepts Claude shorthand model refs and normalises them at runtime:
| Shorthand | Resolved as |
|---|---|
vercel-ai-gateway/claude-opus-4.6 | vercel-ai-gateway/anthropic/claude-opus-4-6 |
vercel-ai-gateway/opus-4.6 | vercel-ai-gateway/anthropic/claude-opus-4-6 |
Verification
Troubleshooting
401 Unauthorized
401 Unauthorized
Model not found
Model not found
Confirm the model ID path matches the Vercel AI Gateway routing format. Check the Vercel AI Gateway docs for supported providers and model IDs.
Upstream provider error
Upstream provider error
Vercel AI Gateway forwards errors from the underlying provider. Verify the upstream provider is enabled in your Vercel AI Gateway configuration.