Vercel AI Gateway Setup: Auth and Model Selection
Learn how to set up the Vercel AI Gateway provider in OpenClaw, including API key configuration and model selection. This guide is for developers integrating multiple AI models through a single endpoint.
Read this when
- You want to use Vercel AI Gateway with OpenClaw
- You need the API key env var or CLI auth choice
The Vercel AI Gateway offers a single API endpoint that gives you access to hundreds of models.
| Property | Value |
|---|---|
| Provider | vercel-ai-gateway |
| Package | @openclaw/vercel-ai-gateway-provider |
| Auth | AI_GATEWAY_API_KEY |
| API | Anthropic Messages compatible |
| Base URL | https://ai-gateway.vercel.sh |
| Model catalog | Auto-discovered via /v1/models |
Tip
OpenClaw automatically finds the Gateway
/v1/modelscatalog, so both the/models vercel-ai-gatewaychat command andopenclaw models list --provider vercel-ai-gatewaycontain current model references such asvercel-ai-gateway/openai/gpt-5.5andvercel-ai-gateway/moonshotai/kimi-k2.6.
Getting started
Install the plugin
openclaw plugins install @openclaw/vercel-ai-gateway-provider
Set the API key
openclaw onboard --auth-choice ai-gateway-api-key
Set a default model
{
agents: {
defaults: {
model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.6" },
},
},
}
Verify the model is available
openclaw models list --provider vercel-ai-gateway
Non-interactive example
openclaw onboard --non-interactive \
--mode local \
--auth-choice ai-gateway-api-key \
--ai-gateway-api-key "$AI_GATEWAY_API_KEY"
Model ID shorthand
OpenClaw resolves Claude shorthand model references at runtime:
| Shorthand input | Normalized model ref |
|---|---|
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 |
Tip
You can use either form in your configuration; OpenClaw automatically resolves the canonical
anthropic/...reference.
Advanced configuration
Environment variable for daemon processes
If the OpenClaw Gateway runs as a daemon (launchd/systemd), make sure
AI_GATEWAY_API_KEY is available to that process.
Warning
A key exported only in an interactive shell will not be visible to a launchd/systemd daemon unless that environment is explicitly imported. Set the key in
~/.openclaw/.envor viaenv.shellEnvto ensure the gateway process can read it.
Provider routing
Vercel AI Gateway sends each request to the upstream provider indicated by the
model reference prefix. For instance, vercel-ai-gateway/anthropic/claude-opus-4.6
goes through Anthropic, vercel-ai-gateway/openai/gpt-5.5 goes through
OpenAI, and vercel-ai-gateway/moonshotai/kimi-k2.6 goes through
MoonshotAI. A single AI_GATEWAY_API_KEY authenticates all upstream providers.
Thinking levels
/think options follow the upstream model prefix when OpenClaw recognizes
it. vercel-ai-gateway/anthropic/... uses the Claude thinking profile,
including the adaptive default for Claude 4.6 models. Trusted
vercel-ai-gateway/openai/... references (gpt-5.2 and newer, plus Codex
variants down to gpt-5.1-codex) expose /think xhigh. Other namespaced
references keep the standard reasoning levels unless their catalog metadata
declares more.
Related
-
Model selection, Choosing providers, model references, and failover behavior.
-
Troubleshooting, General troubleshooting and FAQ.