constaxios=require("axios");axios.get('https://api.night-api.com/images/nsfw/5', { headers: { authorization:"Your API token" }}).then(function (response) {console.log(response.data);})
Or with the module
// Return: Promiseconst { NightAPI } =require('night-api');constapi=newNightAPI('YOUR_API_KEY');constimage=awaitapi.nsfw.fetchImage(5); // Image with the ID 5