curl --request GET \
--url https://api.dreep.cloud/api/v1/fetch/{mediaId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreep.cloud/api/v1/fetch/{mediaId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dreep.cloud/api/v1/fetch/{mediaId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dreep.cloud/api/v1/fetch/{mediaId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dreep.cloud/api/v1/fetch/{mediaId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dreep.cloud/api/v1/fetch/{mediaId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreep.cloud/api/v1/fetch/{mediaId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}Fetch Media
Get an asset by ID, applying optional transforms on the fly via query parameters.
This endpoint is public (no API key needed) — how much of that matters depends on the access control of the folder the asset lives in: - public folders: fetchable by anyone with the URL. - private folders: not fetchable through this endpoint at all. Private assets can only be viewed by an authenticated project member from the Dreep dashboard.
- signed folders: not fetchable with a bare URL, but accessible via temporary time-limited URLs generated using your project’s URL Signing Secret (with
expandsigHMAC-SHA256 query parameters). A request for a private or signed asset without valid credentials returns401.
curl --request GET \
--url https://api.dreep.cloud/api/v1/fetch/{mediaId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.dreep.cloud/api/v1/fetch/{mediaId}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.dreep.cloud/api/v1/fetch/{mediaId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dreep.cloud/api/v1/fetch/{mediaId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dreep.cloud/api/v1/fetch/{mediaId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dreep.cloud/api/v1/fetch/{mediaId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dreep.cloud/api/v1/fetch/{mediaId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}{
"error": true,
"message": "Invalid request parameters",
"code": "invalid_request"
}Authorizations
Path Parameters
Query Parameters
Target output format (image: jpeg, jpg, png, webp, avif, tiff, gif, heic, heif, svg+xml; video: mp4, webm, mov, hls, m3u8, gif; audio: mp3, wav, aac; text extraction: txt; documents: pdf, docx, odt, rtf, xlsx, ods, csv, pptx, odp). Requesting an image format on a video asset extracts a thumbnail. Requesting txt on an image or PDF asset runs Optical Character Recognition (OCR) to extract plain text. Requesting png or jpeg on a PDF renders one page as an image (see page). See Document Conversions for which document formats convert to which.
Background colour composited behind any transparency, as hex without a leading # (fff, ffffff, or ffffffcc for alpha). Most useful on a background-removed cutout: the cutout is stored once with transparency and each colour is applied at delivery, so one removal serves any number of backgrounds.
Response
Media binary content
The response is of type file.