Vercel AI Gateway
Vercel AI Gateway 設定(認証 + モデル選択)
'<a href="https://vercel.com/ai-gateway" className="text-emerald-400 hover:text-emerald-300 transition-colors">'Vercel AI Gateway'</a>' は、単一のエンドポイントを通じて数百のモデルにアクセスするための統一 API を提供します。
- プロバイダー:'<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
クイックスタート
1. API キーを設定する(推奨:Gateway 用に保存する):
openclaw onboard --auth-choice ai-gateway-api-key
2. デフォルトモデルを設定する:
{
agents: {
defaults: {
model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.5" },
},
},
}非対話型の例
openclaw onboard --non-interactive --mode local --auth-choice ai-gateway-api-key --ai-gateway-api-key "$AI_GATEWAY_API_KEY"
環境の注意事項
Gateway がデーモンとして実行される場合(launchd/systemd)、'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'AI_GATEWAY_API_KEY'</code>'
がそのプロセスで利用可能であることを確認してください(例えば、'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'~/.openclaw/.env'</code>' で、または
'<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'env.shellEnv'</code>').