const axios = require('axios'); async function isTextAI(text) { const { data } = await axios.post('https://www.nyckel.com/v1/functions/dwerrk27psylc7hk/invoke', { data: text }, { headers: { 'User-Agent': 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Mobile Safari/537.36', 'Accept': 'application/json', 'Accept-Language': 'en-US,en;q=0.9,id-ID;q=0.8,id;q=0.7', 'Content-Type': 'application/json', 'Origin': 'https://www.nyckel.com', 'Referer': 'https://www.nyckel.com/pretrained-classifiers/ai-text-identifier/', 'X-Requested-With': 'XMLHttpRequest' } }); return data; } isTextAI('Why the fuck are you here bro') .then(r => console.log(JSON.stringify(r, null, 2))) .catch(e => console.error(e.message));