📋Category
Choose which Category of joke you would like to have
SFW Images
GET
https://api.night-api.com/images/sfw/:type
Path Parameters
Name
Type
Description
type*
String
The type of SFW mage to get
Headers
Name
Type
Description
authorization*
String
Your API key
{
"status": 200,
"content": {
"id": 34,
"type": "holo",
"url": "https://cdn.night-api.com/api/images/sfw/holo/75f9fcb764921bfaedc9e4182db02.jpg"
}
}
Lists of available SFW types:
Coffee
Food
Holo
Kanna
const axios = require("axios");
axios.get('https://api.night-api.com/images/sfw/holo', {
headers: {
authorization: "Your API token"
}
})
.then(function (response) {
console.log(response.data);
})
Or with the module
// Return: Promise
const { NightAPI } = require('night-api');
const api = new NightAPI('YOUR_API_KEY');
const image = await api.sfw.fetchImage("holo"); // Random images of category "holo"
Last updated
Was this helpful?