Apply a pipeline to many images
image_batchApply a sequence of image operations (resize, crop, watermark, etc.) to every image in a directory, glob, or file list. Each file is processed independently, with per-file failure reporting and support for name placeholders.
Instructions
Run the same operation list across every image in a directory, a glob, or an explicit list of paths. Each file is independent: a failure is reported per file and does not abort the run. Use a {name} placeholder in output_name for per-file suffixes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| glob | No | Glob pattern inside an input root, e.g. 'photos/**/*.jpg'. | |
| limit | No | Maximum files to process in this call. | |
| paths | No | Explicit list of input paths. | |
| quality | No | Lossy quality for every output. | |
| directory | No | Directory (inside an input root) to process recursively. | |
| operations | Yes | Ordered operations applied to every file. | |
| output_format | No | Output codec; defaults to each input's own format. | |
| strip_metadata | No | Strip metadata from every output. | |
| return_first_image | No | Embed only the first output inline, to bound payload size. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | No | ||
| files | No | ||
| notes | No | ||
| failed | Yes | ||
| operation | No | image_batch | |
| processed | Yes | ||
| succeeded | Yes | ||
| totalInputBytes | Yes | ||
| totalOutputBytes | Yes | ||
| inlineImageIncluded | No |