Add a streaming chat UI to Next.js with the AI SDK useChat hook
Stream LLM replies into a Next.js App Router page using useChat and a streamText route handler (AI SDK 7).
Your keys
0 of 1 ready
Create each key on its own page, paste it below, then copy the finished lines into your project's .env file. What you paste stays in this tab. It is never sent to Wirestack or saved.
- Vercel AI Gateway keyAI_GATEWAY_API_KEYGet key
Pick your team, then click Create API Key and copy the key
$
npx wirestack add ai-sdk-nextjs-streaming-chat-usechat@14Revision 14, checked Nov 15, 2026. Installs exactly
ai 7.0.173, @ai-sdk/react 4.0.177, zod 4.6.7, creates the files and adds the key names to your .env. It shows everything first and asks before changing anything.Adapt to my stackProShowing the original (Next.js and Node.js and React). Pick your stack to see it rewritten.
Free accounts can open one adapted integration a month. Sign in to try it.
