Commands
Full reference for all ai-cli commands and flags.
image
Generate images from a prompt.
Options
-m, --model
stringModel ID. Comma-separated for multi-model.
-o, --output
pathOutput file path or directory.
-n, --count
numberdefault: 1Number of images per model.
-p, --concurrency
numberdefault: 4Max parallel generations.
--size
WxHImage size (e.g. 1024x1024).
--aspect-ratio
W:HAspect ratio (e.g. 16:9).
--quality
standard | hdQuality level (OpenAI models only).
--style
vivid | naturalStyle (OpenAI models only).
--no-preview
booleanDisable inline image preview.
-q, --quiet
booleanSuppress progress output.
--json
booleanOutput metadata as JSON.
video
Generate video from a prompt or image.
Options
-m, --model
stringModel ID. Comma-separated for multi-model.
-o, --output
pathOutput file path or directory.
-n, --count
numberdefault: 1Number of videos per model.
-p, --concurrency
numberdefault: 2Max parallel generations.
--aspect-ratio
W:HAspect ratio (e.g. 16:9).
--duration
secondsDuration in seconds.
--no-preview
booleanDisable inline video frame preview.
-q, --quiet
booleanSuppress progress output.
--json
booleanOutput metadata as JSON.
text
Generate text from a prompt.
Options
-m, --model
stringModel ID (creator/model). Comma-separated for multi-model.
-o, --output
pathOutput file path or directory.
-f, --format
md | txtdefault: mdOutput format.
-n, --count
numberdefault: 1Number of generations per model.
-p, --concurrency
numberdefault: 4Max parallel generations.
-s, --system
stringSystem prompt.
--max-tokens
numberMaximum tokens to generate.
-t, --temperature
numberTemperature (0–2).
-q, --quiet
booleanSuppress progress output.
--json
booleanOutput metadata as JSON.
models
List available models from the AI Gateway.
Options
--type
text | image | videoFilter by modality.
--creator
stringFilter by creator (e.g. openai, google).
--json
booleanOutput as JSON with descriptions.
Models are fetched live from the AI Gateway.
Timeouts
Requests that exceed the per-command timeout are aborted automatically:
| Command | Timeout |
|---|---|
text | 120 seconds |
image | 120 seconds |
video | 300 seconds |
Video generation uses a longer timeout because models typically need more processing time.
Exit codes
| Code | Meaning |
|---|---|
0 | Success |
1 | All generations failed |
2 | Partial failure (some succeeded, some failed) |