1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "imageUrl": "https://drive.google.com/file/d/1S5sCnyVmnRHxk233EfZ6byjClr8pxaUU/view?usp=drive_link",
12 "prompt": "Professional product photography of a young white female model wearing/holding the provided [PRODUCT], 9:16 vertical Pinterest aspect ratio, front-facing portrait with direct confident eye contact, natural soft studio lighting with large softbox and fill reflector, high-resolution 8K commercial quality, minimalist aesthetic with product clearly showcased as hero element, choose from backgrounds: prefer natural landscape.",
13 "aspectRatio": "1:1",
14 "outputFormat": "png",
15 "enableSafetyChecker": true,
16 "seed": -1,
17 "numInferenceSteps": 28,
18 "guidance": 7.5,
19 "enableBase64Output": false
20};
21
22
23const run = await client.actor("akash9078/ai-image-editor-nano-banana-2").call(input);
24
25
26console.log('Results from dataset');
27console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
28const { items } = await client.dataset(run.defaultDatasetId).listItems();
29items.forEach((item) => {
30 console.dir(item);
31});
32
33