Build an AI chatbot
A general-purpose chatbot for your site, community or personal use is the easiest AI project: a chat UI, a model API and a good system prompt.
Recommended stack
Model
- Google Gemini 3.8 Flash: Free tier available; paid ~$0.75 in / $3.75 out per 1M until 2026-12-31, then $1.50/$7.50 (verified 2026-11-22)
- OpenAI GPT-6 Luna: ~$0.10 in / $0.50 out per 1M tokens (verified 2026-11-22)
- OpenRouter: 25+ free models (50 requests/day); paid models at provider list price plus a 5.5% fee on credit purchases (verified 2026-11-15)
Framework
- Vercel AI SDK: Free, open-source TypeScript SDK
- LangChain / LangGraph: Open source (free); LangSmith Developer $0 (5k traces/mo), Plus $39/seat/mo (verified 2026-11-15)
Hosting
- Vercel: Hobby $0 (personal, non-commercial); Pro $20/mo incl. $20 credit (verified 2026-11-15)
No-code alternative
Rough monthly cost
$0–15/mo (free hosting + cheap model)Approximate. Tool prices checked 2026-11-15.Difficulty
BeginnerSome links may be affiliate links. Disclosure
Why this stack
- The Vercel AI SDK provides streaming chat helpers for TypeScript.
- OpenRouter lets you switch between many models with one API key.
- Voiceflow and Dify offer visual builders if you don't want to code.
Step-by-step
- Start from a Vercel AI SDK chat template.
- Write a system prompt with the bot's role, tone and what it must not do.
- Test with 20 realistic questions, then deploy to Vercel.
Common pitfalls
- Keep API keys server-side.
- Add rate limiting before you share the link.
- Log conversations (with consent) to improve the prompt.
Related stacks
- Build a docs Q&A (RAG) app (RAG / docs Q&A)
- Build an AI customer support bot (AI customer support bot)
- Build an AI Discord or Telegram bot (Discord / Telegram bot)
Last updated 2026-11-22.