This repository contains a simple and modern API for interacting with ChatGPT-Dark using Node.js. It's fast, free, and easy to use.
First, clone the repository:
git clone https://github.com/ReactMVC/DarkGPT-API.gitNavigate into the project directory:
cd DarkGPT-APIInstall the necessary dependencies:
npm installStart the server:
node index.jsThe server will start running on port 3000.
The API provides two endpoints, both of which accept a text parameter:
- GET
/ - POST
/
fetch('http://localhost:3000/?text=Hello',{method: 'GET',}).then(response=>response.json()).then(data=>console.log(data));fetch('http://localhost:3000/',{method: 'POST',headers: {'Content-Type': 'application/json; charset=utf-8',},body: JSON.stringify({text: 'Hello'}),}).then(response=>response.json()).then(data=>console.log(data));axios.get('http://localhost:3000/',{params: {text: 'Hello',},}).then(response=>console.log(response.data));axios.post('http://localhost:3000/',{text: 'Hello',},{headers: {'Content-Type': 'application/json; charset=utf-8',},}).then(response=>console.log(response.data));For any issues, suggestions, or general feedback, please contact:
- Name: Hossein Pira
- Email: h3dev.pira@gmail.com
- Telegram: @h3dev
Enjoy using the ChatGPT-Dark API!