> For the complete documentation index, see [llms.txt](https://docs.eyepop.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eyepop.ai/cli/run.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Run Inference

Run models on images, video, and datasets from the terminal

`eyepop run` is the core workflow. A flag names the **target** (what to run) and `--media-path` names the **media** (what to run it on):

```bash
eyepop run --model <alias-or-uuid> --media-path <media>
```

### Targets

| Target                      | Meaning                                                                                                                      | Example                                           |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| `--model <alias-or-uuid>`   | A published model or ability                                                                                                 | `--model eyepop.person:latest`                    |
| `--pop <pop>`               | A Pop from `eyepop get pops` — a built-in by name or a saved one by UUID — or the Pop itself as JSON/YAML (inline or a file) | `--pop people-common-objects`, `--pop ./pop.json` |
| `--ability <alias-or-uuid>` | An ability, run as a one-component Pop                                                                                       | `--ability eyepop.person:latest`                  |
| `--session <uuid>`          | An existing session or deployment                                                                                            | `--session 73a991ac-...`                          |

Exactly one target per run. A published model is the usual choice — list what you can run with `eyepop get models`, and published abilities with `eyepop get abilities`.

On a machine running an [on-premise instance](https://docs.eyepop.ai/cli/on-premise.md), you can omit the target entirely and the run uses the pop that instance serves.

{% hint style="info" %}
Prefer a guided flow? `eyepop tui` lists your runnable models and walks you through picking media and running. Running `eyepop run` with no target and no media prints its help.
{% endhint %}

### Run on media

Run a model on a single image:

```bash
eyepop run --model eyepop.person:latest --media-path image.jpg
```

Ask a VLM ability a question about the image:

```bash
eyepop run --model <vlm-ability> --media-path image.jpg --prompt "Describe this image"
```

Run several sources, or a directory recursively:

```bash
eyepop run --model eyepop.person:latest --media-path image1.jpg --media-path image2.jpg
eyepop run --model eyepop.person:latest --media-path ./images --recursive
```

`--concurrency` runs several inputs at once. `--no-cache` forces fresh inference instead of reusing a cached result; it applies to VLM ability runs, with or without `--prompt`, and `eyepop run` refuses it on `--pop`, `--ability`, `--session`, and any `--model` alias that resolves to a published model.

### Send results to a webhook

`--output` sends each source's results to a webhook as well, as they happen, beside what the run prints:

```bash
eyepop run --pop ./pop.json --media-path https://example.com/clip.mp4 \
  --output webhook=https://hooks.example.com/eyepop
```

A header's value comes from an environment variable, never from the command line:

```bash
export CRM_TOKEN='Bearer 7f3c...'
eyepop run --ability eyepop.person:latest --media-path https://example.com/clip.mp4 \
  --output webhook=https://hooks.example.com/eyepop,header=Authorization:env:CRM_TOKEN,events=prediction.tracked+stream.status_changed
```

`--output` goes with url sources (a file is uploaded, and an upload takes no outputs) and with `--pop`, `--ability` or `--session`. The events, their delivery and the payload are in [Outputs](https://docs.eyepop.ai/platform/outputs.md).

### Run in the cloud through your instance

On a machine with a relay-only instance, `--relay` runs the pop in EyePop's cloud on media from this machine; see [Relay to the Cloud](https://docs.eyepop.ai/deploying/on-premise/relay.md#relay-a-single-run).

### Run on a live stream

`--media-path` also takes a live stream's url — `rtsp://`, `rtsps://`, `rtmp://` or `rtmps://` — such as an IP camera's:

```bash
eyepop run --pop ./pop.json --media-path rtsp://camera.local/stream1
eyepop run --ability eyepop.person:latest --media-path rtsp://user:password@camera.local/stream1 --json
```

EyePop reads the stream from its url, so the camera must be reachable from where the pop runs: from EyePop's cloud for a cloud run, or from the instance for a run on an [on-premise instance](https://docs.eyepop.ai/cli/on-premise.md) (`eyepop run --media-path rtsp://...` with no target). Nothing is downloaded or uploaded by the CLI.

A live stream never ends on its own, so the run prints each result as it arrives and keeps going until the stream ends or you press Ctrl-C. Ctrl-C ends the run: the stream stops, a pipeline the run started is stopped, and the CLI exits with status 130. A password in the url is masked wherever the run shows the url.

* Each live stream takes one of the `--concurrency` slots (4 by default) for as long as it plays, so a run with more live streams than that is refused. Files or urls given alongside live streams need one slot left over, so `--media-path rtsp://... --media-path image.jpg` needs `--concurrency 2` or more.
* `--timeout` (120 seconds by default) is how long the run waits for each next result before it gives up on a stream that went quiet.
* A live stream runs on every target except a VLM ability, which answers about media it receives whole. `eyepop create asset` refuses one too: a dataset holds media that ends.

### Selected predictions

A Pop whose tracking forwards through a select operator (`select_crop` or `select_full`) picks one frame of each track and runs its targets, such as a VLM ability, on that frame only. That result is a **selected prediction**: it is about a past frame, so it arrives after the frames that followed, between live results. `eyepop run` shows each one:

* By default it is headed `Selected: the frame at <seconds>s`, with a line for each selected object: its class, its track and what the targets said, for example `person #2: no hard hat 96%`.
* With `--json`, its line carries `"selected": true` beside `file`; a live frame's line has no `selected`. `jq 'select(.selected)'` keeps only the selections.
* The response is the prediction itself, in prediction format version 4, in which a track is `trackId` and a selected prediction carries `"selected": true`.

### Evaluate on a dataset

Scoring against a dataset is its own command — `eyepop evaluate` takes an ability and a dataset:

```bash
eyepop evaluate --ability my-namespace.find-kittens:latest --dataset people
```

Scope to a partition, or return immediately with a request id instead of waiting:

```bash
eyepop evaluate --ability my-namespace.find-kittens:latest --dataset people --partition test
eyepop evaluate --ability my-namespace.find-kittens:latest --dataset people --no-wait
```

Check or watch the evaluation:

```bash
eyepop get evals <request_id>
eyepop get evals <request_id> --watch
```

### Run a Pop or an existing session

```bash
eyepop run --pop people-common-objects --media-path image.jpg
eyepop run --session <session_uuid> --media-path image.jpg
```

A Pop you wrote yourself runs straight from its file: `eyepop run --pop ./pop.json --media-path image.jpg`. To keep it warm between runs, create a deployment from it with `eyepop create deployment --pop ./pop.json` (see [Persistent Deployments](https://docs.eyepop.ai/cli/persistent-sessions.md)) and run against it with `--session`.

Pops and sessions take media only. To score against a dataset, use `eyepop evaluate`.

### Next steps

* [Command Reference](https://docs.eyepop.ai/cli/reference.md) — every `run` and `evaluate` flag
* [Resources](https://docs.eyepop.ai/cli/resources.md) — find the models, abilities, and pops to run


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.eyepop.ai/cli/run.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
