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"
}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"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Media asset ID (e.g. 2f928a3f-1d2a-4a2b) or ID with extension (2f928a3f.jpg).
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). 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.
Target width in pixels (max 4000).
x <= 4000Target height in pixels (max 4000).
x <= 4000Scaling fit (cover, contain, fill, inside, outside).
cover, contain, fill, inside, outside Explicitly crop the image using a comma-separated string left,top,width,height (e.g. 10,20,100,100).
Quality (1-100).
1 <= x <= 100Background 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.
Video frame rate (1-120).
1 <= x <= 120Video trim start in seconds.
x >= 0Video trim end in seconds.
x >= 0Specific timestamp in seconds for pulling a snapshot or thumbnail.
x >= 0Transform preset key to apply.
Unix timestamp (seconds) when signed URL expires. Required for signed folders.
HMAC-SHA256 signature calculated over assetId:expires using your project's URL Signing Secret. Required for signed folders.
Response
Media binary content
The response is of type file.