Image Workflow
Multiple Images → Watermark → Upload
Process many product images with one watermark workflow and upload every generated file.
files[]
→batch-image-watermark
→FormData upload
InputMultiple image files
Final resultWatermarked image files
Tools usedbatch-image-watermark
Complete code
const result = await client.run("batch-image-watermark", {
files: selectedFiles,
options: {
type: "text",
text: "My Store",
position: "bottom-right",
opacity: 50
},
output: {
filePrefix: "product",
archive: true,
archiveName: "watermarked-products"
}
});
const form = new FormData();
for (const file of result.files) {
form.append("files", file, file.name);
}
await fetch("/api/products/upload", {
method: "POST",
body: form
});
// Or upload result.archive.file when ZIP is preferred.
Hãy kiểm tra client.describe(toolId) hoặc Tool Reference trước khi thay đổi workflow.