What problem does it solve?
TanStack AI helps developers avoid brittle, provider-specific AI integrations by providing a unified, type-safe SDK for building reliable chat, streaming generation, and structured outputs.
Core Features & Use Cases
- Provider-agnostic adapters: Swap OpenAI, Anthropic, Gemini, Ollama, and more without rewriting your app logic.
- Streaming-first generation: Stream tokens/chunks to power responsive UIs and progressive rendering.
- Structured output with schemas: Use Zod/JSON schema conversion to reliably return typed objects instead of free-form text.
- Tool calling and agent loops: Define tools with parameters and execute them, including iterative agent workflows with max-iteration limits.
- Multimodal support: Handle image inputs and even image generation adapters.
- Observability and devtools: Inspect messages, tool calls, token usage, streaming events, and reasoning/thinking output.
Quick Start
Use TanStack AI to generate streaming, type-safe responses by creating a chat/completion flow with an adapter like openaiText and passing your messages and (optionally) a schema for structured output.