The core package is simply called ai:
pnpm add ai
Add a provider — here OpenAI as an example:
pnpm add @ai-sdk/openai
Other providers follow the same pattern: @ai-sdk/anthropic, @ai-sdk/google, etc.
Everything you need for backend generation lives in the ai package:
import { generateText, streamText, Output } from "ai";
import { openai } from "@ai-sdk/openai";
# .env
OPENAI_API_KEY=sk-...
The provider SDKs read the relevant env var automatically (e.g. OPENAI_API_KEY for @ai-sdk/openai).
Note: You do not need to deploy to Vercel to use the AI SDK — it runs anywhere Node.js runs.