Developer Guides
TypeScript & Vercel AI SDK Guide
Build modern Next.js and Node.js applications with Interference and the Vercel AI SDK.
TypeScript & Vercel AI SDK
Interference natively integrates with the Vercel AI SDK (ai and @ai-sdk/openai-compatible) for streaming text, structured object generation, and tools.
1. Installation
2. Text Streaming in Next.js App Router
Create a streaming route in app/api/chat/route.ts:
3. Structured Output (generateObject)
Generate schema-validated JSON with Zod: