Favicon of Vercel AI SDK

Vercel AI SDK

A free TypeScript library for AI apps and agents, with streaming, provider switching, and chat UI hooks for React, Next.js, Svelte, and Vue.

Screenshot of Vercel AI SDK website

Vercel AI SDK is a TypeScript library for developers building chatbots, generative interfaces, and AI agents. It gives an application one way to work with models from providers such as OpenAI, Anthropic, and Google, so teams can change providers without rebuilding the parts of their app that handle responses. It suits developers who want control over the application they build while choosing how it connects to model services.

The core library handles text generation, structured output, tool calls, and agent workflows. Streaming is built in. It also supports image and video generation, speech, and transcription, with fallbacks and error handling for applications that depend on model responses. A separate UI library provides hooks for chat and generative interfaces in React, Next.js, Svelte, and Vue; the toolkit also works with Node.js.

Model requests use Vercel AI Gateway by default. Developers can connect directly to providers instead, including OpenAI, Anthropic, and Google. That choice matters if an application already uses particular model providers or needs to change them later. The SDK is free and runs as part of the developer's application; the selected gateway or provider handles its model requests.

Similar to Vercel AI SDK