# Data Analyzer

<figure><img src="/files/gDxtyC2iPwI8VKCd0C9u" alt=""><figcaption><p>Image to sensor</p></figcaption></figure>

### Introduction

`data_analyzer` extracts data from an image, stream or video based on your prompt.

For example you could create a sensor to monitor how many cars are parked, monitor your 3D print quality or the license plate of the car in your driveway.

{% hint style="info" %}
Use [helpers ](https://my.home-assistant.io/redirect/helpers/)to create virtual sensors!
{% endhint %}

### Supported sensors

* `number` and `input_number`
* `text` and `input_text`
* `select` and `input_select`
* `input_boolean`

### Action Reference

{% code title="Action Reference" %}

```yaml
service: llmvision.data_analyzer
data:
  provider: 01J99F4T99PA1XGQ4CTQS3CP8H  # Select in UI dropdown
  model: gpt-5-mini
  message: What is the car's license plate?
  sensor_entity: input_text.last_license_plate
  image_entity: 
    - image.garage_car
  image_file: |-
    /config/www/weather_chart.jpg
  max_tokens: 5 # A low value is recommended
  target_width: 1280
  include_filename: true # Include image/camera name in request
```

{% endcode %}

{% hint style="warning" %}
The `provider` id will not be the same for you. Switch to UI mode and select one of your configurations. If you don't see any, you need to set up at least one provider!
{% endhint %}

{% hint style="info" %}
For all available models see: [Choosing the right model](/getting-started/choosing-the-right-model.md)
{% endhint %}

### Parameter Reference

<table><thead><tr><th width="154.35546875">Parameter</th><th width="91.12109375">Required</th><th width="399.6796875">Description</th><th width="99.6484375">Default</th></tr></thead><tbody><tr><td><code>provider</code></td><td>Yes</td><td>The AI provider configuration</td><td></td></tr><tr><td><code>model</code></td><td>No</td><td>Model used for processing the image(s).</td><td></td></tr><tr><td><code>message</code></td><td>Yes</td><td>The prompt to send along with the image(s).</td><td></td></tr><tr><td><code>store_in_timeline</code></td><td>No</td><td>Add event to Timeline</td><td><code>false</code></td></tr><tr><td><code>use_memory</code></td><td>No</td><td>Use information stored in memory to provide additional context. Memory must be set up.</td><td><code>false</code></td></tr><tr><td><code>sensor_entity</code></td><td>Yes</td><td>The sensor to update</td><td></td></tr><tr><td><code>image_file</code></td><td>No*</td><td>The path to the image file(s). Each path must be on a new line.</td><td></td></tr><tr><td><code>image_entity</code></td><td>No*</td><td>An alternative to <code>image_file</code> for providing image input.</td><td></td></tr><tr><td><code>include_filename</code></td><td>Yes</td><td>Whether to include the filename in the request.</td><td><code>false</code></td></tr><tr><td><code>target_width</code></td><td>No</td><td>Width to downscale the image to before encoding.</td><td>1280</td></tr><tr><td><code>max_tokens</code></td><td>Yes</td><td>The maximum number of response tokens to generate.</td><td>1000</td></tr><tr><td><code>generate_title</code></td><td>No</td><td>Generate a title. (Used for notifications and remembered events)</td><td><code>false</code></td></tr><tr><td><code>expose_images</code></td><td>No</td><td>Save key frame to <code>/config/media/llmvision/snapshots</code>. File path is included in response as <code>key_frame</code>. If used together with <code>remember</code> images will be deleted after <code>retention_time</code> set in Timeline. Otherwise this folder will use a lot of disk space!</td><td><code>false</code></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://llmvision.gitbook.io/getting-started/usage/data-analyzer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
