The AI layer for building frameworks and agents on Vercel
A unified TypeScript SDK for building AI apps with modern streaming, multi-model, and provider-agnostic capabilities
The framework agnostic AI toolkit
AI SDK features
- Multi-provider supportSwitch providers with one line of code.
- Streaming that just worksReal-time responses without custom parsing.
- Built-in fallbacksReliable production behavior by default.
- AI Gateway compatibleRoute to any model through one endpoint.
AI SDK code examples
generate-text.ts
Explain quantum entanglement.
Ask a question…
Scale with confidence
Plug the AI SDK into an entire ecosystem designed for modern AI applications that scale.
Vercel AI GatewayAccess 100+ models with no markup or having to manage multiple API keys.
Vercel SandboxRun agent generated code securely and at scale.
WorkflowsNewBuild long running AI agents and apps that can suspend, resume, and survive function timeouts.
AI ElementsA UI component library and custom registry built to build AI-native applications faster.
“OpenCode uses AI SDK.”
Build with the AI SDK today
Chatbot Starter TemplateLearn how to build a full-featured AI chatbot with persistence, multi-modal chat, and more.
Build a Slackbot AgentLearn how to build a Slackbot that responds to direct messages and mentions in channels.
Build a SQL AgentLearn how to build an app that interacts with a PostgreSQL database using natural language.