> 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/abilities/user-defined-vlm-tasks.md). Agents can also search and read this documentation through its [MCP server](https://docs.eyepop.ai/~gitbook/mcp).

# User defined VLM tasks

Define your own vision-language ability with a free-form prompt, a response schema or a task, and publish it under your namespace

Besides the pretrained [abilities](https://docs.eyepop.ai/platform/abilities.md), you can define an ability of your own on a vision-language model: a task — count people, extract fields from a document, understand an event in video — that takes media and returns structured output. It needs no training and no model of your own; you describe the task, and the vision-language model performs it. The ready-made VLM abilities you prompt in the Pop instead are [Promptable VLM tasks](https://docs.eyepop.ai/platform/abilities/open-vocabulary/promptable-vlm-tasks.md).

Browse ready-made abilities, with example output, in the [Abilities Hub](https://eyepop.ai/abilities). Create your own with a prompt in the [dashboard](https://dashboard.eyepop.ai), or with `eyepop create ability` from the [CLI](https://docs.eyepop.ai/cli/resources.md). Publishing an ability gives it an alias under your namespace, `<your-namespace>.<task>.<name>:latest`, and that alias is how the CLI, a Pop, and a deployment reference it.

Chain abilities together into a pipeline with a [Pop](https://docs.eyepop.ai/platform/pop.md).

### Anatomy of an Ability

An ability you define is a small set of parameters that control how media is analyzed, how much compute it uses, and how often frames are sampled.

#### Every ability

| Field               | Description                                                                                                                                                               |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`              | Unique identifier used in API calls, e.g. `<your-namespace>.structured-ocr.read-drivers-license`.                                                                         |
| `description`       | What the Ability does. Also what the Prompt Creation Agent reads to generate or refine prompts, so make it specific and task-oriented.                                    |
| `model`             | The vision-language model the ability runs on: `qwen3` (the default when you leave it out), `gemini_4_argon` or `gpt_6_astra`. See [Choosing a model](#choosing-a-model). |
| `config.image_size` | Resolution media is resized to before inference. The single biggest lever on cost and speed.                                                                              |
| `config.fps`        | Frames per second sampled from video and livestreams.                                                                                                                     |
| `is_public`         | Whether the ability is publicly accessible.                                                                                                                               |

#### Free-form mode

See [Free-form prompt](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/free-form-prompt.md) and [Free-form prompt with a response schema](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/response-schema.md).

| Field             | Description                                                                                                                    |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `text_prompt`     | The instruction given to the vision-language model (`--prompt` on the CLI). Define the task and restrict the possible outputs. |
| `response_schema` | Optional. A JSON Schema the model's answer must follow; the parsed answer comes back as `details`.                             |

An ability is free-form or a task, never both: `task` and `prompts` exclude `text_prompt` and `response_schema`.

#### Task mode

See [Task mode: classify, detect or classify events](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/task-mode.md).

| Field                   | Description                                                                                                                                                            |
| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `task`                  | `image_classification`, `object_detection`, or `event_classification` (video, `qwen3` only).                                                                           |
| `prompts`               | The labels to answer with, at least one, each `{prompt, label}`: `prompt` is what the model looks for, `label` what it reports.                                        |
| `instructions`          | Optional. Your own instructions for the task, up to 2000 characters, added to the model's: what the camera shows, which part matters, what to ignore.                  |
| `video_chunk_length_ns` | `event_classification` only. The length of the video chunks the ability answers, in nanoseconds; two seconds when unset. The other tasks take one image and refuse it. |

`image_size` and `fps` are part of the Ability's `config` object; the other fields sit at the top level.

A useful mental model: **Ability = model + prompt + media sampling**. The model sets reasoning capability, the prompt defines the task, and `fps` plus `image_size` control performance and compute.

### Choosing a model

`model` picks the vision-language model an ability runs on. All three take every mode — a free-form prompt, a response schema, or a task — and answer in the same shape, so switching models changes one field and nothing else.

| `model`           | Runs                           | Takes                                        | Use it for                                                                                   |
| ----------------- | ------------------------------ | -------------------------------------------- | -------------------------------------------------------------------------------------------- |
| `qwen3` (default) | Qwen3 VL, on EyePop's GPUs     | Images and video, with every `config` option | Most abilities: the fastest, and the only one for video, `config.roi` or tuning the sampling |
| `gemini_4_argon`  | Gemini 4 Argon, a remote model | One image per request                        | Single images where `qwen3` falls short, and speed matters less                              |
| `gpt_6_astra`     | GPT-6 Astra, a remote model    | One image per request                        | The same; try both remote models on your images                                              |

Start with `qwen3`, and try a remote model when it misses things on your images: on the [Promptable VLM tasks](https://docs.eyepop.ai/platform/abilities/open-vocabulary/promptable-vlm-tasks.md) example both remote models find a bollard that `qwen3` does not. A remote model differs in four ways:

* **One image per request, no video.** Creating or updating the ability with a video setting, such as `video_chunk_length_ns`, or with the task `event_classification`, is refused with a 422.
* **No region of interest.** `config.roi` is refused with a 422; crop before the ability instead, for example with a [select operator](https://docs.eyepop.ai/platform/temporal-context/select-operators.md).
* **Sampling options are ignored**: the temperature, the token limit (`config.max_new_tokens`), top-p and top-k.
* **Billed per call, and slower.** Each request is a call to the remote model, billed per call, and it takes longer than `qwen3`. A [response schema](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/response-schema.md) answer that does not match the schema is a failed call, and it is still billed.

To choose a model, set `model` on `VlmAbilityCreate` when you create the ability: in Python a `VlmModel` from `eyepop.data.types` (for example `VlmModel.gemini_4_argon`), in Node the string (`'gemini_4_argon'`). Leave it out for `qwen3`, as every example in these pages does. An ability reports its model back in `model`. Setting `model` needs Python SDK 3.27.0 or Node SDK 3.27.0, or later.

### Three ways to ask

A vision-language ability is asked in one of three ways, each on a page of its own with an example of creating the ability and running it. The first two are a free-form prompt you write; the third is a task with a list of labels, and needs no prompt at all.

| Mode                                                                                                                            | You give                                      | The answer comes back as                                                         | Use it for                                                                               |
| ------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| [Free-form prompt](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/free-form-prompt.md)                        | `text_prompt`                                 | `texts`: the model's text                                                        | A short answer in words or a number                                                      |
| [Free-form prompt with a response schema](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/response-schema.md)  | `text_prompt` and `response_schema`           | `details`: JSON of the shape you defined                                         | Several fields at once, typed                                                            |
| [Task mode: classify, detect or classify events](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/task-mode.md) | `task`, `prompts` and optional `instructions` | `classes` or `objects`, labelled with your labels; per chunk for events in video | Choosing among labels, finding things by description, or telling what happens in a video |

### A good prompt

For the two free-form modes:

```
Determine whether a person in the frame is wearing a safety helmet.
Answer with "helmet" or "no_helmet".
```

It names the task and constrains the output. Avoid open-ended prompts like `Analyze the image` — they produce inconsistent labels, verbose text, and higher cost. When the answer is one label from a fixed list, as here, a [task-mode](https://docs.eyepop.ai/platform/abilities/user-defined-vlm-tasks/task-mode.md) ability does the constraining for you: the task `image_classification` with the prompts `a person wearing a safety helmet` and `a person without a safety helmet`.

### Typical settings

| Use case              | `image_size` | `fps` |
| --------------------- | ------------ | ----- |
| Object detection      | 512–640      | —     |
| Find event in video   | 512–640      | 2–5   |
| Sports analytics      | 512–640      | 5–10  |
| Industrial monitoring | 512–640      | 1–3   |
| Document analysis     | 768–1024     | —     |

Lower `image_size` and `fps` reduce compute while still capturing most events.

### Cost

Abilities consume [Compute Units](https://docs.eyepop.ai/pricing.md) based on the model, the `image_size` you set, and — for video — the frame rate. An ability on `gemini_4_argon` or `gpt_6_astra` is billed per call to the remote model. See [Pricing](https://docs.eyepop.ai/pricing.md) for plans and rates.

### Ability Prompt Creation Agent

Vision models are sensitive to how instructions are written; small wording changes shift accuracy, consistency, and cost. The Prompt Creation Agent takes the task you want to perform and generates a prompt that follows tested patterns, avoiding inconsistent classifications, verbose output, hallucinations, and unpredictable formatting.

*Coming soon to the dashboard.*

### Next steps

* [Abilities](https://docs.eyepop.ai/platform/abilities.md) — the pretrained catalog you can run today, and how custom models differ
* [Promptable VLM tasks](https://docs.eyepop.ai/platform/abilities/open-vocabulary/promptable-vlm-tasks.md) — the ready-made VLM abilities that classify and detect what you prompt in the Pop
* [Open vocabulary](https://docs.eyepop.ai/platform/abilities/open-vocabulary.md) — every ability that takes `prompts`, with an example of each
* [Pops](https://docs.eyepop.ai/platform/pop.md) — chain abilities into a pipeline
* [Train Your Own Model](https://docs.eyepop.ai/train-your-own-model.md) — build an ability from your own data


---

# 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/abilities/user-defined-vlm-tasks.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.
