OpenClaw Reference (Mirrored)

Vercel AI Gateway

Mirrored from OpenClaw (MIT)
This mirror is provided for convenience. OpenClawdBots is not affiliated with or endorsed by OpenClaw.

Vercel AI Gateway

The Vercel AI Gateway provides a unified API to access hundreds of models through a single endpoint.

PropertyValue
Providervercel-ai-gateway
AuthAI_GATEWAY_API_KEY
APIAnthropic Messages compatible
Model catalogAuto-discovered via /v1/models
TIP

OpenClaw auto-discovers the Gateway /v1/models catalog, so /models vercel-ai-gateway includes current model refs such as vercel-ai-gateway/openai/gpt-5.4.

Getting started

  1. Set the API key

    Run onboarding and choose the AI Gateway auth option:

    openclaw onboard --auth-choice ai-gateway-api-key
    
  2. Set a default model

    Add the model to your OpenClaw config:

    {
      agents: {
        defaults: {
          model: { primary: "vercel-ai-gateway/anthropic/claude-opus-4.6" },
        },
      },
    }
    
  3. Verify the model is available
    openclaw models list --provider vercel-ai-gateway
    

Non-interactive example

For scripted or CI setups, pass all values on the command line:

openclaw onboard --non-interactive \
  --mode local \
  --auth-choice ai-gateway-api-key \
  --ai-gateway-api-key "$AI_GATEWAY_API_KEY"

Model ID shorthand

OpenClaw accepts Vercel Claude shorthand model refs and normalizes them at runtime:

Shorthand inputNormalized model ref
vercel-ai-gateway/claude-opus-4.6vercel-ai-gateway/anthropic/claude-opus-4.6
vercel-ai-gateway/opus-4.6vercel-ai-gateway/anthropic/claude-opus-4-6
TIP

You can use either the shorthand or the fully qualified model ref in your configuration. OpenClaw resolves the canonical form automatically.

Advanced notes

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 set only in ~/.profile will not be visible to a launchd/systemd daemon unless that environment is explicitly imported. Set the key in ~/.openclaw/.env or via env.shellEnv to ensure the gateway process can read it.

Provider routing

Vercel AI Gateway routes requests to the upstream provider based on the model ref prefix. For example, vercel-ai-gateway/anthropic/claude-opus-4.6 routes through Anthropic, while vercel-ai-gateway/openai/gpt-5.4 routes through OpenAI. Your single AI_GATEWAY_API_KEY handles authentication for all upstream providers.