ai-cli

Models

Select models, compare outputs, and configure defaults.

Default models

Each command type has a default model used when -m is not specified:

TypeDefaultEnv override
textopenai/gpt-5.5AI_CLI_TEXT_MODEL
imageopenai/gpt-image-2AI_CLI_IMAGE_MODEL
videobytedance/seedance-2.0AI_CLI_VIDEO_MODEL

The -m flag always takes priority over environment variables.

Specifying a model

Use creator/model-name format:

bash
ai text -m "anthropic/claude-sonnet-4" "hello"
ai image -m "bfl/flux-2-pro" "a sunset"

Short names (without the creator prefix) are resolved against models fetched from the gateway:

bash
ai text -m gpt-5.5 "hello"
ai image -m flux-2-pro "a sunset"

Multi-model comparison

Generate with multiple models by comma-separating -m:

bash
ai image "a sunset" -m "openai/gpt-image-1,xai/grok-imagine-image,bfl/flux-2-pro"

Combine with -n to generate multiple per model:

bash
ai image "a sunset" -n 2 -m "openai/gpt-image-1,bfl/flux-2-pro"

This produces 4 images total (2 per model), saved as output-1.png through output-4.png.

Listing models

bash
ai models                          # all models
ai models --type image             # image models only
ai models --creator google         # Google models only
ai models --json                   # JSON with descriptions

In human mode, models are grouped by creator and display short names. Use --json for machine-readable output with full IDs and descriptions.

Providers

All models are accessed through Vercel AI Gateway:

OpenAI

GPT-5.5, GPT-4.1, GPT Image 2, o3, o4-mini

Anthropic

Claude Sonnet 4

Google

Gemini 2.5 Pro, Imagen 4, Veo 3

xAI

Grok 3, Grok Imagine

Meta

Llama 4 Maverick

Black Forest Labs

FLUX 2 Pro, FLUX Kontext

ByteDance

Seedance 2.0, Seedream 5.0

Kling AI

Kling v3.0

Alibaba

Wan v2.5, Wan v2.6

Recraft

Recraft v2, v3, v4

Prodia

FLUX Fast Schnell