Skip to content

This repository contains a simple and modern API for interacting with ChatGPT-Dark using Node.js. It's fast, free, and easy to use.

License

Notifications You must be signed in to change notification settings

ReactMVC/DarkGPT-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DarkGPT API for Node.js

This repository contains a simple and modern API for interacting with ChatGPT-Dark using Node.js. It's fast, free, and easy to use.

Getting Started

First, clone the repository:

git clone https://github.com/ReactMVC/DarkGPT-API.git

Navigate into the project directory:

cd DarkGPT-API

Install the necessary dependencies:

npm install

Start the server:

node index.js

The server will start running on port 3000.

Usage

The API provides two endpoints, both of which accept a text parameter:

  • GET /
  • POST /

Fetch

GET
fetch('http://localhost:3000/?text=Hello', {
  method: 'GET',
})
.then(response => response.json())
.then(data => console.log(data));
POST
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
axios.get('http://localhost:3000/', {
  params: {
    text: 'Hello',
  },
})
.then(response => console.log(response.data));
POST
axios.post('http://localhost:3000/', {
  text: 'Hello',
}, {
  headers: {
    'Content-Type': 'application/json; charset=utf-8',
  },
})
.then(response => console.log(response.data));

Contact

For any issues, suggestions, or general feedback, please contact:

Enjoy using the ChatGPT-Dark API!

About

This repository contains a simple and modern API for interacting with ChatGPT-Dark using Node.js. It's fast, free, and easy to use.

Resources

License

Stars

Watchers

Forks

Packages

No packages published