tool

AI SDK

An AI SDK is the official client library a vendor ships for calling their model APIs — Anthropic SDK, OpenAI SDK, Google GenAI SDK, Mistral SDK, Vercel AI SDK (multi-vendor wrapper). Handles auth, retries, streaming, types.

Calling HTTP APIs directly works but loses ergonomics: each vendor's quirks (auth header naming, streaming format, error retry policy) become app code. AI SDKs abstract this: official client libraries handle auth, automatic retries with backoff, streaming responses, type safety, tool use round-trips. 2026 landscape: vendor-official SDKs (Anthropic SDK, OpenAI SDK, Google GenAI SDK, Mistral SDK, Cohere SDK), multi-vendor wrappers (Vercel AI SDK, LiteLLM, Vellum), language-specific (TypeScript / Python first-class, Go / Rust / Java second). Production tips: pin SDK version (breaking changes happen), use multi-vendor wrappers if you need portability, monitor SDK changelog for new features (prompt caching, computer use, MCP arrived through SDK updates).

When to use ai sdk

Common mistakes

FAQ

What is ai sdk?

An AI SDK is the official client library a vendor ships for calling their model APIs — Anthropic SDK, OpenAI SDK, Google GenAI SDK, Mistral SDK, Vercel AI SDK (multi-vendor wrapper). Handles auth, retries, streaming, types.

When should I use ai sdk?

Any production LLM integration.

What are the most common mistakes with ai sdk?

Hand-rolling HTTP calls — miss retries, streaming, type safety. Pinning to ancient SDK — miss new features for months.

Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/ai-sdk.md.