> For the complete documentation index, see [llms.txt](https://llmvision.gitbook.io/getting-started/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://llmvision.gitbook.io/getting-started/usage.md).

# Usage

## Available Actions

LLM Vision exposes five actions:

1. [`image_analyzer`](/getting-started/usage/image-analyzer.md): Analyzes image files, image and camera entities
2. [`video_analyzer`](/getting-started/usage/video-analyzer.md): Analyzes video files and Frigate events
3. [`stream_analyzer`](/getting-started/usage/stream-analyzer.md): Records and analyzes camera entities
4. [`data_analyzer`](/getting-started/usage/data-analyzer.md): Updates a sensor value based on images
5. [`create_event`](/getting-started/usage/create-event.md): Add a custom event to the LLM Vision Timeline

## Response

`image`, `video`, `stream` and `data` analyzers will return a response value:

```yaml
title: White SUV seen
response_text: >-
  The image shows a white SUV parked on a driveway.
key_frame: /config/media/llmvision/snapshots/0b9ff287-0.jpg
```

{% hint style="info" %}
Depending on your configuration, not all keys may be present. Refer to the parameter reference of each action to learn more.
{% endhint %}

### Accessing the response

To access it, set `response_variable` in your automation or script to e.g. `response`.

To get e.g. the generated title use `{{response.title}}`.

### Using Snapshots in your own Automations

In your own automations use the following template for snapshot paths:

```yaml
{{ response.key_frame.replace('/media', '/media/local') }}
```

Where `response` is the response variable of an analyzer action with `expose_images` enabled.

### Structured Responses

{% hint style="info" %}
Since v1.6.0 LLM Vision supports structured responses (json) for some providers.
{% endhint %}

When `response_format` is enabled and `structure` is provided, some providers can generate a valid JSON object according to the specified JSON schema.

#### Structure Example

```json
{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Event title"
    },
    "description": {
      "type": "string",
      "description": "Event description"
    },
    "confidence": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    }
  },
  "required": [
    "title",
    "description",
    "confidence"
  ],
  "additionalProperties": false
}
```

#### Schema Properties

<table><thead><tr><th width="136.4453125">Field</th><th width="146.3828125">Type</th><th width="94.28515625">Required</th><th width="137.39453125">Allowed Values</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td>string</td><td>Yes</td><td><code>"object"</code></td><td>Specifies the JSON data type the schema describes. In this case, the schema validates a JSON object.</td></tr><tr><td><code>properties</code></td><td>object</td><td>Yes</td><td>Key-value pairs where each key is a field name and each value is a nested schema definition</td><td>Defines the allowed fields of the object and the validation rules for each field.</td></tr><tr><td><code>required</code></td><td>array of strings</td><td>No (but commonly used)</td><td>Array of property names defined in <code>properties</code></td><td>Lists which properties must be present in the JSON object for it to be valid.</td></tr><tr><td><code>additionalProperties</code></td><td>boolean (or schema)</td><td>No</td><td><code>true</code>, <code>false</code>, or a schema object</td><td>Controls whether properties not listed in <code>properties</code> are allowed. <code>false</code> means no extra fields are permitted.</td></tr></tbody></table>
