Skip to main content
The Vercel AI SDK is the standard for building streaming AI applications in Next.js. This guide shows how to define Podium tools using tool() with Zod schemas and wire them into a chat API route with streamText.

Prerequisites

Client Setup

Define Tools

Chat API Route

With Anthropic

Frontend Component

Server Actions (Alternative)

For non-chat use cases, use generateText in a server action: