Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Skip to Content
CLICommands

orl images edit

Edit an image from a prompt and write the results to files, part of the orl CLI for OpenRelay GPU VMs, pods, batches and billing.

orl images edit --image <image> --model <model> --prompt <prompt>

Uploads one PNG, JPEG or WebP image (at most 10 MiB) with a prompt to POST /v1/images/edits and writes each image of the answer to a file. In preview for selected organizations; orl models lists the models that serve images_edits, and GET /v1/models lists each one's sizes and limits.

--size is auto (the default) or one of the model's sizes as WxH. auto takes the model's size nearest the input's aspect ratio, read after its EXIF orientation, so a portrait photo comes back portrait.

The images are written to --out, default <input name>-edit in the current directory (a missing directory is made), with the output format's extension; with --n above 1, each file gets its index, <out>-1.png and so on. A file already there is kept unless --force, and the request is not sent. An answer that cannot be written as asked was still billed, so the images not yet in place are saved under fresh names beside them, and the error names each. Billed on the output pixels at the model's price per megapixel; a request returns all its images or an error, and an error bills nothing.

Flags

FlagTypeRequired
--forceboolnoreplace files already at the output paths
--imagestringyesthe input image file: PNG, JPEG or WebP, at most 10 MiB
--modelstringyesa model whose supported_apis include images_edits
--nintnoimages to make, 1 to the model's limit
--outstringnowhere to write the images, without an extension (default <input name>-edit)
--output-formatjpeg, png, webpnoencoding of each image: png, jpeg or webp
--promptstringyesthe edit to make, up to the model's prompt limit
--seedint64noseed of the first image; image i uses seed + i (the server picks one when unset)
--sizestringnoauto, or one of the model's sizes as WxH

This wraps the createImageEdit API operation.

On this page