Image Workflow
複数画像 → ウォーターマーク → アップロード
複数の商品画像にウォーターマークを適用して自社サーバーへ送信します。
files[]
→batch-image-watermark
→FormData upload
入力Multiple image files
最終結果Watermarked image files
使用 Toolbatch-image-watermark
完全なコード
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.
このレシピを変更する前に client.describe(toolId) または Tool Reference でファイル制限、オプション値、対応モードを確認してください。