Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
Open-source Next.js chatbot starter from Vercel Labs that demonstrates the Vercel AI Gateway with the AI SDK.

Open-source AI chatbot template built with Next.js, the AI SDK by Vercel, and Groq for streaming chat responses.
Vercel AI Gateway Demo is a minimal Next.js chatbot application from Vercel Labs that demonstrates how to route chat completions through the Vercel AI Gateway using the AI SDK as the model interface.
Vercel AI Gateway Demo is a small Next.js chatbot whose only user-facing surface is a chat interface running on http://localhost:3000. A visitor types a message, and the app returns the model's reply, with the Vercel AI Gateway acting as the routing layer between the app and the model and the AI SDK (sdk.vercel.ai) providing the client-side integration. The repository lives at github.com/vercel-labs/ai-sdk-gateway-demo and is maintained by the Vercel team together with community contributors, who accept issues and pull requests for new functionality and bug fixes.
vc link, vc deploy, and vc dev instead of the plain Next.js dev command.vc env pull fetches the linked project's OIDC authentication token for local runs, and that token expires every 12 hours.pnpm i, npm i, or yarn i.vc dev, and start iterating on prompts and UI without building model plumbing first.The demo is cloned, linked, and served through the Vercel CLI. The documented flow is: click Deploy with Vercel to create a repository and project, install the Vercel CLI, clone your new repository, link it with vc link (or deploy directly with vc deploy), install packages with pnpm i, then run vc dev and open http://localhost:3000 to talk to the chatbot.
The demo code itself is an open-source Vercel Labs repository, so cloning and forking cost nothing. Running it does require a Vercel account and a linked Vercel project, because the app authenticates model requests through the project's OIDC token rather than a manually pasted API key.
Yes, the documented workflow uses the Vercel CLI for vc link, vc deploy, and vc dev. If you prefer running the local development server directly, you must run vc env pull first to fetch the project's OIDC authentication token locally.
The token pulled by vc env pull expires every 12 hours, so a directly-run local server needs that command repeated periodically. Running the app through vc dev avoids the problem because the CLI refreshes the token automatically.
You may need to enable OIDC manually. Open the project settings page, search for "OIDC", toggle "Secure Backend Access with OIDC Federation" to Enabled, and save the change before local authentication will work.
Yes. The usage instructions list pnpm i as the default but explicitly allow npm i or yarn i as alternatives for installing the project's dependencies.
