> ## 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 images

> Ask HeyGen Decision 1 about up to four images: compare designs, check brand rules, and classify photos with yes/no, choice, and score questions.

Add up to 4 images under `assets.images` to decide on what something looks like: a product photo against a spec, a thumbnail against brand rules, or a screenshot against an expected state.

Images are keyed by names you choose. The model reads all images in request order, then `state`, so use `state` to say what each image is by its position.

## Compare two images

```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 first image is the approved thumbnail template. The second is a new thumbnail submitted for review.",
    "assets": {
      "images": {
        "template": { "type": "asset_id", "asset_id": "TEMPLATE_IMAGE_ASSET_ID" },
        "submission": { "type": "url", "url": "https://example.com/thumbnail.png" }
      }
    },
    "questions": {
      "on_brand": {
        "type": "noul",
        "instructions": "Does the second image follow the layout, colors, and logo placement of the first?"
      },
      "text_legibility": {
        "type": "score",
        "instructions": "How readable is the title text in the second image at small sizes?",
        "criteria": [
          "Title text is missing or unreadable",
          "Title text is readable only at full size",
          "Title text is clear at thumbnail size"
        ]
      }
    }
  }'
```

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).

## Image inputs

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

Images can share a request with one [video](https://heygen-1fa696a7.mintlify.site/docs/models/decision/video.md). Each image adds to `usage.input_tokens`.


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