Skip to content

Repository files navigation


semantic-releaseReleaseFollow @TanStack

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)

Tree-Shakeable Adapters

Import only the functionality you need for smaller bundle sizes:

// Only chat functionality - no summarization code bundledimport{openaiText}from'@tanstack/ai-openai/adapters'import{generate}from'@tanstack/ai'consttextAdapter=openaiText()constresult=generate({adapter: textAdapter,model: 'gpt-4o',messages: [{role: 'user',content: [{type: 'text',content: 'Hello!'}]}],})forawait(constchunkofresult){console.log(chunk)}

Available adapters: openaiText, openaiEmbed, openaiSummarize, anthropicText, geminiText, ollamaText, and more.

Get Involved

Partners

CodeRabbitCloudflare
AI & you?

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.

LET'S CHAT

Explore the TanStack Ecosystem

… and more at TanStack.com »

About

🤖 SDK that enhances your applications with AI capabilities

Resources

Code of conduct

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages