Async & Batch
Long-running tasks and parallel fan-out.
Async Tasks
Most video models run as async tasks: the server returns a generateId and the CLI polls until completion. Override:
# Submit but don't wait — prints { generateId, status: "pending" }
dlazy veo-3.1 --firstFrame hero.png --prompt "..." --no-wait
# Resume / wait on an existing task
dlazy status gen_abc123 --wait --tool veo-3.1
# One-shot status check (no waiting)
dlazy status gen_abc123--timeout <seconds> controls the polling deadline (default 1800). Pass --tool <cli_name> on status to parse the result through that tool's outputSchema; without it the result comes back as a generic JSON output.
Batch Fan-out
All generation tools (image / video / audio / text / auto) accept --batch <n>. The CLI runs the tool N times in parallel with the same input and merges every run's outputs into one envelope:
# 4 image variants in one call (parallel) — outputs[0..3]
dlazy gpt-image-2 --prompt "rainy-night cyberpunk cat" --batch 4
# Combine with pipe references — feed each variant into a single video
dlazy gpt-image-2 --prompt "..." --batch 4 \
| dlazy veo-3.1 --firstFrame @0.url --prompt "push-in"usage.creditsCost / tokenIn / tokenOut are summed across runs; durationMs reports parallel wall-clock (max). With --no-wait, each sub-run's task is surfaced as a JSON output so downstream pipes can still read every generateId.
tool types tool are not batchable — --batch is rejected at the parser level there.