Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Image Generation

Generate one image and save it directly to a workspace file:

zo --image images/cover.png 'Painterly forest at sunrise'

Image mode uses a non-streaming OpenRouter request and saves the first generated image. Its default model is google/gemini-2.5-flash-image.

Model selection

# Built-in image alias
zo --image assets/icon.png /banana 'Minimal blue app icon'
 
# Any configured image-capable alias
zo --image renders/concept.png --model myimage 'Brutalist dashboard concept'

For an explicit model, zo checks OpenRouter's model discovery response before generation. Image-only models request image output; models advertising both text and image request both; text-only models are rejected.

Prompt input

Prompt text and STDIN can be combined:

cat creative-brief.txt | zo --image renders/hero.png 'Landing-page artwork'

Unlike text mode, image mode treats @file, !file, and @!file as literal prompt text. It does not support chat, file tools, shell tools, web search, or reasoning-effort selection.

Output safety

  • The output must be a relative path inside the current workspace.
  • The parent directory must already exist.
  • Hidden paths require --hidden.
  • Existing files require confirmation unless --accept-writes is set.
  • --non-interactive leaves an existing file unchanged unless overwrite approval was supplied.

Use --debug to inspect the selected model, derived output modalities, prompt preview, and destination before sending.

Models & Customization โ†’ ยท CLI Usage โ†’