Documentation / API Reference / Get a preview playlist
Get a preview playlist Retrieve the public HLS playlist when preview access is enabled and playback is available. No API token is required. Signed media URLs expire within one hour; reload the playlist to refresh them.
GET
/assets/{assetId} /preview.m3u8
Path Parameters Asset ID from the Asset API.
Responses 200 404 429 500
application/vnd.apple.mpegurl
Rewritten HLS playlist.
application/json Error response details
Show error properties
Code is the HTTP status code
Message is a human-readable error description
Examples:
Ressource not found
type
"NotFoundError"
string
required
Type indicates the error category
Available options:
NotFoundError
status
"error"
string
required
Status indicates the response status "error"
Asset unavailable, preview disabled, expired, deleted, or output not recorded.
application/json Error response details
Show error properties
Code is the HTTP status code
Message is a human-readable error description
Examples:
Rate limit exceeded
type
"TooManyRequestsError"
string
required
Type indicates the error category
Available options:
TooManyRequestsError
status
"error"
string
required
Status indicates the response status "error"
Preview rate limit exceeded.
application/json Show error properties
Examples:
Internal server error
type
"UnexpectedError"
string
required
status
"error"
string
required
Preview storage or playlist processing failed.
# Get a preview playlist
> Retrieve the public HLS playlist when preview access is enabled and playback is available. No API token is required. Signed media URLs expire within one hour; reload the playlist to refresh them.
```json
{
"path": "/assets/{assetId}/preview.m3u8",
"method": "get",
"schema": {
"description": "Retrieve the public HLS playlist when preview access is enabled and playback is available. No API token is required. Signed media URLs expire within one hour; reload the playlist to refresh them.",
"operationId": "getAssetPreview",
"parameters": [
{
"description": "Asset ID from the Asset API.",
"in": "path",
"name": "assetId",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/vnd.apple.mpegurl": {
"example": "#EXTM3U\n#EXT-X-VERSION:7\n#EXT-X-STREAM-INF:BANDWIDTH=1000000,RESOLUTION=1280x720\nhttps://stream.chunkify.dev/ast_example/renditions/h264/1280x720/1000kbps/video.m3u8\n",
"schema": {
"type": "string"
}
}
},
"description": "Rewritten HLS playlist.",
"headers": {
"Access-Control-Allow-Origin": {
"schema": {
"const": "*",
"type": "string"
}
},
"Cache-Control": {
"schema": {
"const": "no-store",
"type": "string"
}
}
}
},
"404": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorNotFound"
}
}
},
"description": "Asset unavailable, preview disabled, expired, deleted, or output not recorded."
},
"429": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorTooManyRequests"
}
}
},
"description": "Preview rate limit exceeded."
},
"500": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResponseErrorUnexpected"
}
}
},
"description": "Preview storage or playlist processing failed."
}
},
"security": [],
"summary": "Get a preview playlist",
"tags": [
"Assets"
],
"x-codeSamples": [
{
"lang": "Shell",
"source": "curl 'https://stream.chunkify.dev/ast_example.m3u8'"
}
]
}
}
```
```json #/components/schemas/ResponseErrorNotFound
{
"description": "Error response",
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 404,
"description": "Code is the HTTP status code",
"examples": [
404
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Ressource not found"
],
"type": "string"
},
"type": {
"const": "NotFoundError",
"description": "Type indicates the error category",
"enum": [
"NotFoundError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```
```json #/components/schemas/ResponseErrorTooManyRequests
{
"description": "Error response",
"properties": {
"error": {
"description": "Error response details",
"properties": {
"code": {
"const": 429,
"description": "Code is the HTTP status code",
"examples": [
429
],
"type": "integer"
},
"message": {
"description": "Message is a human-readable error description",
"examples": [
"Rate limit exceeded"
],
"type": "string"
},
"type": {
"const": "TooManyRequestsError",
"description": "Type indicates the error category",
"enum": [
"TooManyRequestsError"
],
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"description": "Status indicates the response status \"error\"",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```
```json #/components/schemas/ResponseErrorUnexpected
{
"description": "Unexpected preview processing or storage failure.",
"properties": {
"error": {
"properties": {
"code": {
"const": 500,
"type": "integer"
},
"message": {
"examples": [
"Internal server error"
],
"type": "string"
},
"type": {
"const": "UnexpectedError",
"type": "string"
}
},
"required": [
"type",
"code",
"message"
],
"type": "object"
},
"status": {
"const": "error",
"type": "string"
}
},
"required": [
"status",
"error"
],
"type": "object"
}
```