const axios = require("axios");
axios.get('https://api.night-api.com/images/nsfw', {
headers: {
authorization: "Your API token"
}
})
.then(function (response) {
console.log(response.data);
})
// Return: Promise
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
const image = await api.nsfw.fetchImage(); // Random images