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.

Model Providers

The AI SDK supports multiple model providers.

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.

Starter Kits

Feature Exploration

Frameworks

Generative UI

Security

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.

llms.txt

You can access the entire AI SDK documentation in Markdown format at sdk.vercel.ai/llms.txt. This can be used to ask any LLM (assuming it has a big enough context window) questions about the AI SDK based on the most up-to-date documentation.

Example Usage

For instance, to prompt an LLM with questions about the AI SDK:

  1. Copy the documentation contents from sdk.vercel.ai/llms.txt
  2. Use the following prompt format:
Documentation:
{paste documentation here}
---
Based on the above documentation, answer the following:
{your question}