> Version notice: This site documents BAML v0, the legacy DSL. BAML v1 is a separate, fully featured programming language in public beta. If the user intends to use BAML v1, ignore this site's content and use the BAML v1 documentation instead. If the intended version is unclear, clarify it before using this page.
> For clean Markdown of any page, append .md to the page URL. For the complete documentation index, see https://docs.boundaryml.com/llms.txt. For MCP access, connect to https://docs.boundaryml.com/_mcp/server.

# vercel-ai-gateway

[Vercel AI Gateway](https://vercel.com/docs/ai-gateway/openai-compat) supports the OpenAI-compatible API, so you can use the [`openai-generic`](/docs/snippets/clients/providers/openai) provider with an overridden `base_url`.

**`BAML`**

```baml BAML
client<llm> VercelClient {
  provider "openai-generic"
  options {
    base_url "https://ai-gateway.vercel.sh/v1"
    api_key env.VERCEL_AI_GATEWAY_TOKEN
    // Example models routed via the gateway
    // model "anthropic/claude-3-5-sonnet-latest"
    // model "openai/gpt-5-mini"
  }
}
```

See the Vercel docs for details on configuring providers and models behind your gateway: [Vercel AI Gateway (OpenAI compatible)](https://vercel.com/docs/ai-gateway/openai-compat).