1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "productImageUrl": "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": "auto"
14};
15
16
17const run = await client.actor("akash9078/ai-product-photo-generator").call(input);
18
19
20console.log('Results from dataset');
21console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
22const { items } = await client.dataset(run.defaultDatasetId).listItems();
23items.forEach((item) => {
24 console.dir(item);
25});
26
27