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

# Image Generation

> Generate images with the LinkModel CLI and download the resulting artifacts.

Create an image generation task and wait for completion:

```bash theme={null}
lkm image "a red panda wearing round glasses"
```

`gen` is optional inside the `image` group:

```bash theme={null}
lkm image "a product photo"
lkm image gen "a product photo"
```

The built-in image default is `gpt-image-2`.

## Select a Model

Use `-m` or `--model`:

```bash theme={null}
lkm image gen "a product photo on a clean studio background" \
  -m seedream-4.5 \
  --max-images 2
```

## Reference Images

Pass reference image URLs with `--image`. Repeat the flag for workflows that accept multiple references:

```bash theme={null}
lkm image gen "turn this into a premium product shot" \
  -m seedream-4.5 \
  --image https://example.com/reference.png
```

## Common Options

| Option                    | Description                                                   |
| ------------------------- | ------------------------------------------------------------- |
| `-m, --model <model>`     | Image model name.                                             |
| `-q, --quality <quality>` | Quality setting when supported by the selected model.         |
| `-s, --size <size>`       | `auto` or `<width>x<height>`.                                 |
| `-i, --image <url...>`    | Reference image URL, repeatable for image-to-image workflows. |
| `-o, --out <dir>`         | Download directory.                                           |
| `--no-wait`               | Create the task and print the `task_id` without waiting.      |
| `--no-download`           | Wait for completion and print artifact URLs only.             |
| `--open`                  | Open downloaded artifacts with the system default app.        |
| `--json`                  | Print one JSON line for automation.                           |

## Resume an Image Task

Use `status` after `--no-wait`, timeout, or `Ctrl-C`:

```bash theme={null}
lkm image status <task_id>
lkm image status <task_id> --wait
```

Server-side tasks continue running after local timeout or interruption.

## Related

* [Model Schemas](/cli-model-schemas)
* [Automation](/cli-automation)
