Skip to main content

Downloads

The Downloads API lets you create downloadable packages from your media library. A download can include selected media assets, specific renditions (video qualities, audio formats), and transcripts -- bundled as a single compressed archive with an optional expiry date.

Create a Download

Create a download package by specifying which assets, renditions, and transcripts to include:

curl --request POST \
--url https://api.streamdiver.com/v2/downloads \
--header "Authorization: Bearer {token}" \
--header "Content-Type: application/json" \
--data '{
"title": "Q4 Board Meeting Materials",
"description": "Video recordings and transcripts from the Q4 board meeting",
"selectedMediaIds": ["{mediaId1}", "{mediaId2}"],
"selectedRenditionIds": ["{renditionId1}"],
"selectedTranscripts": [
{ "id": "{transcriptId1}", "format": "srt" },
{ "id": "{transcriptId2}", "format": "txt" }
],
"expires": "2025-12-31T23:59:59Z"
}'

Request Properties

PropertyTypeDescription
titlestringTitle for the download package
descriptionstringDescription of the contents
selectedMediaIdsstring[]Media asset IDs to include (authenticated users only)
selectedRenditionIdsstring[]Specific rendition IDs to include
selectedTranscriptsobject[]Transcripts to include, each with id and format (txt, srt, json)
expiresdate-timeExpiration date in UTC (optional; tenant default is used if omitted)
info

Anonymous users are limited to a single rendition per download. Authenticated users can select multiple assets, renditions, and transcripts.

Check Download Status

After creating a download, it may need time to prepare. Poll the status until it's ready:

curl --request GET \
--url https://api.streamdiver.com/v2/downloads/{downloadId} \
--header "Authorization: Bearer {token}"

Status Values

StatusDescription
preparingThe download is being assembled
readyFiles are available for download

When ready, the response includes files with download URLs, file sizes, and MIME types:

{
"data": {
"id": "{downloadId}",
"status": "ready",
"compressed": true,
"files": [
{
"url": "https://api.streamdiver.com/v2/downloads/file/{fileId}",
"size": 123456789,
"mimeType": "application/zip"
}
]
}
}

List Downloads

Retrieve all downloads created by the current user:

curl --request GET \
--url "https://api.streamdiver.com/v2/downloads?perPage=10&page=0" \
--header "Authorization: Bearer {token}"

Delete a Download

Remove a download and its associated files:

curl --request DELETE \
--url https://api.streamdiver.com/v2/downloads/{downloadId} \
--header "Authorization: Bearer {token}"

Further Resources