AI video generation
Use ai-video commands for model-based video generation. For clip conversion,
merging, B-roll, and narrated content, see video editing and production.
1. Discover models and their inputs
Choose an ID from the catalog, then inspect its supported duration, resolution, aspect ratio, and required fields. Some models support audio generation or reference-based modes; availability and accepted values are model-specific.
2. Generate a short clip
Add --duration, --resolution, or --aspect-ratio only after checking the
model’s allowed values. Add --generate-audio when the chosen model supports it.
Generation can consume credits; review the model metadata before a large batch.
The storage choice controls where results are kept:
3. Animate a reference
Upload the reference through assets and wait until it
is ready. Inspect a model that supports reference_image, then use its UUID:
Other models may support multiple_images or first_last_frame. Do not assume
one model supports every mode.
4. Supply model-specific parameters
Use --parameters for fields beyond the common flags. For a model whose
first_last_frame capability declares first_frame_url and last_frame_url as
file inputs:
File-typed fields take asset UUIDs even if their names end in _url. Use the
field types returned by discovery. Values in --parameters override matching
values supplied through the common flags.
5. Track the job
Without --wait, the response includes an id for the art and an
art_variation_id for the variation. Save both:
The status response uses job_status; DONE indicates completion and FAILED
indicates failure. The waiting mode polls every 30 seconds for up to 600 seconds.
On completion, it prints the output, which can include file_url and an asset ID.
If waiting times out, check that same job before resubmitting. Inspect the video, then reuse it in a social draft or editing workflow.
