Getting Started with Cencori

0/9 complete
Step 7 of 9

Enable Streaming

Streaming gives your users a better experience by showing AI responses as they're generated, token by token.

Why Streaming?

  • Users see output immediately instead of waiting
  • Feels more interactive and responsive
  • Works with all providers (OpenAI, Anthropic, Gemini)

Streaming with the SDK

streaming.ts

Streaming in Next.js API Routes

app/api/chat/route.ts

With Vercel AI SDK

Even simpler with our Vercel AI SDK provider:

app/api/chat/route.ts

💡 Tip: The Vercel AI SDK integration handles all the complexity — works with useChat() hook out of the box!