Download media file
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/media/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://blackbox.dasha.ai/api/v1/media/{id}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/media/{id}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Download media file
Downloads the media file content as a stream with appropriate Content-Disposition header for file download.
GET
/
api
/
v1
/
media
/
{id}
/
download
Download media file
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://blackbox.dasha.ai/api/v1/media/{id}/download', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request GET \
--url https://blackbox.dasha.ai/api/v1/media/{id}/download \
--header 'Authorization: Bearer <token>'import requests
url = "https://blackbox.dasha.ai/api/v1/media/{id}/download"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)"<string>"{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}{
"type": "<string>",
"title": "<string>",
"status": 123,
"detail": "<string>",
"instance": "<string>"
}Path Parameters
Media file identifier
Response
Returns media file stream successfully
The response is of type file.
Was this page helpful?