Docs
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
CodeRabbit
Cloudflare
AG Grid
SerpAPI
Netlify
OpenRouter
WorkOS
Clerk
Electric
PowerSync
Sentry
Railway
Prisma
Strapi
Unkey
Class References
Function References
Interface References
Type Alias References
Variable References

TanStackAI
ALPHA

A powerful, open-source AI SDK with a unified interface across multiple providers

A powerful, open-source AI SDK with a unified interface across multiple providers. No vendor lock-in, no proprietary formats, just clean TypeScript and honest open source.

Get Started
VanillaReactVueSolidSveltePreact@tanstack/ai-clientAG-UITanStack AITypeScriptPythonPHPOpenRouterOpenAIAnthropicGeminiOllamaGroqGrok/xAIElevenLabsfal.ai

Chat Panel

Type a message...

0
NPM Downloads
0
Stars on GitHub
0
Contributors on GitHub
0
Dependents on GitHub

Provider Agnostic

Official adapters for OpenRouter, OpenAI, Anthropic, Gemini, Ollama, Groq, Grok/xAI, ElevenLabs, and fal.ai. Import only the adapters your app needs.

AG-UI Native Clients

A headless client plus React, Vue, Solid, Svelte, and Preact bindings all speak the same AG-UI request and event protocol.

Typed Tools & Media

Type-safe client/server tools, provider-native tools, structured output, reasoning streams, image, speech, transcription, realtime voice, and video generation.

A complete AI ecosystem, not a vendor platform

TanStack AI is open-source libraries and AG-UI-compatible standards, not a hosted gateway. Bring your client framework, your server runtime, and the AI providers you trust. There is no middleman, no service fee, and no vendor lock-in, just composable tools built for teams that want to own their AI stack.

Client Agnostic

Use the headless client directly or framework bindings for React, Vue, Solid, Svelte, and Preact.

AG-UI Native

Client-to-server requests and server-to-client streams use AG-UI, so compatible clients and servers can interoperate.

Server Agnostic

Build endpoints in TypeScript, Python, or PHP with portable helpers for AG-UI events, SSE, and provider message formats.

Provider Agnostic

Official adapters cover OpenRouter, OpenAI, Anthropic, Gemini, Ollama, Groq, Grok/xAI, ElevenLabs, and fal.ai.

Typed Tools

Define isomorphic tools once, run them on the client or server, gate them with approvals, and use provider-native tools safely.

Model-Aware Types

Provider and model choices narrow options, tools, modalities, and structured outputs at compile time.

Media Generation

Use stable APIs for image, video, speech, transcription, realtime voice, summarization, and generation hooks.

Observable Runtime

Devtools, debug logging, middleware, and observability hooks show what happened across your AI pipeline.

Wow, you've come a long way!
Only one thing left to do...