import { fal } from "@fal-ai/client";
const result = await fal.subscribe("easel-ai/product-photoshoot", {
input: {
product_image: "https://images.easelai.com/product/special-k.webp",
scene: "an image with a cheerful young boy sitting at a wooden kitchen table, wearing a bright blue sweatshirt, eating cereal from a white bowl with a spoon.",
product_placement: "on a silver tray on the left side of the image"
},
logs: true,
onQueueUpdate: (update) => {
if (update.status === "IN_PROGRESS") {
update.logs.map((log) => log.message).forEach(console.log);
}
},
});
console.log(result.data);
console.log(result.requestId);