{% hint style="sucess" %} The "https://tnai.ml" website can now be used!. {% endhint %}
A simple endpoint that you can use for Discord.js or other apps, follow reading so you can discover how to use our endpoints.
Some dependencies that you can use: Snekfetch | Node-fetch
Here you will get the SFW category URL:
const request = require('snekfetch');
request.get('https://tnai.ml/api/image?type=hug', {
headers: {
"Authorization": "YOUR_TOKEN"
}
}).then(response => {
console.log(response.body.url)
});```
### Sending from a MessageAttachment
This method is not compatible with Discord.js v11 version.
```js
const { MessageEmbed, MessageAttachment } = require('discord.js');
const request = require('snekfetch');
request.get('https://tnai.ml/api/image?type=hug', {
headers: {
"Authorization": "YOUR_TOKEN"
}
}).then(response => {
const attachment = response.body.url;
message.channel.send([attachment]);
});