Skip to main content

Media Delivery API — Quick reference

A concise reference of all query parameters for images, sets, and video. Every parameter can be appended to an asset's URL as a query string:

Base URL pattern

https://cdn.media.amplience.net/{type}/{account}/{assetName}?{parameters}

type identifies the asset kind (i for images, s for sets, v for video). See URL structure in the overview for more detail.

Info

For full documentation including interactive examples, see the Media Delivery API guide.

Images
Link copied!

Sizing
Link copied!

Resize with w, h, maxW, and maxH, then control what happens when the image does not fit the requested dimensions with scale modes, point of interest, and upscaling.

ParameterDescription
wOutput width in pixels. Height is auto-calculated to preserve aspect ratio if omitted.
hOutput height in pixels. Width is auto-calculated to preserve aspect ratio if omitted.
maxWMaximum output width; larger requests are clamped and the height follows the aspect ratio. Can also be configured at the account level.
maxHMaximum output height; larger requests are clamped and the width follows the aspect ratio. Can also be configured at the account level.
Full reference and interactive examples

See Sizing · w · h · maxW · maxH

Scale mode
Link copied!

sm - Scale mode
Link copied!

Controls how the image is positioned or cropped when it does not fit exactly to the requested dimensions.

ValueDescription
cCrop to fit
sStretch
tlTop left
tcTop center
trTop right
mlMiddle left
mcMiddle center
mrMiddle right
blBottom left
bcBottom center
brBottom right
aspectMaintain aspect ratio
edgeResize to a specified edge - requires resize.edge and resize.edge.length
clampFit within bounds without padding, maintaining aspect ratio
Full reference and interactive examples

sm=edge sub-parameters
Link copied!

ParameterValuesDescription
resize.edgew, h, largest, smallestWhich edge to target
resize.edge.lengthinteger (pixels)Target length in pixels

scaleFit - Scale fit mode
Link copied!

Specifies how to position the crop area when using sm.

ValueDescription
centerDefault
poiCrop using the point of interest focal point
Full reference and interactive examples

See scaleFit=poi in the poi example.

poi - Point of interest
Link copied!

Defines a focal point for cropping. Format: poi={x},{y},{w},{h} - all values are percentages of the image dimensions.

ComponentDescription
xLeft edge of the focal point as a percentage of image width
yTop edge of the focal point as a percentage of image height
wWidth of the focal point as a percentage of image width
hHeight of the focal point as a percentage of image height
Full reference and interactive examples

See poi

filter - Resize algorithm
Link copied!

The resampling algorithm used when resizing.

ValueDescription
qQuadratic
sSinc
lLanczos (default)
pPoint
cCubic
hHermite
Full reference and interactive examples

See filter

upscale - Upscale behaviour
Link copied!

Controls whether the image can be scaled larger than the original.

ValueDescription
trueAllow upscaling
falseDo not upscale
paddDraw the image, unscaled, on a canvas of the requested size - specify both w and h to define the canvas. Align via sm; set background colour via bg.
Full reference and interactive examples

Cropping and rotation
Link copied!

Crop a region or trim from the edges, before or after resizing, then rotate or flip.

ParameterFormatDescription
crop{x},{y},{w},{h}Cuts a region from the image. Applied after any resize. Accepts px or %.
ecrop{left},{top},{right},{bottom}Crops a specified amount from each edge. Applied after any resize. Accepts px or %.
pcrop{x},{y},{w},{h}Same as crop, but applied before any resize. Coordinates are relative to the original image size.
pecrop{left},{top},{right},{bottom}Same as ecrop, but applied before any resize. Coordinates are relative to the original image size.
rotate{degrees} or {degrees},rgb({r},{g},{b})Rotates the image. Applied after any resize. For angles that aren't a multiple of 90°, the optional rgb value (comma-appended to the angle) colours the exposed corners.
protatedegreesSame as rotate, but applied before any resize.
fliphtrueFlip the image horizontally.
flipvtrueFlip the image vertically.
Full reference and interactive examples

See crop · ecrop · pcrop · pecrop · rotate · protate · flip

