1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "title": "Why short videos win",
12 "hook": "Most people scroll past your posts in under two seconds.",
13 "body": "Short vertical videos stop the scroll because they show a face, a clear idea and movement in the first moments. You do not need a camera, a studio or an editor to make them every day. Write the idea once as a hook, a body and a call to action, and let an AI persona present it for you, with captions and b-roll that match what you say.",
14 "cta": "Follow for one practical tip like this every day.",
15 "providers": [
16 "youtube"
17 ],
18 "voiceId": "chatterbox:kokoro_af_heart"
19};
20
21
22const run = await client.actor("made_by_ryan/post-engineer-video").call(input);
23
24
25console.log('Results from dataset');
26console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
27const { items } = await client.dataset(run.defaultDatasetId).listItems();
28items.forEach((item) => {
29 console.dir(item);
30});
31
32