> ## Documentation Index
> Fetch the complete documentation index at: https://heygen-1fa696a7.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Decision from video

> Ask HeyGen Decision 1 about a video: check what appears on screen, compare it with reference images, and score visual quality.

Add one video under `assets.videos` to decide on what appears on screen: whether a product is shown correctly, whether a scene matches a reference, or how clearly something is visible.

The model reads the video as sampled frames, after any images and before `state`. To judge what is said, put the transcript in `state`.

## Check a video against a reference image

This request compares the package in a product demo with the approved design.

```bash theme={null}
curl -X POST https://api.heygen.com/v3/models/decisions \
  -H "X-Api-Key: $HEYGEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "heygen-decision-1",
    "state": "The image shows the approved package design. The video is a product demo. Compare the package visible in the video with the approved design.",
    "assets": {
      "images": {
        "approved_package": { "type": "asset_id", "asset_id": "IMAGE_ASSET_ID" }
      },
      "videos": {
        "demo": { "type": "asset_id", "asset_id": "VIDEO_ASSET_ID" }
      }
    },
    "questions": {
      "package_matches": {
        "type": "noul",
        "instructions": "Does the package shown in the video match the approved design in the image?"
      },
      "logo_visibility": {
        "type": "score",
        "instructions": "How clearly is the package logo visible in the video?",
        "criteria": [
          "The logo is not visible",
          "The logo is visible but too small or obscured to read",
          "The logo is clear and readable"
        ]
      }
    }
  }'
```

The response has the same `data.answers` and `data.usage` fields as a [text request](https://heygen-1fa696a7.mintlify.site/docs/models/decision/text.md).

## Video inputs

| | |
| - | - |
| Field | `assets.videos`, keyed by name |
| Per request | 1 video, with up to 4 [images](https://heygen-1fa696a7.mintlify.site/docs/models/decision/image.md) |
| Sources | `asset_id`, HTTPS `url`, or `base64` with a `video/*` `media_type`. See [Choose an asset source](https://heygen-1fa696a7.mintlify.site/docs/models/heygen-decision.md#choose-an-asset-source). |
| Size | 50 MiB per URL download, 16 MiB per decoded base64 video, within the 16 MiB request body |

For larger files, upload with the [asset upload API](https://heygen-1fa696a7.mintlify.site/docs/upload-assets.md) and pass the `asset_id`. Sampled frames add to `usage.input_tokens`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.