AI SDK by Vercel
The AI SDK is the TypeScript toolkit designed to help developers build AI-powered applications and agents with React, Next.js, Vue, Svelte, Node.js, and more.Installation
Get started by installing the AI SDK in your project
Quickstart
Build your first AI application in minutes
AI SDK Core
Generate text, structured objects, and build agents with LLMs
AI SDK UI
Framework-agnostic hooks for chat and generative interfaces
Why use the AI SDK?
Integrating large language models (LLMs) into applications is complicated and heavily dependent on the specific model provider you use. The AI SDK standardizes integrating artificial intelligence (AI) models across supported providers. This enables developers to focus on building great AI applications, not waste time on technical details.Unified API across providers
Switch between different AI providers with minimal code changes. The AI SDK provides a consistent interface whether you’re using OpenAI, Anthropic, Google, or other providers:Or use Vercel AI Gateway
The Vercel AI Gateway provides instant access to all major providers with a single API key:Core capabilities
The AI SDK has two main libraries:AI SDK Core
A unified API for generating text, structured objects, tool calls, and building agents with LLMs.
AI SDK UI
Framework-agnostic hooks for quickly building chat and generative user interfaces.
Generate text
Generate text completions with streaming support:Generate structured data
Generate type-safe structured outputs using Zod schemas:Build agents with tools
Create agents that can use tools to accomplish tasks:Stream text and UI
Stream responses for real-time user interfaces:Supported providers
The AI SDK supports multiple model providers out of the box:OpenAI
GPT-4o, GPT-4, GPT-3.5 Turbo
Anthropic
Claude 4.5, Claude 3.5 Sonnet
Gemini 2.5 Flash, Gemini Pro
Mistral
Mistral Large, Mistral Medium
Meta
Llama 3.3, Llama 3.1
And more
Amazon Bedrock, Azure, Cohere, and custom providers
Framework integrations
Build AI applications with your favorite framework:Next.js
React Server Components and App Router support
React
Hooks for building chat interfaces
Vue
Composables for Vue 3 applications
Svelte
Stores and utilities for Svelte apps
Node.js
Express, Fastify, and native HTTP support
Angular
Services for Angular applications
Next steps
Install the SDK
Set up the AI SDK in your project
Build your first app
Follow the quickstart guide
Explore providers
Learn about available AI providers
API reference
Dive into the complete API documentation