---
title: Route through Vercel AI Gateway
description: Send model calls through the Vercel AI Gateway on one key.
---
> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reeval.ai/llms.txt
> Use this file to discover all available pages before exploring further.

`vercel()` sends the model calls of the harnesses it serves through the Vercel AI Gateway, on one key. The egress gateway swaps the key in only on Vercel's model paths at `ai-gateway.vercel.sh`, so the key never enters the sandbox.

## Credential

`vercel()` reads `AI_GATEWAY_API_KEY`, or `VERCEL_OIDC_TOKEN` when the key is unset, from the environment or the `.env.local` file. A run exits with code 2 when neither is set, or when `VERCEL_OIDC_TOKEN` has expired. `vercel env pull` writes a new token, which lasts about 12 hours.

For more information about the variables, see [`AI_GATEWAY_API_KEY`](/reference/environment-variables#aigatewayapikey) and [`VERCEL_OIDC_TOKEN`](/reference/environment-variables#verceloidctoken).

## Helper

`vercel()` is exported from `{{ pkg }}/gateway`. It takes no options:

```ts title="reeval.config.ts"
import { defineConfig } from '{{ pkg }}'
import { direct, vercel } from '{{ pkg }}/gateway'

export default defineConfig({
  gateway: [vercel(), direct()],
})
```

A harness `vercel()` cannot serve takes the next gateway in the list.

For more information about combining gateways, see [Gateways](/configuration/gateways).

## Harnesses and models

For the harnesses `vercel()` serves, and the ones that fall through to the next gateway, see [Harness support](/configuration/gateways#harness-support).

On `vercel()`, a judge must be a decision model, such as `typesafe-ai/jev-1.14.0`, and each call to a language-model judge fails. Analysis, captures, and questions take language models.
