Recipe: Batch-process a folder
Goal: apply the same workflow to every file in a folder — resize 500 product shots, generate textures for a whole library, transcode a folder of clips — in one run instead of one at a time.
In the Workflow Builder
- Upload all your files into one folder in Data.
- Build your workflow as usual (e.g.
Image Input → Resize → output). - On the Input node, select the folder (or multi-select the files) instead of a single file.
- Run. Each file flows through the workflow independently — one file failing doesn't stop the rest.
(Screenshot: an input node with a folder selected, and the Build queue showing per-file status.)
Open the Build queue panel from the canvas toolbar to watch per-file status across the batch.
Make it automatic
Pair batch mode with a File event trigger so the workflow runs whenever a new file lands in the folder — a hands-off "process anything dropped here" pipeline.
Over the API
Pass multiple input cog ids (or a folder's contents) in cog_ids:
# $AUTH is "Authorization: Bearer <token>" — get it from your sk_ key,
# see /api-reference#authentication
curl -s -X POST "$BASE/workflows/workflow-versions/<your_version_id>/run" -H "$AUTH" \
-H "Content-Type: application/json" \
-d '{"cog_ids": [101, 102, 103, 104]}'
Tips
- Batch runs consume credits per file — check your remaining credits (and overage settings) before a big batch. See the Billing FAQ.
- Outputs land as separate cogs; add a Zip Folder node if you want a single download.
Related
- Workflow Builder Guide
- Triggers — run batches automatically.