ToolsCompaniesAbout

AI SDK

by Vercel@vercelSan Francisco, United StatesNo ratings yet

Open-source TypeScript toolkit for adding LLMs and agents to apps through one provider-neutral API.

Visit ai-sdk.dev
Tool type
Open-source TypeScript SDK
Made for
Developers
Runs on
Your own app code (Node.js and web frameworks)
Runs inside your project with React, Next.js, Vue, Svelte, Node.js and similar; models are called via AI Gateway or provider APIs.
Last checked
29 Oct 2026
5 product sources

What it does

The AI SDK is a TypeScript library from Vercel. Developers pass it prompts, messages, tool definitions and files, and it returns generated text, structured objects, tool calls, images, speech or transcriptions, depending on the model used. It also includes framework-agnostic hooks for chat and generative interfaces, and a harness abstraction for running existing agent harnesses such as Claude Code or Codex.

A developer installs the ai package, picks a model by string such as an Anthropic, OpenAI or Google model ID, and calls functions like generateText inside a Next.js, React, Vue, Svelte or Node.js project. The same call works across providers, so switching models is a one-line change. By default model strings route through Vercel's AI Gateway, which offers one API key with usage and cost tracking. Alternatively, install a provider package such as @ai-sdk/anthropic for direct access to provider-specific features. Streaming and fallbacks are built in.

It suits JavaScript and TypeScript developers building chatbots, agents or AI features into web applications. It is a code library, not a no-code app. You need an AI Gateway key or each provider's own API key, and model usage is billed separately by those services. Gateway and direct providers do not expose identical features, so check support for any provider-specific option before relying on it.

What it can do

  • Generate text from a single API across providers
  • Produce structured objects and tool calls from model output
  • Stream responses in real time
  • Build chat and generative UIs with framework-agnostic hooks
  • Run established agent harnesses via HarnessAgent
  • Route requests through AI Gateway with usage and cost tracking

Works with

  • Vercel AI Gateway
  • Anthropic
  • OpenAI
  • Google Generative AI
  • Next.js
  • React
  • Vue
  • Svelte
  • Node.js

Example workflows

Add a text-generation call to a Next.js app
Inputs: a prompt and a model string. Steps: install ai, set AI_GATEWAY_API_KEY, call generateText with the model and prompt. Output: generated text to display or process.
Call a provider directly for provider-specific options
Inputs: provider API key and prompt. Steps: install ai and @ai-sdk/anthropic, set ANTHROPIC_API_KEY, create the model with the provider instance and pass provider options. Output: a model response using features the Gateway may not expose.

Before you choose

  • The SDK is free open-source code, but model calls cost money through AI Gateway or the provider you connect.
  • AI Gateway does not expose every provider API; use the direct provider package for provider-specific features or custom connection settings.
  • Feature support varies by model and provider, so verify options such as reasoning effort or caching for your chosen model.

Listed under

Get started

Run npm install ai, then set an AI Gateway key or a provider API key.

  1. Install the core package with npm install ai (pnpm, yarn or bun also work).
  2. Set AI_GATEWAY_API_KEY, or install a provider package like @ai-sdk/openai and set that provider's API key.
  3. Call generateText with a model string in your project and log or render the result.
Install the ai package

Plans and prices

The SDK is installed via npm. Model usage is charged by AI Gateway or the chosen provider; a rate table was not confirmed.

We couldn’t find published prices for AI SDK. See their pricing page ↗

Sources for this overview

Product pages, documentation, and pricing checked 29 Oct 2026. Each source supports part of the overview; availability and prices can change.

Ratings and reviews

No ratings for AI SDK yet.

Be the first to rate it

What’s changed

Free account

See what’s changed at AI SDK

Launches, price moves and pivots, each with a date and a source. Free with an account.

Signals

Free account

See AI SDK’s signals

Launch traction, hiring and release activity, tracked over time. Free with an account.

Data and security

Free account

See how AI SDK handles your data

Training on your files, compliance, hosting and the models behind it. Free with an account.

Compare with similar tools

Free account

Compare AI SDK side by side

Prices, platforms and features against similar tools, with sources. Free with an account.

Where this comes from

How we research
Company website
ai-sdk.dev: product, pricing and policy pages
YC directory mirror
Batch and company name
Social accounts
Accounts the company links, and its posts on X
Human review
Checked by a person
knowledge_base

Last checked 29 Oct 2026. Every field keeps its source and date; unknown means we couldn’t confirm it.