# Vercel AI SDK

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

**Field:** Software Development  
**Category:** AI Engineering  
**Also known as:** AI SDK, AI SDK by Vercel, AI SDK Core

## Think of it like

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

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

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.

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

## Why it matters

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

## Common mistake

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

## Three principles

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

## Related terms

- [LLM Framework](https://learn.benibix.com/term/development/llm-framework)
- [TypeScript](https://learn.benibix.com/term/development/typescript)
- [Next.js](https://learn.benibix.com/term/development/nextjs)
- [React](https://learn.benibix.com/term/development/react)
- [LLM Streaming](https://learn.benibix.com/term/ai/streaming-response)
- [LangChain](https://learn.benibix.com/term/development/langchain)
- [OpenAI Agents SDK](https://learn.benibix.com/term/development/openai-agents-sdk)

![A table of five frameworks, with columns for framework, language and what each is built around. Vercel AI SDK, TypeScript, streaming chat screens. OpenAI Agents SDK, Python and TypeScript, agents handing work to each other. CrewAI, Python, a crew of agents, each with a role. Pydantic AI, Python, answers as typed, checked data. DSPy, Python, tuning prompts from examples. A strip along the bottom says all of them call model APIs underneath.](https://learn.benibix.com/diagrams/dev6-agent-frameworks.svg)

---

Source: https://learn.benibix.com/term/development/vercel-ai-sdk
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-20
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
