1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "texts": [
12 "Artificial intelligence has transformed the way organizations approach content creation, enabling teams to produce high-quality written materials at unprecedented speed and scale. By leveraging large language models, businesses can generate drafts, summarize research, and personalize communications while maintaining a consistent brand voice across every customer touchpoint. This technological shift requires robust governance, including human review, disclosure policies, and authenticity checks, so stakeholders can trust the information they consume."
13 ],
14 "maxTexts": 1,
15 "maxCharacters": 4000,
16 "includeSentences": true,
17 "includeTextPreview": true,
18 "aiThreshold": 80,
19 "humanThreshold": 20,
20 "maxConcurrency": 2
21};
22
23
24const run = await client.actor("khadinakbar/ai-content-detector").call(input);
25
26
27console.log('Results from dataset');
28console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
29const { items } = await client.dataset(run.defaultDatasetId).listItems();
30items.forEach((item) => {
31 console.dir(item);
32});
33
34