Format and quality
Link copied!

Choose the output format, including automatic format selection, and tune compression globally, per format, or from platform defaults.

fmt - Output format
Link copied!

Sets the output format. Defaults to the original format if not specified. Setting the file extension also changes the format.

ValueNotes
jpgJPEG
pngPNG
gifGIF
bmpBMP
webpNot supported in all browsers.
avifRequires Accelerated Media. Images larger than 2.5MP fall back to jpeg (or png if transparency is present). Not supported in all browsers.
jp2Safari for iOS and macOS only
autoReturns the most efficient format supported by the requesting browser. Requires Accelerated Media.
Full reference and examples

See fmt · fmt=auto

qlt - Quality
Link copied!

Sets compression quality as a percentage (0–100). JPEG is lossy; PNG is lossless but zlib-compressed. qlt=default applies the platform default for the output format.

FormatDefault quality
jp240
avif55
webp80
jpeg75
png90

Custom defaults can be set in your account root template or transformation templates.

Full reference and interactive examples

Per-format quality parameters
Link copied!

Sets the compression quality for a specific format. Can be combined with fmt=auto.

ParameterApplies to
fmt.avif.qltAVIF
fmt.webp.qltWebP
fmt.jp2.qltJPEG 2000
fmt.jpeg.qltJPEG
fmt.png.qltPNG

Example:

https://cdn.media.amplience.net/i/ampproduct/women-bright-colors.jpg?fmt=auto&fmt.webp.qlt=50

Other format and output parameters
Link copied!

ParameterValuesDescription
dpiintegerChanges the image resolution. Returns original DPI if omitted.
dpiFilterq, s, l (default), p, cResampling algorithm used when DPI is changed.
striptrue / falseRemoves commands and metadata from the image. Default: false.
fmt.jpeg.interlacedtrue / falseReturns a progressive JPEG - loads a low-quality version first and improves as more data downloads.
fmt.jpeg.chroma2,1,1 / 1,1,1JPEG chroma subsampling. 2,1,1 = enabled (default); 1,1,1 = disabled. Disabling increases file size.
Full reference and examples

PNG-specific parameters
Link copied!

ParameterValuesDescription
fmt.png.indexedtrue / falseUse an indexed colour palette. Default: false.
fmt.png.palettesize1–256Palette size for indexed PNGs. Requires fmt.png.indexed=true. Default: 256.
fmt.png.dithertrue / falseDithering for indexed PNGs. Smooths colour banding but may slightly increase file size. Default: true.

Example:

https://cdn.media.amplience.net/i/ampproduct/woman-checked-skirt-striped-bag?fmt=png&fmt.png.indexed=true&fmt.png.palettesize=256&fmt.png.dither=true

Image adjustments
Link copied!

cs - Colour space
Link copied!

ValueDescription
rgbRGB
rgbaRGBA
srgbsRGB
grayGreyscale
cmykCMYK
ohtaOHTA
labLAB
xyzXYZ
hsbHue, saturation, brightness
hslHue, saturation, lightness
Full reference and interactive examples

See cs

Other adjustment parameters
Link copied!

ParameterFormat / ValuesDescription
unsharp{radius},{sigma},{amount},{threshold}Unsharp mask. radius: 0–5 (0 = auto); sigma: 0.01–5; amount: 1–300%; threshold: 0–255.
cmover (default), colo, dark, diff, light, multi, cout, cover, copyComposite mode when applying image over a background color.
cm=copy-Removes the alpha channel from an image, leaving the color data that was masked by the alpha channel visible. Must be provisioned on your account - contact your Customer Success Manager or Amplience Support.
bgcolor valueCanvas background color. Takes effect with upscale=padd or transparent source images.
blur{radius},{sigma}Gaussian blur. radius: 0–100; sigma: 0–100.
noiser0–5Noise reduction. Higher values remove more noise but smooth away more fine detail.
gammadecimalGamma correction. Below 1.0 darkens; above 1.0 lightens.
hue-100 to 100Shifts the color based on the hue scale.
sat-100 to 100Adjusts color saturation.
bri-100 to 100Adjusts brightness.
Full reference and interactive examples

