AI
π€ SDK that enhances your applications with AI capabilities
Install / Use
/learn @TanStack/AIREADME
Become a Sponsor!
</div>TanStack AI
A powerful, type-safe AI SDK for building AI-powered applications.
- Provider-agnostic adapters (OpenAI, Anthropic, Gemini, Ollama, etc.)
- Tree-shakeable adapters - Import only what you need for smaller bundles
- Multimodal content support - Send images, audio, video, and documents
- Image generation - Generate images with OpenAI DALL-E/GPT-Image and Gemini Imagen
- Chat completion, streaming, and agent loop strategies
- Headless chat state management with adapters (SSE, HTTP stream, custom)
- Isomorphic type-safe tools with server/client execution
- Enhanced integration with TanStack Start - Share implementations between AI tools and server functions
- Observability events - Structured, typed events for text, tools, image, speech, transcription, and video (docs)
<a href="https://tanstack.com/ai">Read the docs β</a>
Tree-Shakeable Adapters
Import only the functionality you need for smaller bundle sizes:
// Only chat functionality - no summarization code bundled
import { openaiText } from '@tanstack/ai-openai/adapters'
import { generate } from '@tanstack/ai'
const textAdapter = openaiText()
const result = generate({
adapter: textAdapter,
model: 'gpt-4o',
messages: [{ role: 'user', content: [{ type: 'text', content: 'Hello!' }] }],
})
for await (const chunk of result) {
console.log(chunk)
}
Available adapters: openaiText, openaiEmbed, openaiSummarize, anthropicText, geminiText, ollamaText, and more.
Get Involved
- We welcome issues and pull requests!
- Participate in GitHub discussions
- Chat with the community on Discord
- See CONTRIBUTING.md for setup instructions
Partners
<table align="center"> <tr> <td> <a href="https://www.coderabbit.ai/?via=tanstack&dub_id=aCcEEdAOqqutX6OS" > <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/assets/coderabbit-dark-D643Zkrv.svg" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/assets/coderabbit-light-CIzGLYU_.svg" /> <img src="https://tanstack.com/assets/coderabbit-light-CIzGLYU_.svg" height="40" alt="CodeRabbit" /> </picture> </a> </td> <td> <a href="https://www.cloudflare.com?utm_source=tanstack"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://tanstack.com/assets/cloudflare-white-Co-Tyjbl.svg" /> <source media="(prefers-color-scheme: light)" srcset="https://tanstack.com/assets/cloudflare-black-6Ojsn8yh.svg" /> <img src="https://tanstack.com/assets/cloudflare-white-Co-Tyjbl.svg" height="60" alt="Cloudflare" /> </picture> </a> </td> </tr> </table> <div align="center"> <img src="./media/partner_logo.svg" alt="AI & you?" height="65"> <p> We're looking for TanStack AI Partners to join our mission! Partner with us to push the boundaries of TanStack AI and build amazing things together. </p> <a href="mailto:partners@tanstack.com?subject=TanStack AI Partnership"><b>LET'S CHAT</b></a> </div>Explore the TanStack Ecosystem
- <a href="https://github.com/tanstack/config"><b>TanStack Config</b></a> β Tooling for JS/TS packages
- <a href="https://github.com/tanstack/db"><b>TanStack DB</b></a> β Reactive sync client store
- <a href="https://github.com/tanstack/devtools"><b>TanStack Devtools</b></a> β Unified devtools panel
- <a href="https://github.com/tanstack/form"><b>TanStack Form</b></a> β Typeβsafe form state
- <a href="https://github.com/tanstack/pacer"><b>TanStack Pacer</b></a> β Debouncing, throttling, batching
- <a href="https://github.com/tanstack/query"><b>TanStack Query</b></a> β Async state & caching
- <a href="https://github.com/tanstack/ranger"><b>TanStack Ranger</b></a> β Range & slider primitives
- <a href="https://github.com/tanstack/router"><b>TanStack Router</b></a> β Typeβsafe routing, caching & URL state
- <a href="https://github.com/tanstack/router"><b>TanStack Start</b></a> β Fullβstack SSR & streaming
- <a href="https://github.com/tanstack/store"><b>TanStack Store</b></a> β Reactive data store
- <a href="https://github.com/tanstack/table"><b>TanStack Table</b></a> β Headless datagrids
- <a href="https://github.com/tanstack/virtual"><b>TanStack Virtual</b></a> β Virtualized rendering
β¦ and more at <a href="https://tanstack.com"><b>TanStack.com Β»</b></a>
<!-- USE THE FORCE LUKE -->Related Skills
node-connect
337.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
337.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.2kCommit, push, and open a PR
