> ## Documentation Index
> Fetch the complete documentation index at: https://mulerouter.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Local image inputs

> Pass local files as image parameters — the CLI handles validation and base64 encoding

Image-input parameters (`--image`, `--images`, `--first-frame`, `--last-frame`,
`--mask`, `--mask-image-url`, `--ref-images-url`, `--reference-images`, ...)
accept three kinds of values:

| Value                                  | Behavior                                   |
| -------------------------------------- | ------------------------------------------ |
| `http://...` or `https://...` URL      | Forwarded unchanged to the API             |
| `data:image/...;base64,...` URI        | Forwarded unchanged                        |
| Local file path (relative or absolute) | Read, validated, base64-encoded, then sent |

This means you can drop a file from your machine into any command without
hosting it anywhere first:

```bash theme={null}
mulerouter run alibaba/wan2.6-i2v \
  --image ./photo.png \
  --prompt "Slow cinematic push-in"
```

## 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:

```bash theme={null}
mulerouter run google/nano-banana-2/edit \
  --prompt "Stitch into one panoramic scene" \
  --images '["./left.png", "./center.png", "./right.png"]' \
  --resolution 2K
```

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:

```bash theme={null}
mulerouter run klingai/kling-v3-omni-ref2v \
  --prompt "These two characters meet in a forest" \
  --elements '[
    {"frontal_image": "./hero.png"},
    {"reference_images": ["./cat.jpg", "./hat.jpg"]}
  ]'
```

## 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:

```
Warning: File not found for --image: ./missing.png
```

This makes typos loud while still allowing intentional pass-through of
URL-shaped strings.

## See also

* [`mulerouter run`](/docs/cli/commands/run)
* [`mulerouter params`](/docs/cli/commands/params) — see which parameters accept images
