drawstyle docs
中文 ← Gallery

CLI tool

Generate images

Hand the tool a prompt, get a bitmap. Size, format and reference images are all optional.

terminal
# simplest
$ chatgpt-imagegen "an orange cat on a windowsill, watercolor"

# size, format and output path
$ chatgpt-imagegen "minimal tech poster" --size 1536x1024 --format png -o poster.png
Sizes
Common: 1024x1024 (square), 1536x1024 (landscape), 1024x1536 (portrait). Up to 4 reference images per run.

Image-to-image (editing)

Pass a reference with -i / --ref to edit it instead of generating from text — like dragging an image into the ChatGPT composer and asking for a restyle. Both backends support it; references are local paths or http(s) URLs, repeat -i for several.

terminal
$ chatgpt-imagegen "warm golden-hour photo, cinematic 35mm" -i photo.jpg -o out.png

Common flags

--backend auto|web|codex · -o PATH · --size · --format png|jpeg|webp · -i/--ref · --style NAME · --quiet. Full list: chatgpt-imagegen --help.



by 郭立 · Guo Li · leeguoo · Blog · GitHub