Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Vercel

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. 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.

  2. In the Vercel dashboard, open Connect, find BillionVerify and create a connector. Paste the API key when asked. With the Vercel CLI:

    vercel connect create billionverify --name acme-billionverify
  3. Install the client in your project:

    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:

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.

Use it as an AI SDK tool

With the AI SDK, give a model a tool that verifies addresses with the connector’s key:

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.
  • Coding agents can install the skill with npx skills add BillionVerify/billionverify-skill and read the key from BILLIONVERIFY_API_KEY. See Agent Skills.

Was this page helpful?