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.
In more detail
What it means
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).
Part 1 of 2
When to use it, and when not
Use it for
- Any production LLM integration.
Part 2 of 2
Common mistakes
- Hand-rolling HTTP calls — miss retries, streaming, type safety.
- Pinning to ancient SDK — miss new features for months.
FAQ
Questions readers ask.
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 you use ai sdk?
Any production LLM integration.
What are the 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. Found a mistake? Tell us.