Batch generate
adsoptimiser_batch_generateQueue batch ad generations from a local image folder or prompts file, up to 10 jobs per call, and resume with an offset if limits stop the run.
Instructions
Queue one job per local image in a folder (image_to_video or image_edit) or per line of a prompts file (prompts). At most 10 per call; each job uses plan allowance like a single generation. Stops at a plan limit, quota or rate limit and reports what was queued and the offset to resume from. Returns job ids at once; check them with adsoptimiser_get_job or adsoptimiser_list_jobs.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | image_to_video: one video per image in `folder`. image_edit: one edited image per image in `folder`. prompts: one job per line of `prompts_file`. | |
| model | No | ||
| folder | No | Folder of images (png, jpg, webp, gif) for the image modes. | |
| offset | No | Skip this many items first, to resume a batch that stopped. | |
| prompt | No | Image modes: the instruction applied to every image. Required for them. | |
| quality | No | Grok Image 2.0 only. | |
| duration | No | Videos: seconds, 1 to 15. | |
| max_items | No | How many to queue in this call (default and maximum 10). | |
| asset_type | No | prompts mode only: generate images (default) or videos. | |
| resolution | No | Images: 1k or 2k. Videos: 480p, 720p or 1080p. | |
| aspect_ratio | No | Videos default to 9:16. | |
| prompts_file | No | Text file with one prompt per line (blank lines and # comments skipped). |