AI Photo Workflow
Ảnh sản phẩm AI → Xóa nền → Phóng ảnh → WebP
Xóa nền, phóng 2× và tối ưu ảnh sản phẩm sang WebP.
ai-background-remover
→ai-image-upscaler
→resize-image → WebP
InputJPG / PNG / WebP
Final resultWebP File
Tools usedai-background-remover → ai-image-upscaler → resize-image
Complete code
const cutout = await client.run("ai-background-remover", {
file: productPhoto
});
const upscaled = await client.run("ai-image-upscaler", {
file: cutout.files[0],
options: {
qualityMode: "natural"
}
});
const webReady = await client.run("resize-image", {
file: upscaled.files[0],
options: {
width: 1600,
keepAspectRatio: true,
format: "webp",
quality: 0.9
}
});
const finalFile = webReady.files[0];
Hãy kiểm tra client.describe(toolId) hoặc Tool Reference trước khi thay đổi workflow.