Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

image

Generate images from a text prompt using AI models. Supports Imagen models (dedicated image generation) and Gemini multimodal models (text+image output). The model type is auto-detected from the model ID: imagen-* uses the image API, everything else uses the text API with image output enabled.

Usage

egaki image <prompt>

Arguments

ArgumentRequiredDescription
<prompt>Yesprompt

Options

OptionDefaultDescription
-m, --model [model]-Model ID for generation. If omitted, shows an interactive picker (or uses default in non-TTY mode)
-o, --output [path]egaki-output.pngOutput file path (index suffix added when generating multiple)
-n, --count [n]1Number of images to generate
--aspect-ratio [ratio]-Aspect ratio for the generated image. Imagen supports: 1:1, 3:4, 4:3, 9:16, 16:9. Gemini supports additional ratios: 2:3, 3:2, 4:5, 5:4, 21:9
--seed [seed]-Seed for reproducible generation. Same seed + same prompt = same image
--image-size [size]-Output resolution for Gemini text-model image generation. Only applies to gemini--image models
-i, --input [file]-Reference image for editing or variations (repeatable). Accepts local file paths or URLs (http/https). Pass one or more images along with a text prompt to edit them
--mask [file]-Mask image for inpainting. Accepts a local file path or URL (http/https). White areas in the mask are replaced with generated content. Used together with --input
--quality [level]-Image quality level. xai: low, medium, high (default: medium). openai: auto, low, medium, high (default: auto)
--resolution [res]-Output resolution. xai: 1k, 2k (default: 1k)
--output-format [format]-Output image format. xai: png, jpeg (default: png). openai: png, jpeg, webp (default: png). fal: png, jpeg
--negative-prompt [text]-Describe what to avoid in the generated image (Fal models)
--allow-people-Allow generating images of people (Imagen blocks people by default)
--json-Output result metadata as JSON to stdout (model, usage, warnings, file paths)
--stdout-Write raw image bytes to stdout instead of saving to a file. Useful for piping to other tools

Global Options

OptionDefaultDescription
-h, --help-Display this message
-v, --version-Display version number

Examples

# Generate a simple image
egaki image "a sunset over mars"
# Use a specific model with aspect ratio
egaki image "cyberpunk city at night" -m imagen-4.0-ultra-generate-001 --aspect-ratio 16:9
# Edit an existing image
egaki image "add a wizard hat to the cat" --input cat.jpg -o cat-wizard.png
# Edit an image from a URL
egaki image "make it pop art" --input https://example.com/photo.jpg
# Inpainting with a mask
egaki image "fill with flowers" --input photo.jpg --mask mask.png
# Generate with Gemini multimodal at 4K
egaki image "dreamy landscape" -m gemini-2.5-flash-image --image-size 4K
# Route through Vertex AI (Google Cloud billing)
egaki image "product photo on marble" -m vertex/imagen-4.0-generate-001
# Generate multiple images
egaki image "abstract art" -n 4 -o art.png
# Pipe to another tool
egaki image "logo design" --stdout | convert - -resize 512x512 logo.png