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). Not supported by Gemini image models — use
--aspect-ratio instead.
--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.
audio
Generate speech from text or transcribe audio to text.
audio speak
-m, --model
stringSpeech model ID. Comma-separated for multi-model.
-o, --output
pathOutput file path or directory.
-f, --format
stringdefault: mp3Audio output format.
--voice
stringVoice to use for speech generation.
--instructions
stringInstructions for speech generation.
--speed
numberSpeech speed.
--language
codeLanguage code, such as en or fr, or auto.
-n, --count
numberdefault: 1Number of generations per model.
-p, --concurrency
numberdefault: 4Max parallel generations.
-q, --quiet
booleanSuppress progress output.
--json
booleanOutput metadata as JSON.
--no-play
booleanDisable audio playback after generation.
--no-waveform
booleanDisable accurate terminal waveform preview.
audio speak accepts text from an argument or stdin:
audio transcribe
-m, --model
stringTranscription model ID. Comma-separated for multi-model.
-o, --output
pathOutput file path or directory.
-f, --format
md | txtdefault: txtTranscript output format.
-n, --count
numberdefault: 1Number of transcriptions per model.
-p, --concurrency
numberdefault: 4Max parallel transcriptions.
-q, --quiet
booleanSuppress progress output.
--json
booleanOutput metadata as JSON.
audio transcribe accepts a local path, file:// URL, http(s):// URL, or piped audio:
models
List available models from the AI Gateway, or show detailed info for one model.
Arguments
[model]
stringModel ID or short name. Shows a detail card with context window, max output, pricing (input, output, cache read/write, web search), release date and per-provider latency, throughput and uptime.
Options
--type
text | image | video | audio | speech | transcriptionFilter by modality (list mode only).
--creator
stringFilter by creator (e.g. openai, google) (list mode only).
--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 | 300 seconds |
video | 300 seconds |
audio speak | 120 seconds |
audio transcribe | 120 seconds |
Image and video generation use 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) |