Skip to main content

Download Media File

Download a media file or its optimized variant

  • file_id: ID of the file
  • variant: Optional image variant for optimized images
  • redirect_to_cdn: Redirect to CDN URL for faster delivery (cloud files only)
MethodPath
GET/api/v1/media/{file_id}/download

Primary host: https://valara.cloud (legacy alias: https://dash.jacoballenmedia.com).

Parameters

NameInRequiredTypeDescription
file_idpathyesstring
variantquerynostringImage variant (thumbnail, web, mls, print, webp_web, webp_thumb)
redirect_to_cdnquerynobooleanRedirect to CDN URL for cloud files

Request body

(no request body)

Response

null

Responses

StatusDescription
200Successful Response
422Validation Error (see error codes)

Examples

curl

curl -X GET "https://valara.cloud/api/v1/media/{file_id}/download" \
-H "Authorization: Bearer $VALARA_API_KEY" \
-H "Content-Type: application/json"

Python

import os
import uuid
import httpx
res = httpx.request(
"GET",
"https://valara.cloud/api/v1/media/{file_id}/download",
headers={
"Authorization": f"Bearer {os.environ['VALARA_API_KEY']}",
"Content-Type": "application/json",
},
)
res.raise_for_status()
print(res.json())

See also