Vercel AI SDK

An open-source TypeScript toolkit for building AI apps with streaming and a unified model API.

my take

Makes streaming, tool calls and swapping models a one-liner. If you're building AI features in React or Next, this is the layer to start from — free and open source.

The AI SDK is an open-source TypeScript toolkit for building AI features into web apps. It gives you one unified API across model providers, first-class streaming, tool calling and structured output, and tight integration with React, Next, Svelte and Vue. It is the layer that turns "call an LLM" into a few readable lines.

Start with this

ts
import { streamText } from 'ai';
import { openai } from '@ai-sdk/openai';

const result = streamText({
  model: openai('gpt-4o'),
  prompt: 'Explain React Server Components in one paragraph.',
});

// stream tokens to the client as they arrive
for await (const chunk of result.textStream) {
  process.stdout.write(chunk);
}

The take, for AI builders

For AI builders this is the layer to start from: streaming, tool calls and structured output are one-liners, and swapping providers is a single import change, so you're never locked to one model. It pairs naturally with React/Next, and an agent can scaffold a working streaming chat with it in minutes. Reach past it to a heavier framework only when you genuinely need complex multi-step agent orchestration; for most app features, this is all you need.

When to reach for it

✓ Good fit

  • Building AI features in a React, Next, Svelte or Vue app
  • You want streaming, tool calls and structured output without boilerplate
  • You want to swap model providers without rewriting code

✕ Not for

  • You need heavy multi-agent orchestration and graphs (look at LangChain)
  • You're not working in JavaScript or TypeScript

Alternatives

  • A heavier, batteries-included framework when your agent pipeline is genuinely complex.

  • If you just need multi-provider model routing at the API level, not an app SDK.

Visit Vercel AI SDK

Related in AI APIs & models

AI APIs & models

Anthropic API

The API for the Claude family of models, with long context, tool use and prompt caching.

Paid
  • llm
  • api
  • claude
take

Strong at coding, careful reasoning and long context — and the engine behind a lot of the agent tools in this library. Pay-per-token; prompt caching keeps repeat costs down.

Visit ↗
AI APIs & models

ElevenLabs

A voice AI platform for realistic text-to-speech, voice cloning and dubbing via API.

Freemium
  • voice
  • text-to-speech
  • api
take

The best-sounding text-to-speech and voice cloning around, with a clean API. The default when your app needs a voice that doesn't sound like a robot.

Visit ↗
AI APIs & models

fal

An inference platform optimised for fast generative media models like image and video.

Paid
  • inference
  • image
  • video
take

The go-to for fast image and video generation behind an API. If you're building a media-gen feature, its speed and model selection are hard to beat; you pay per use.

Visit ↗