Skip to content
BENIBIX Learn

Vercel AI SDK

Development🧬 AI EngineeringLLM Frameworks

Also known as AI SDK, AI SDK by Vercel, AI SDK Core

A TypeScript kit for AI apps. One set of calls works with every model.

Think of it like

It is like one key for every door in the house.

Example

Emma builds a chat page in Next.js. streamText sends the reply in small pieces, and a hook on the page shows each piece as it arrives.

Why it matters

Web developers can add a chat that streams, without writing the hard parts. Changing models does not mean a rewrite.

Definition

The Vercel AI SDK is a TypeScript toolkit for building AI apps and agents. Its core part gives one set of calls, like generateText and streamText, for every model provider. Its UI part gives hooks for chat screens in React, Vue and Svelte. You switch models by changing one model name. It is made by Vercel, the company behind Next.js.

Example code

typescript
import { streamText } from "ai";

const result = streamText({
  model: "anthropic/claude-sonnet-5.5",
  messages: [{ role: "user", content: "Hello!" }],
});

for await (const delta of result.textStream) {
  process.stdout.write(delta);
}
A plain model name goes through Vercel's AI Gateway. The reply streams in piece by piece.
The Vercel AI SDK is the TypeScript one, made for streaming chat screens.

Common mistake

Calling a model from code that runs in the browser. The calls belong on the server, so your keys stay secret.

Key takeaways

  1. 1
    Core and UI. Calls on the server, hooks on the page.
  2. 2
    Any provider. Change one model name.
  3. 3
    Built for streaming. Replies show as they arrive.