> 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/platform/pop/pop-components/inference.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# Inference

The inference component and the attributes it accepts

Runs one ability or model over the media it receives and attaches structured predictions to the result.

An inference component must name exactly one ability. `ability` and `abilityUuid` are the current spellings; `model` and `modelUuid` are the older ones, still accepted and marked deprecated in the Python SDK. Naming none is rejected, and naming both an alias and a uuid is rejected.

| Attribute                 | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                | SDK                                |
| ------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| `ability`                 | string  | Ability alias with a tag, e.g. `eyepop.person:latest`. See [Abilities](https://docs.eyepop.ai/platform/abilities.md).                                                                                                                                                                                                                                                                                                                                                                                      | both                               |
| `abilityUuid`             | string  | Ability by uuid, for a custom trained model.                                                                                                                                                                                                                                                                                                                                                                                                                                                               | both                               |
| `model`                   | string  | Deprecated spelling of `ability`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                          | both                               |
| `modelUuid`               | string  | Deprecated spelling of `abilityUuid`.                                                                                                                                                                                                                                                                                                                                                                                                                                                                      | both                               |
| `inferenceTypes`          | list    | Narrows what the ability is run for. Resolved from the ability when omitted, so most Pops leave it unset. Values: `image_classification`, `object_detection`, `key_points`, `ocr`, `mesh`, `feature_vector`, `semantic_segmentation`, `segmentation`, `raw`.                                                                                                                                                                                                                                               | `raw` is missing from the Node SDK |
| `categoryName`            | string  | Tags every prediction from this component with a category name, so results from several components stay distinguishable.                                                                                                                                                                                                                                                                                                                                                                                   | both                               |
| `confidenceThreshold`     | float   | Drops predictions below this confidence, overriding the ability's default.                                                                                                                                                                                                                                                                                                                                                                                                                                 | both                               |
| `objectAreaThreshold`     | float   | Drops detections smaller than this fraction of the frame.                                                                                                                                                                                                                                                                                                                                                                                                                                                  | missing from the Node SDK          |
| `topK`                    | integer | Keeps only the highest-scoring *N* predictions.                                                                                                                                                                                                                                                                                                                                                                                                                                                            | both                               |
| `topKClasses`             | integer | Keeps only the highest-scoring *N* classes per prediction.                                                                                                                                                                                                                                                                                                                                                                                                                                                 | both                               |
| `classes`                 | list    | Keeps only predictions of these class labels, e.g. `["person", "car"]`. See [Restricting to classes](#restricting-to-classes).                                                                                                                                                                                                                                                                                                                                                                             | both                               |
| `multiClass`              | boolean | Allows one detection to carry several class labels.                                                                                                                                                                                                                                                                                                                                                                                                                                                        | **neither SDK** — wire only        |
| `targetFps`               | string  | Samples video at this rate for this component, as a fraction of integers, e.g. `"3/2"`. Independent of the source's own [`fps`](https://docs.eyepop.ai/platform/sources-and-options/options/frame-rate.md).                                                                                                                                                                                                                                                                                                | both                               |
| `videoChunkLengthSeconds` | float   | For abilities that reason over a span of video, the length of each chunk in seconds, above 0. A source can set its own with [component parameters](https://docs.eyepop.ai/platform/sources-and-options/options/component-parameters.md#video-chunking).                                                                                                                                                                                                                                                    | both                               |
| `videoChunkOverlap`       | float   | The share of a chunk the next chunk repeats, below 0.5: with `0.25` and 4 s chunks, each chunk starts with the last second of the one before, and chunks start every 3 s. Overlapping frames are processed, and billed, again, about `1 / (1 - overlap)` times the frames in all. A negative value leaves that share out between chunks instead. A source can set its own with [component parameters](https://docs.eyepop.ai/platform/sources-and-options/options/component-parameters.md#video-chunking). | both                               |
| `hidden`                  | boolean | Keeps this component's predictions out of the response while still feeding downstream components. See [Hiding intermediate stages](#hiding-intermediate-stages).                                                                                                                                                                                                                                                                                                                                           | both                               |
| `params`                  | object  | Parameters passed through to abilities that accept them — the `prompts` of an [open-vocabulary](https://docs.eyepop.ai/platform/abilities/open-vocabulary.md) ability, for instance. See [Prompting an ability](#prompting-an-ability).                                                                                                                                                                                                                                                                    | both                               |

### Prompting an ability

[Open-vocabulary](https://docs.eyepop.ai/platform/abilities/open-vocabulary.md) abilities take what to look for through `params.prompts`, a list of `{prompt, label}` pairs. `prompt` is the text the model matches; `label` is the class label the matches are reported under, and defaults to the prompt:

```json
{
    "type": "inference",
    "ability": "eyepop.sam3.detect:latest",
    "params": { "prompts": [{ "prompt": "forklift" }, { "prompt": "hand pallet truck", "label": "pallet jack" }] }
}
```

To ask different questions of different sources in one session, override `params` per source with [component parameters](https://docs.eyepop.ai/platform/sources-and-options/options/component-parameters.md).

### Restricting to classes

`classes` keeps a component's predictions to the labels you list, so a broad ability can serve a narrow question. On `eyepop.common-objects:latest`, `classes: ["person", "car"]` returns people and cars and nothing else:

```json
{
    "type": "inference",
    "ability": "eyepop.common-objects:latest",
    "classes": ["person", "car"]
}
```

* **Before `topK`.** The filter runs first, so `topK: 1` returns the best person or car, not whatever the ability was most confident about.
* **What it filters.** It applies to detections, classifications and key points. Text read by an OCR ability has no class and passes through unfiltered.
* **Exact labels.** Labels are matched exactly, case included. A label the ability cannot produce is rejected when the Pop is compiled, so a typo fails at the boundary rather than quietly returning nothing.
* **Empty list.** An empty list restricts nothing.

### Hiding intermediate stages

Real pipelines often need a stage the caller never asked to see — a face detector that exists only to feed expression analysis. Setting `hidden` on it keeps its predictions out of the response, and what that means depends on what the component produces:

| The component produces                | `hidden` does                                                                                                                     |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| object detections                     | Predictions are withheld from the response but still forwarded downstream, and downstream results attach to the enclosing object. |
| segmentation or semantic segmentation | Masks are merged into the object that fed the component rather than returned separately.                                          |
| anything else                         | Predictions are dropped from the response entirely.                                                                               |

### Next steps

* [Components](https://docs.eyepop.ai/platform/pop/pop-components.md) — the other component types and the shared attributes
* [Abilities](https://docs.eyepop.ai/platform/abilities.md) — the pretrained and custom models to name in an inference component
* [Open vocabulary](https://docs.eyepop.ai/platform/abilities/open-vocabulary.md) — the abilities that take `prompts`
* [Tracking](https://docs.eyepop.ai/platform/pop/pop-components/tracking.md) — following the detected objects across frames


---

# 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/platform/pop/pop-components/inference.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.
