# Live Clipping

Live clipping allows you to create CDN servable media files from your HLS stream while it is in progress. This requires a Real-time streaming account and [API key](https://docs-preview.optiview.dolby.com/pr-863/millicast/api/millicast-api.md) in addition to your THEOlive channel. For more details on the capabilities of the Media Asset API, refer to our [Media Asset API guide](https://docs-preview.optiview.dolby.com/pr-863/millicast/distribution/stream-recordings/how-to-get-media-assets.md) and contact your Dolby Account Team to help you get set up.

To create a clip for a live stream, call the [Create Media Asset](https://docs-preview.optiview.dolby.com/pr-863/millicast/api/media-assets-create-media-asset.md) endpoint, specifying your `channelId`, `startTime` and `"hls"` as the `targetFormat`. See below for an example request.

```curl
curl --request POST \
  --url https://api.millicast.com/api/v3/media/assets \
  --header 'Authorization: Bearer abc123' \
  --data '
{
  "channelId": "<channelId>",
  "startTime": "2026-01-15T01:33:33Z",
  "stopTime": "2026-01-15T01:34:33Z",
  "targetFormat": "hls"
}
'
```

Use the `mediaAssetId` in the response to check the completion status of the clip and retrieve a download URL via the [Read Media Asset](https://docs-preview.optiview.dolby.com/pr-863/millicast/api/media-assets-read-media-asset.md) endpoint.

For more information on live-to-VOD clipping please see [here](https://docs-preview.optiview.dolby.com/pr-863/millicast/distribution/stream-recordings/live-clipping.md). For more information on how to retrieve your clips please see [here](https://docs-preview.optiview.dolby.com/pr-863/millicast/distribution/stream-recordings/how-to-get-media-assets.md).

Please contact your Dolby Account Team if you would like to have this feature enabled.
