Simple local website with a chat interface connected to OpenAI gpt-5-nano.
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtcp .env.example .envThen set your key in .env:
OPENAI_API_KEY=your_real_key_here
PORT=3000python app.pyOpen http://localhost:3000.
- API key stays server-side (
app.py) and is never exposed in browser code. - Frontend is plain HTML/CSS/JS in
templates/andstatic/. - Press
Enterto send,Shift+Enterfor a new line.