Vercel AI SDK
title: Vercel AI SDK subtitle: Using OpenRouter with Vercel AI SDK headline: ‘Vercel AI SDK Integration | OpenRouter SDK Support’ canonical-url: https://openrouter.ai/docs/guides/community/vercel-ai-sdk og:site_name: OpenRouter Documentation og:title: ‘Vercel AI SDK Integration - OpenRouter SDK Support’ og:description: ‘Integrate OpenRouter using Vercel AI SDK. Complete guide for Vercel AI SDK integration with OpenRouter for Next.js applications.’ og:image: https://openrouter.ai/dynamic-og?title=Vercel%20AI%20SDK&description=Vercel%20AI%20SDK%20Integration og:image:width: 1200 og:image:height: 630 twitter:card: summary_large_image twitter:site: ‘@OpenRouterAI’ noindex: false nofollow: false
Vercel AI SDK
You can use the Vercel AI SDK to integrate OpenRouter with your Next.js app. To get started, install @openrouter/ai-sdk-provider:
And then you can use streamText() API to stream text from OpenRouter.
TypeScript