> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interactivelayers.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Asset catalog

> Import, list, inspect and analyze private videos.

## Import a video

The VOD lesson in Academy walks through importing from a CDN in Console and connecting your CMS or MAM through the API. Browsers set to English start this lesson with English captions. [Connect video from your CDN](https://knowledgehub.interactivelayers.com/academy/rol/integraciones/vod)

Upload an MP4 using the `file` multipart field. Use H.264 8-bit video and AAC or MP3 if it has audio. For remote media, send `title` and `url` to `POST /v1/vod/assets`. Supported remote inputs are an MP4 or a finite, unencrypted HLS playlist on permitted hosts: a master or a single media playlist, MPEG-TS or fMP4. See [Import by HLS URL](#import-by-hls-url). Set `immutable: true` only when the same URL will keep serving the same bytes. A strong MP4 ETag also supports version verification.

```bash theme={null}
curl -fsS "$INTERACTIVE_LAYERS_BASE/v1/vod/assets/upload" \
  -H "X-API-Key: $INTERACTIVE_LAYERS_API_KEY" \
  -F 'file=@./sample.mp4' -F 'title=Integration sample'
```

`ad_free: true` declares that the media has no embedded ads. Set it only after checking the source if your delivery workflow requires it.

| Route | Purpose |
| - | - |
| `GET /v1/vod/assets?q=sample&page=1&limit=25` | Search by title or ID. Follow `next_page` until it is null. `status` can filter `ready` or `changed`. |
| `GET /v1/vod/assets/{asset_id}` | Read media version, metadata, playback and thumbnail URLs, and the latest analysis. |
| `PATCH /v1/vod/assets/{asset_id}` | Update `title` while keeping the ID. |
| `DELETE /v1/vod/assets/{asset_id}` | Delete the catalog entry and data owned by InteractiveLayers. Remote originals remain on the publisher's CDN. |

### Import by HLS URL

* **Master playlist.** IL analyses the lowest-bandwidth H.264 quality and, when the audio is separate (`EXT-X-MEDIA TYPE=AUDIO`), its default audio. The saved source is the master, so a player that plays the source gets the full ladder. IL reads the other playlists only to detect ad markers, so a quality IL does not analyse cannot block the import.
* **Single media playlist.** MPEG-TS segments, or fMP4 segments with `EXT-X-MAP`, one file per segment.
* **Refused**, in the playlists IL analyses, with the message saying which playlist it was:
  * a master with no H.264 quality: `The master playlist has no H.264 quality: the analysis reads only H.264`;
  * encrypted content: `Encrypted HLS (EXT-X-KEY) is not supported: use a clear HLS URL`;
  * byte ranges: `HLS with byte ranges (EXT-X-BYTERANGE) is not supported: use one file per segment`;
  * a separate audio much longer or shorter than the video: `… use a master whose audio and video have the same length`.
* An HLS import has a 10-minute limit, and a master's playlists 8 MB in total.
* **When the video counts as changed.** For a media playlist, any change to its text. For a master, only what the analysis uses: the entries of the chosen variant and audio in the master, and those two playlists with query strings removed from their URIs. Rotating tokens, reordering attributes, or changing or removing a quality IL did not analyse is not a change; adding a quality is when it becomes the one IL would analyse (a lower-bandwidth H.264 variant). Because of this, in a master a change that exists only in a query string of those playlists is not seen as a new version: put the content's version in the path. Import a changed video again before analysing it.

## Confirm that the result matches the video

Submit `asset_id` and optional `topics` to `POST /v1/vod/scans`. Read the result after `done` and check it against the asset version. Import the media again before analyzing an asset marked `changed`. An asset scan returns evidence and keeps `output_hls_url` null.

Use a backend to retrieve private media and thumbnails. If a linked asset returns HTTP 307, follow its `Location` with a fresh request that omits `X-API-Key`. [First analysis](https://docs.interactivelayers.com/quickstart.md) · [Campaign matching](https://docs.interactivelayers.com/vod-operations.md)

## Analyze commercial scenes in a temporary asset

For an integration using the Creators League pilot contract, check your environment’s `/v1/openapi.json` for the upload field `temporary` and both `/contexts` operations before submitting a video. Use the project’s API key from your backend. [Upload an MP4](https://docs.interactivelayers.com/reference/op-post-v1-vod-assets-upload.md)

1. Add `-F 'temporary=true'` to the MP4 upload. The response includes `asset_id` and `metadata.expires_at` in Unix seconds. InteractiveLayers schedules cleanup one hour after creation, including for an abandoned analysis.
2. Submit the asset to `POST /v1/vod/scans` and poll the scan until `status` is `done`. Send `POST /v1/vod/assets/{asset_id}/contexts` with `vod:write`. A processing-enabled project with scene classification configured receives HTTP 202. An unfinished scan returns HTTP 409. [Start scene classification](https://docs.interactivelayers.com/reference/op-post-v1-vod-assets-asset-id-contexts.md)
3. Poll `GET /v1/vod/assets/{asset_id}/contexts` with `vod:read` or `vod:write`. This reads cached evidence. Use the results when `available` is true, `pending` is zero and `error` is null. [Read scene context](https://docs.interactivelayers.com/reference/op-get-v1-vod-assets-asset-id-contexts.md)
4. Save the evidence you need, then send `DELETE /v1/vod/assets/{asset_id}`. A successful deletion returns HTTP 204. [Delete the asset](https://docs.interactivelayers.com/reference/op-delete-v1-vod-assets-asset-id.md)

Each `windows[]` entry contains `start` and `end` in seconds from the beginning of the uploaded asset. An `ad` window carries IAB or topic labels. Exclude `blocked`, `quiet` and `unknown` windows from commercial placement and respect the intervals in `margins`. A sponsor still needs an eligible campaign and available budget.

## Analyze the catalog in batches

The Academy tutorial shows how to retrieve categories and candidate moments from a batch through the Content API. The demo lets you filter results from seven videos and inspect a segment. [Analyze your catalog and query categories through the API](https://knowledgehub.interactivelayers.com/academy/rol/integraciones/catalogo-contextual-api)

The Te Informás tutorial shows how to connect and validate an HTTPS source, analyze a VOD sample, and use the CMS identifier when preparing a FAST integration. [Connect a CDN and analyze the catalog for FAST](https://knowledgehub.interactivelayers.com/academy/rol/integraciones/cdn-fast-teinformas)


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