# Set up Vercel AI Gateway

Last validated Apr 15, 2026

\[Missing snippet: aperture\_release\_note.mdx]

Configure a Vercel AI Gateway provider in Aperture so your team can access models from multiple LLM providers through a single gateway endpoint. Vercel AI Gateway aggregates providers like OpenAI and Anthropic behind one API, supporting both the chat completions and responses APIs.

\[Missing snippet: aperture\_any\_provider.mdx]

## Prerequisites

Before you begin, you need:

* An Aperture instance accessible from your device. Refer to [get started with Aperture][kb-aperture-get-started] if you have not set this up.
* A [Vercel API token][xt-vercel-tokens].

## Configure the provider

Add Vercel AI Gateway as a provider in your [Aperture configuration][kb-aperture-configuration]:

```json
{
  "providers": {
    "vercel": {
      "baseurl": "https://ai-gateway.vercel.sh",
      "apikey": "<your-vercel-token>",
      "models": [
        "anthropic/claude-sonnet-4-6",
        "openai/gpt-5.4-nano"
      ],
      "cost_basis": "vercel",
      "compatibility": {
        "openai_chat": true,
        "openai_responses": true
      }
    }
  }
}
```

> **Warning:**
>
> Do not include `/v1` in the Vercel AI Gateway `baseurl`. Set it to `https://ai-gateway.vercel.sh` (without `/v1`). Including `/v1` causes every request to fail with HTTP 405 because the upstream URL becomes `https://ai-gateway.vercel.sh/v1/v1/chat/completions`. Refer to [how Aperture builds upstream URLs][kb-aperture-url-construction] for details.

You must set `cost_basis` to `"vercel"` because Aperture cannot auto-infer pricing for gateway providers. Without an explicit `cost_basis`, Aperture does not produce cost estimates for requests to this provider.

Model names use a `provider/model` prefix format. The `openai_chat` flag enables the chat completions API and `openai_responses` enables the Responses API, which tools like OpenAI Codex use. Refer to the [provider compatibility reference][kb-provider-compatibility] for the full list of flags.

After configuring the provider:

1. [Grant model access][kb-grant-model-access] to the users or groups that need these models.
2. [Set up LLM clients][kb-use-your-tools] to connect coding tools through Aperture.

## Verify the provider

\[Missing snippet: aperture\_verify\_provider.mdx]

## Next steps

* [Grant model access][kb-grant-model-access] to users or groups that need these models.
* [Set up LLM clients][kb-use-your-tools] to connect coding tools through Aperture.
* Refer to the [provider compatibility reference][kb-provider-compatibility] for the full list of compatibility flags and configuration options.

[kb-aperture-configuration]: /docs/aperture/configuration

[kb-aperture-get-started]: /docs/aperture/get-started

[kb-aperture-url-construction]: /docs/aperture/configuration#how-aperture-builds-upstream-urls

[kb-grant-model-access]: /docs/aperture/how-to/grant-model-access

[kb-provider-compatibility]: /docs/aperture/provider-compatibility

[kb-use-your-tools]: /docs/aperture/use-your-tools

[xt-vercel-tokens]: https://vercel.com/account/tokens
