Skip to main content

Vercel AI Gateway

Vercel AI Gateway provides a unified gateway for multiple AI providers.

Basic Example​

client<llm> VercelClient {
provider "openai-generic"
options {
base_url "https://ai-gateway.vercel.sh/v1"
api_key env.VERCEL_AI_GATEWAY_TOKEN
model "openai/gpt-4o-mini"
}
}

BAML-Specific Options​

OptionTypeDefaultDescription
base_urlstring-https://ai-gateway.vercel.sh/v1
api_keystringenv.VERCEL_AI_GATEWAY_TOKENGateway token
modelstring-Provider/model format

Example Models​

  • anthropic/claude-3-5-sonnet-latest
  • openai/gpt-4o-mini

See Vercel AI Gateway documentation for provider configuration.

See Also​