See unsharp · cm · cm=copy · bg · blur · noiser · gamma · hue, sat, bri

Layers
Link copied!

Layers allow multiple images to be composited together. Layer 0 is the baseImage - additional layers are applied on top using indexed parameters (layer1, layer2, and so on). Parameters for each layer are enclosed in square brackets [].

Example:

https://cdn.media.amplience.net/i/ampproduct/woman-in-blue-spotted-dress?layer1=[src=/i//blue-roundel&top=50%&left=50%]
ParameterFormat / ValuesDescription
srcURL pathImage source for the layer. Starting the path with /i// reuses the account domain from the base URL.
top / left / bottom / rightpx or %Positions a layer relative to the previous layer. Default: top-left corner.
anchorTL TC TR ML MC MR BL BC BRWhich point of the layer aligns to the position coordinates.
opacity0–100Layer transparency. 0 = fully transparent; 100 = fully opaque.
visible0 / 1Controls layer rendering. Default: 1.
canvas{width},{height}Creates a blank canvas. Optionally set background with bg. Default background: white.
Full reference and interactive examples

Text layers
Link copied!

Text can be rendered as a layer on top of an image.

Example:

https://cdn.media.amplience.net/i/ampproduct/women-wearing-denim-small?layer1=[text=New%20denim\nShop%20now&fontSize=48&textColor=white&textAlign=center&fontWeight=400]
ParameterValuesDescription
textstringText string to render. Use \n to insert a line break.
fontSizeinteger (pt)Font size in points. Default: 10.
fontFamilystringFont family. Default: Helvetica. Falls back to Helvetica if the requested font is not installed.
fontStylenormal, italic, obliqueFont style. Follows CSS font-style rules.
fontWeight100–900, normal, boldText weight. normal = 400; bold = 700.
fontStretchultra-condensedultra-expandedWidens or narrows text. Follows CSS font-stretch rules.
textColorhex, rgb(), or named colourColour of the rendered text. Default: black.
textDecorationunderline, overline, linethroughDecoration applied to the text.
textAlignleft, center, rightAlignment within the text layer (applies when text spans multiple lines). Default: left.
Full reference and interactive examples

Metadata
Link copied!

ParameterValuesDescription
metadatatrueReturns all metadata associated with an image. Append .js (JSONP), .json, or .xml to the URL.
metaFiltertype string or *Filters metadata to the specified type. * returns all types. The image block is always included.
Full reference and examples

Metadata tokens - reference image metadata directly within transformation queries:

TokenDescription
{$this.metadata}Metadata from the current layer
{$root.metadata}Metadata from the root layer
{$root.layerX.metadata}Metadata from the root layer. Where multiple layers exist, checks the specific layer you want, for example layer2.
{$parent.metadata}Metadata from the parent layer. Where multiple layers exist, this will always check for the immediate parent.
Full reference and interactive examples

Other image features
Link copied!

img404 - Missing image fallback
Link copied!

Specifies the filename of the fallback image to display when the requested image cannot be found. The fallback must be a published image on the same account. Can be set as a query parameter, in a transformation template, or at the account level.

Full reference and interactive examples

See img404

${variable} - Variables
Link copied!

User-defined variables can be declared in the query string and referenced throughout the query. Variable names are prefixed with $.

Example:

https://cdn.media.amplience.net/i/ampproduct/woman-checked-skirt-striped-bag?imageheight=300&h=$imageheight
Full reference and interactive examples

Conditionals
Link copied!

Evaluates a comparison and returns one of two values.

Format: {($variable==value)?trueValue:falseValue}

Supported operators: ==, >, <, >=, <=, !=

Supported types: number, string (must be assigned to a variable first), boolean

Full reference and interactive examples

Expressions
Link copied!

Mathematical expressions can be included in query values, wrapped in {}. Supports +, -, *, /. Variables can be used within expressions, and percentages are supported (e.g. w={25%}).

Full reference and interactive examples

SEO
Link copied!

