Skip to main content
GET
Fetch Media

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

mediaId
string
required

Media asset ID (e.g. 2f928a3f-1d2a-4a2b) or ID with extension (2f928a3f.jpg).

Query Parameters

format
string

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.

width
integer

Target width in pixels (max 4000).

Required range: x <= 4000
height
integer

Target height in pixels (max 4000).

Required range: x <= 4000
fit
enum<string>

Scaling fit (cover, contain, fill, inside, outside).

Available options:
cover,
contain,
fill,
inside,
outside
crop
string

Explicitly crop the image using a comma-separated string left,top,width,height (e.g. 10,20,100,100).

quality
integer

Quality (1-100).

Required range: 1 <= x <= 100
bg
string

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.

fps
integer

Video frame rate (1-120).

Required range: 1 <= x <= 120
trimStart
number

Video trim start in seconds.

Required range: x >= 0
trimEnd
number

Video trim end in seconds.

Required range: x >= 0
time
number

Specific timestamp in seconds for pulling a snapshot or thumbnail.

Required range: x >= 0
p
string

Transform preset key to apply.

exp
integer

Unix timestamp (seconds) when signed URL expires. Required for signed folders.

sig
string

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.