Logo SVG copied to clipboard

Use Vercel AI SDK with the LLM gateway

488K tokens / 30 days
App AI SDK

The Vercel AI SDK lets you ship streaming AI features in minutes. Plug it into the gateway and the same generateText, streamText, and tool calls fan out across providers, at the lowest possible cost.

4 models routed through the gateway over the last 30 days.

Why use the Vercel AI SDK with the gateway

The Vercel AI SDK accepts any OpenAI-compatible endpoint via createOpenAI. The gateway is that endpoint, but instead of one provider, it gives you many, with smart routing and one bill.

  • Drop-in: a single createOpenAI call
  • Streaming, tool calls, and structured output all pass through unchanged
  • Use "auto" to let the gateway pick the right model
  • Or pin a specific model when you need consistency
  • Per-app and per-feature spend caps from the gateway dashboard
  • Cost, latency, and token tracking out of the box

Setup in 60 seconds

Initialize the SDK with the gateway baseURL and API key. The rest of your Vercel AI SDK code stays the same.

Install the SDK and create an OpenAI-compatible client pointing at the gateway:

import { createOpenAI } from "@ai-sdk/openai";
import { generateText } from "ai";

const manifest = createOpenAI({
  baseURL: "https://api.manifest.build/v1",
  apiKey: "mnfst_YOUR_KEY",
});

const { text } = await generateText({
  model: manifest("auto"),
  prompt: "Hello",
});
baseURL https://api.manifest.build/v1
apiKey mnfst_YOUR_KEY
model auto

Vercel AI SDK tokens processed by the gateway

Models in use

# Model
Auth type Tokens / last 30 days
1.Deepseek V4 Flash
API Key456 K
2.Kilo Auto Free
API Key16 K
3.Claude Sonnet 4 6
Subscription12 K
4.Claude Haiku 4 5 20251001
Subscription4 K