> ## 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 it shows and says, compare it with reference images, and score visual quality.

Add up to 10 videos, each at most 60 s long, under `assets.videos` to decide on what a video shows and says: whether a product is shown correctly, whether a scene matches a reference, or whether the voiceover matches the screen.

The model hears each video's soundtrack with its pictures.

## 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-turbo",
    "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).

## Check what is shown and what is said

The model hears the video's soundtrack, so one video is enough.

```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-turbo",
    "state": "The video is a 30-second ad.",
    "assets": {
      "videos": {
        "ad": { "type": "asset_id", "asset_id": "VIDEO_ASSET_ID" }
      }
    },
    "questions": {
      "price_matches": {
        "type": "noul",
        "instructions": "Is the price that the voiceover says the same as the price shown on screen?"
      }
    }
  }'
```

## Video inputs

| | |
| - | - |
| Field | `assets.videos`, keyed by name |
| Per request | Up to 10 videos, with up to 100 [images](https://heygen-1fa696a7.mintlify.site/docs/models/decision/image.md) and up to 10 [audio clips](https://heygen-1fa696a7.mintlify.site/docs/models/decision/audio.md), on both models |
| Length | At most 60 s per video, on both models. The API measures how long each video plays, not only the duration in its file header. A longer video returns `400`: `A video can be at most 60 s; assets.videos.clip is 94.2 s.` |
| 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 32 MiB request body |

For larger files, upload with the [asset upload API](https://heygen-1fa696a7.mintlify.site/docs/upload-assets.md) or the [direct upload flow](https://heygen-1fa696a7.mintlify.site/docs/direct-upload.md) and pass the `asset_id`. An `asset_id` is read from storage, so the URL download cap does not apply.

## How much video fits

If a request does not fit the context window, the API returns `400` with `context_length_exceeded`. See [Context window](https://heygen-1fa696a7.mintlify.site/docs/models/heygen-decision.md#context-window).


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