SEO-friendly path segments can be appended to image URLs to improve search engine indexing. The SEO text is included in the request path but does not affect the image returned.

https://cdn.media.amplience.net/i/ampproduct/1377455-collection-spring/womens/spring/red-dress
Full reference and examples

Sets
Link copied!

Sets are named groupings of assets. The Set API allows you to retrieve individual elements or full set metadata.

Retrieving set images
Link copied!

EndpointDescription
GET /s/{account}/{setName}Returns the first element as an image. For video sets, the thumbnail is returned. Standard image parameters apply.
GET /s/{account}/{setName}/{n}Returns the nth element as an image. Indexing starts at 1.
GET /s/{account}/{setName}/{n}/{n}Returns the nth element from within a nested set.

Set metadata
Link copied!

Common parameters for all set metadata formats:

ParameterDescription
qualWhether URLs in the response are fully qualified. Default: true.
qryQuery string appended to all set element URLs. Supports transformation template names.
deepWhether nested set structure is included in the response. Default: false.
FormatEndpointAdditional Parameters
JSONPGET /s/{account}/{setName}.jsfunc - callback name; arg - optional argument
JSONGET /s/{account}/{setName}.json-
XMLGET /s/{account}/{setName}.xml-
TextGET /s/{account}/{setName}.txtReturns element URLs in plain text
HTMLGET /s/{account}/{setName}.htmlulCls - CSS class on <ul>; liCls - CSS class on <li>; size - adds width and height attributes to <img> tags when true
Full reference and examples

Video
Link copied!

Video assets are accessed by including the transcode profile name in the URL path.

Format: GET /v/{account}/{videoName}/{profile}

Example:

https://cdn.media.amplience.net/v/ampproduct/ski-collection/mp4_720p?protocol=https

Omitting the profile returns the poster frame (or the first frame if no poster has been set).

Add protocol=https to the video URL to serve over HTTPS. Can also be set in the account root template.

Video thumbnails
Link copied!

100 thumbnails are generated at regular intervals during ingest. Standard image manipulation parameters can be applied.

EndpointDescription
GET /v/{account}/{videoName}Returns the poster frame, or the first generated thumbnail if no poster is set.
GET /v/{account}/{videoName}/thumbs/{frame}Returns a specific thumbnail by frame index (e.g. frame_0020.png).
Full reference and interactive examples

Video metadata
Link copied!

Common parameters for all video metadata formats:

ParameterDescription
qualWhether video URLs in the response are fully qualified. Default: true.
profileReturn metadata for the specified profile only.
FormatEndpointAdditional Parameters
JSONPGET /v/{account}/{videoName}.jsfunc - callback name; arg - optional argument
JSONGET /v/{account}/{videoName}.json-
XMLGET /v/{account}/{videoName}.xml-
TextGET /v/{account}/{videoName}.txt-
SitemapGET /v/{account}/{videoName}.sitemapGenerates a sitemap from video metadata
Full reference and examples

HTML video embeds
Link copied!

Append .html to a video URL to return a complete HTML page with <video> and <source> elements for each transcode profile.

Format: GET /v/{account}/{videoName}.html

ParameterTypeDefaultDescription
preloadauto | metadata | noneautoControls browser preload behaviour
loopbooleanfalseLoops the video continuously
controlsbooleantrueShows player controls
autoplaybooleanfalseStarts playback on page load
resizebooleantrueResizes the video to fit the screen
snippetbooleanfalseReturns only the <video> tag instead of a full HTML page
bitrateinteger-Selects the profile with the closest matching bitrate
widthinteger-Width of the video in pixels
heightinteger-Height of the video in pixels
cssstring-Style attributes applied to the <video> tag
bodyCSSstring-Style attributes applied to the <body> tag
Full reference and interactive examples

Accelerated Media
Link copied!

Accelerated Media is an optional add-on that unlocks the following features:

  • Amplience Smart Images - automatic format selection via fmt=auto
  • AVIF format - next-generation image compression
  • VP9 and HEVC video codecs

To enable Accelerated Media on your account, contact your Account Manager.