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

sh
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. OpenAI models (gpt-image-, dall-e-) have no native aspect ratio parameter, so the ratio is snapped to the closest supported size and stated in the prompt text
--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

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