---
title: "Vercel"
description: "Connect BillionVerify to your Vercel project with Vercel Connect: one API key for the REST API, the MCP server and the agent skill, plus an AI SDK tool example."
---

BillionVerify is available as a connector in [Vercel Connect](https://vercel.com/docs/connect). The connector stores a BillionVerify API key for your team, and your code reads it at runtime instead of keeping it in an environment variable. One key works for the REST API, the `billionverify-mcp` server and the BillionVerify agent skill.

## Set up the connector

1. Sign in to BillionVerify and create a key under [API keys](https://billionverify.com/auth/sign-in?next=/settings/api-keys).
2. In the Vercel dashboard, open **Connect**, find **BillionVerify** and create a connector. Paste the API key when asked. With the Vercel CLI:

   ```bash
   vercel connect create billionverify --name acme-billionverify
   ```

3. Install the client in your project:

   ```bash
   npm install @vercel/connect
   ```

## Call the API

Read the key with `getToken` and send it in the `BV-API-KEY` header to `https://api.billionverify.com`:

```ts
import { getToken } from '@vercel/connect';

const apiKey = await getToken('billionverify/acme-billionverify', {
  subject: { type: 'app' },
});

const res = await fetch('https://api.billionverify.com/v1/verify/single', {
  method: 'POST',
  headers: { 'BV-API-KEY': apiKey, 'Content-Type': 'application/json' },
  body: JSON.stringify({ email: 'support@billionverify.com' }),
});
const result = await res.json();
```

Replace `acme-billionverify` with the name you gave the connector. The API also accepts the key as `Authorization: Bearer <key>`. Every endpoint, request and response is in the [API Reference](/docs/api-reference).

## Use it as an AI SDK tool

With the [AI SDK](https://ai-sdk.dev), give a model a tool that verifies addresses with the connector's key:

```ts
import { getToken } from '@vercel/connect';
import { generateText, stepCountIs, tool } from 'ai';
import { z } from 'zod';

const verifyEmail = tool({
  description:
    'Verify whether an email address is deliverable. Returns its status (valid, invalid, catchall, disposable, role or unknown) and details.',
  inputSchema: z.object({
    email: z.string().describe('The email address to verify'),
  }),
  execute: async ({ email }) => {
    const apiKey = await getToken('billionverify/acme-billionverify', {
      subject: { type: 'app' },
    });
    const res = await fetch('https://api.billionverify.com/v1/verify/single', {
      method: 'POST',
      headers: { 'BV-API-KEY': apiKey, 'Content-Type': 'application/json' },
      body: JSON.stringify({ email }),
    });
    if (!res.ok) throw new Error(`Verification failed: ${res.status}`);
    return res.json();
  },
});

const { text } = await generateText({
  model: 'anthropic/claude-sonnet-4.5',
  tools: { verifyEmail },
  stopWhen: stepCountIs(3),
  prompt: 'Which of these will bounce: john@google.com, test@mailinator.com?',
});
```

## MCP and the agent skill

- **MCP clients** that run local servers can start the open-source server with the same key: `BILLIONVERIFY_API_KEY=<key> npx billionverify-mcp`. See [MCP server](/docs/ai-guides/mcp#run-it-with-an-api-key).
- **Coding agents** can install the skill with `npx skills add BillionVerify/billionverify-skill` and read the key from `BILLIONVERIFY_API_KEY`. See [Agent Skills](/docs/ai-guides/agent-skills).
