What Vercel AI SDK is best for
The AI SDK is an open-source TypeScript library from Vercel, the company behind Next.js, installed with `npm install ai` and requiring Node.js 22 or later. Its job is to hide the differences between model providers: AI SDK Core gives one API for generating text, structured objects validated against a schema, tool calls and agents, so switching from one provider's model to another is mostly a change of model string. AI SDK UI adds framework-agnostic hooks such as useChat for building chat and generative interfaces in Next.js, React, Svelte and Vue, and the docs now also describe a harness layer (HarnessAgent) for running existing agent harnesses such as Claude Code, Codex and Pi through the same stream primitives. The providers page lists first-party packages for OpenAI, Anthropic, Google, Google Vertex, xAI, Mistral, DeepSeek, Groq, Cohere, Alibaba, Moonshot AI, Together AI, Fireworks, DeepInfra, Cerebras, Hugging Face and Baseten, with community providers on top, and notes that not every provider supports every feature. By default, plain model strings are routed through Vercel's own AI Gateway; you can instead install a provider package and call that provider directly with your own key. The library itself is free: the LICENSE file on GitHub is Apache 2.0 (copyright Vercel, Inc.), and there is no paid tier for the SDK. What you pay for is model usage, either to each provider or through AI Gateway credits - we could not load Vercel's AI Gateway pricing page today, so check it on the official site before relying on the default routing. Version 7 is the current documentation, with v6 and v5 kept as maintenance docs, and the GitHub repository showed 27.4k stars and 5.4k forks when we checked. It is a building block for developers rather than a finished app: you write the code, host it, and handle prompts, data and costs yourself. For Korean readers, the documentation, cookbook and examples are English-only; whether your app handles Korean well depends on the model you plug in, not on the SDK.
- Free and Apache 2.0 licensed, from the team behind Next.js, with a large user base (27.4k GitHub stars when checked)
- Switching between model providers is mostly a one-line change, which reduces lock-in to a single AI company
- Backend calls and frontend chat UI come from one toolkit, with versioned docs, a cookbook and an llms.txt file for coding assistants
- Documentation, cookbook and examples are English-only, and it is a developer library - you cannot use it without writing TypeScript code
- The SDK is free but model usage is not; costs go to each provider or to Vercel AI Gateway, whose pricing page we could not load today
- Plain model strings route through Vercel's own AI Gateway by default, so you have to opt for direct provider packages if you want to avoid that dependency
- Feature support varies by provider and model, and fast major versions (v5, v6, v7) mean code and tutorials go out of date quickly
- It overlaps with agent frameworks such as Mastra and LangChain; it is a lower-level toolkit, so hosting, data and orchestration are up to you