1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "imageFiles": [
12 {
13 "url": "https://github.com/ParseForge/apify-assets/blob/65f2790e17ebc08b3c4ae5ca92cbb43a444c2ab1/watermark-image-api/original.avif?raw=true"
14 }
15 ],
16 "watermarkText": "",
17 "fontFamily": "inter",
18 "textColor": "#ffffff",
19 "textOpacity": 90,
20 "textScale": 50,
21 "letterSpacing": 0,
22 "backgroundOpacity": 35,
23 "logoFile": [
24 {
25 "url": "https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/240px-React-icon.svg.png"
26 }
27 ],
28 "logoOpacity": 30,
29 "logoScale": 80,
30 "position": "center",
31 "offsetXPercent": 0,
32 "offsetYPercent": 0,
33 "outputFormat": "png"
34};
35
36
37const run = await client.actor("parseforge/watermark-image-api").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47