- Регистрация
- 9 Май 2015
- Сообщения
- 1,483
- Баллы
- 155
If you're curious about how to use OpenAI's ChatGPT API in a Node.js application, I built a simple project to demonstrate exactly that — and made a short tutorial video to go with it.
?️ Watch the 8-Minute Video Tutorial:
? GitHub Repo:
?
What You'll Learn:
bash
git clone
cd chatgpt-js
npm install
echo "OPENAI_API_KEY=your_key_here" > .env
node index.js
?️ Watch the 8-Minute Video Tutorial:
? GitHub Repo:
?

- How to connect to OpenAI's ChatGPT API
- How to send and receive prompts using fetch()
- Basic .env setup for secure API keys
- Configurable model (GPT-3.5 or GPT-4)
- Clean and minimal Node.js code (no frontend)
bash
git clone
cd chatgpt-js
npm install
echo "OPENAI_API_KEY=your_key_here" > .env
node index.js
Источник: