AI SDK
The AI SDK is the TypeScript toolkit designed to help developers build AI-powered applications with React, Next.js, Vue, Svelte, Node.js, and more.
Why use the AI SDK?
Integrating large language models (LLMs) into applications is complicated and heavily dependent on the specific model provider you use.
- AI SDK Core: A unified API for generating text, structured objects, and tool calls with LLMs.
- AI SDK UI: A set of framework-agnostic hooks for quickly building chat and generative user interface.
- AI SDK RSC: A library to stream generative user interfaces with React Server Components (RSC).
Model Providers
The AI SDK supports multiple model providers.
OpenAI
Image InputObject GenerationTool UsageTool Streaming
Azure
Image InputObject GenerationTool UsageTool Streaming
Anthropic
Image InputObject GenerationTool UsageTool Streaming
Amazon Bedrock
Image InputObject GenerationTool UsageTool Streaming
Google Generative AI
Image InputObject GenerationTool UsageTool Streaming
Google Vertex AI
Image InputObject GenerationTool UsageTool Streaming
Mistral
Image InputObject GenerationTool UsageTool Streaming
Groq
Object GenerationTool UsageTool Streaming
Perplexity
Object GenerationTool UsageTool Streaming
Fireworks
Object GenerationTool UsageTool Streaming
Cohere
Templates
We've built some templates that include AI SDK integrations for different use cases, providers, and frameworks. You can use these templates to get started with your AI-powered application.
Frameworks
Next.js OpenAI Starter
Uses OpenAI GPT-4, Vercel AI SDK, and Next.js.
Nuxt OpenAI Starter
Uses OpenAI GPT-4, Vercel AI SDK, and Nuxt.js.
SvelteKit OpenAI Starter
Uses OpenAI GPT-4, Vercel AI SDK, and SvelteKit.
Solid OpenAI Starter
Uses OpenAI GPT-4, Vercel AI SDK, and Solid.
Generative UI
GPT-4 Chatbot
Uses OpenAI GPT-4, Vercel AI SDK, and Next.js.
Gemini Chatbot
Uses Google Gemini, Vercel AI SDK, and Next.js.
Security
Bot Protection
Uses Kasada, OpenAI GPT-4, Vercel AI SDK, and Next.js.
Rate Limiting
Uses Vercel KV, OpenAI GPT-4, Vercel AI SDK, and Next.js.
Join our Community
If you have questions about anything related to the AI SDK, you're always welcome to ask our community on GitHub Discussions.