The AI Chatbot Starter ($39) provides a Vercel AI SDK integration with OpenAI and Anthropic provider support. It includes streaming chat responses, a complete chat UI with message list and typing indicator, message history management, and usage tracking scaffolding. The chat API route supports switching between providers via a request parameter.
import { openai } from "@ai-sdk/openai";
import { streamText } from "ai";
export async function POST(req: Request) {
const { messages } = await req.json();
const result = streamText({
model: openai("gpt-4o"),
messages,
});
return result.toDataStreamResponse();
}