Reference · How-to · ~15 min
How to deploy a small AI app
Ship a minimal API or chat UI — secrets on the server, logs on, scope small.
Ship a minimal API or chat UI — secrets on the server, logs on, scope small.
Steps
1. **Working locally** — API route calls LLM with env var key
2. **Choose host** — Vercel, Railway, Fly.io, Render, etc.
3. **Set env vars** in dashboard (`OPENAI_API_KEY`, etc.)
4. **Add health check** route (`/health`)
5. **Deploy** from git; smoke-test one prompt
6. **Monitor** errors, latency, token spend
Minimum checklist
- API keys not in frontend bundle
- Rate limiting or auth if public
- Timeouts on LLM calls
- User-facing error message (not raw stack trace)
Pseudo deploy flow
git push origin main
curl https://your-app.example/healthLevel up later
Caching frequent queries, streaming responses, staging environment.