# Image Analyzer

## Example

Once you have set up at least one provider and have at least one camera in Home Assistant, \
you can test LLM Vision:

{% code title="Minimal working example" %}

```yaml
action: llmvision.image_analyzer
data:
  max_tokens: 50
  provider: 01JAAFDSVEJEBMESBP62QP156T # Pick in UI
  message: Describe the image
  image_entity:
    - camera.front_door # Replace with your camera's entity_id
  include_filename: false
```

{% endcode %}

## Action Reference

{% hint style="warning" %}
The `provider` id will not be the same for you. Switch to UI mode and select one of your config entries.
{% endhint %}

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

{% code title="Action Reference" %}

```yaml
action: llmvision.image_analyzer
data:
  model: gpt-5-mini
  message: Describe the image
  image_file: |-
    /config/www/tmp/front_door.jpg
    /config/www/tmp/garage.jpg
  image_entity:
    - camera.front_door
    - camera.garage
  target_width: 1280
  max_tokens: 1000
  provider: 01JAAFDSVEJEBMESBP62QP156T
  include_filename: true
```

{% endcode %}

### Parameter Reference

<table><thead><tr><th width="173">Parameter</th><th width="93.70703125">Required</th><th width="378.75390625">Description</th><th width="100.69921875">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>Store event in Timeline</td><td>false</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>false</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>false</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>false</td></tr><tr><td><code>response_format</code></td><td>No</td><td>Format of the response - text for natural language or json for structured data</td><td>text</td></tr><tr><td><code>structure</code></td><td>No</td><td>JSON schema defining the expected response structure (only used when <code>response_format</code> is json). See &#x3C;here> for more information.</td><td>see here</td></tr><tr><td><code>title_field</code></td><td>No</td><td>Name of the field in your JSON schema that contains the event title (used for timeline). Leave empty to use fallback title "Motion detected".</td><td>title</td></tr><tr><td><code>description_field</code></td><td>No</td><td>Name of the field in your JSON schema that contains the event description (used for timeline).</td><td>description</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/image-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.
