A minimal Node.js Express backend for securely proxying chat requests to the OpenAI Assistant API. Only for prototyping purposes and testing.
npm install- Copy
.env.exampleto.envand fill in your OpenAI API key. - Run:
node api/chat.js - POST to
http://localhost:3001/api/chatwith{ "message": "Your message" }
- Import this repo on Vercel.
- Add your
OPENAI_API_KEYin the Vercel environment settings.
Never commit your real .env to source control.