Vercel AI Gateway
Vercel AI Gateway setup (auth + model selection)
The '<a href="https://vercel.com/ai-gateway" className="text-emerald-400 hover:text-emerald-300 transition-colors">'Vercel AI Gateway'</a>' provides a unified API to access hundreds of models through a single endpoint.
- Provider: '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'vercel-ai-gateway'</code>'
- Auth: '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'AI_GATEWAY_API_KEY'</code>'
- API: Anthropic Messages compatible
Quick start
1. Set the API key (recommended: store it for the Gateway):
openclaw onboard --auth-choice ai-gateway-api-key
2. Set a default model:
{
agents: {
defaults: {
model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.5" },
},
},
}Non-interactive example
openclaw onboard --non-interactive --mode local --auth-choice ai-gateway-api-key --ai-gateway-api-key "$AI_GATEWAY_API_KEY"
Environment note
If the Gateway runs as a daemon (launchd/systemd), make sure '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'AI_GATEWAY_API_KEY'</code>'
is available to that process (for example, in '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'~/.openclaw/.env'</code>' or via
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'env.shellEnv'</code>').