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-10-14)
- OpenAI GPT-6 Luna: ~$0.10 in / $0.50 out per 1M tokens (verified 2026-10-14)
- OpenRouter: Pay-per-token router across many models (not verified - check site)
Framework
- Vercel AI SDK: Free, open-source TypeScript SDK
- LangChain / LangGraph: Open source (free); LangSmith paid tiers (not verified - check site)
Hosting
- Vercel: Hobby $0 (personal, non-commercial); Pro $20/mo incl. $20 credit (verified 2026-10-14)
No-code alternative
Rough monthly cost
$0–15/mo (free hosting + cheap model)ApproximateDifficulty
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.