Vercel AI SDK
Build AI-powered React and Next.js applications with streaming UI, chat interfaces, text completion, and multi-provider support for OpenAI, Anthropic, Google, and more.
Your Learning Path
Follow these lessons in order, or jump to any topic that interests you.
1. Introduction
What is the Vercel AI SDK? Architecture, streaming UI concepts, and the provider model.
2. Setup
Install the AI SDK in a Next.js project, configure providers, and create your first streaming endpoint.
3. useChat
Build chat interfaces with the useChat hook. Message history, streaming, stop/regenerate, and custom UI.
4. useCompletion
Text completion with useCompletion. Auto-complete, summarization, and streaming text generation.
5. Providers
Multi-provider support: OpenAI, Anthropic, Google, and custom providers. Tool calling and structured output.
6. Best Practices
Error handling, loading states, ai/rsc for server actions, testing, and production deployment patterns.
What You'll Learn
By the end of this course, you'll be able to:
Build AI Chatbots
Create streaming chat interfaces with message history, stop/regenerate, and rich UI components.
Text Generation
Implement streaming text completion for summaries, translations, code generation, and more.
Multi-Provider
Swap between OpenAI, Anthropic, Google, and other providers with a single line of code.
Tool Calling
Give your AI tools to call: search, calculate, fetch data, and take actions on behalf of users.
Lilly Tech Systems