Skip to main content
Image-input parameters (--image, --images, --first-frame, --last-frame, --mask, --mask-image-url, --ref-images-url, --reference-images, …) accept three kinds of values: This means you can drop a file from your machine into any command without hosting it anywhere first:

Supported formats

The CLI recognizes these extensions (case-insensitive): .png, .jpg, .jpeg, .gif, .bmp, .webp, .tiff, .tif, .svg, .ico, .heic, .heif, .avif Files without a recognized extension are rejected — even if the bytes are valid image data.

Size limit

Each file must be at most 20 MB. Larger files raise an error before any HTTP call is made. Upload to your own object store and pass the URL if you need more headroom.

Sensitive paths are blocked

To avoid accidentally exfiltrating credentials when wired into an autonomous agent, certain paths are off-limits:
  • System directories: /etc, /proc, /sys, /dev
  • Home dotfile directories: ~/.ssh, ~/.gnupg, ~/.gpg, ~/.aws, ~/.azure, ~/.gcloud, ~/.config, ~/.kube, ~/.docker, ~/.npm, ~/.pypirc
Attempts to read these produce Access denied: ... errors.

Arrays of images

Some endpoints accept a list of images. Pass a JSON array as a string:
Each entry inside the array is treated independently — mix and match URLs and local paths as needed.

Element-shaped inputs

A few endpoints (KlingAI multi-element generation, for example) take an elements array of objects. The CLI recursively walks the array and converts any local paths found in the frontal_image and reference_images fields:

Missing-file warnings

If you pass a path that doesn’t exist, the CLI prints a yellow warning to stderr and continues — letting the underlying API decide whether to accept the literal string as, say, a URL:
This makes typos loud while still allowing intentional pass-through of URL-shaped strings.

See also