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)
| Method | Path |
|---|---|
GET | /api/v1/media/{file_id}/download |
Primary host: https://valara.cloud (legacy alias: https://dash.jacoballenmedia.com).
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
file_id | path | yes | string | |
variant | query | no | string | Image variant (thumbnail, web, mls, print, webp_web, webp_thumb) |
redirect_to_cdn | query | no | boolean | Redirect to CDN URL for cloud files |
Request body
(no request body)
Response
null
Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation 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())