Image Overlay

API reference for image overlay (watermarking). Can be used with Create Asset POST request.

Image overlay can be used to brand a video or add a visual label in the form of an image. It takes the following parameters embedded in image_overlay.

Parameter

Description

url

This is the required parameter for image overlay, it can be a URL to an image that needs to be overlayed.

horizontal_margin

This parameter defines the horizontal coordinate value of the corner (determined by horizontal_align) of the overlay area. Values can be an absolute number of pixels or a percentage value relative to the video width. Default: 0

vertical_margin

This parameter defines the vertical coordinate value of the corner (determined by vertical_align) of the overlay area. Values can be an absolute number of pixels or a percentage value relative to the video height. Default: 0

horizontal_align

This parameter specifies the horizontal alignment of the overlayed image and can be either left or right. Default: right

vertical_align

This parameter specifies the vertical alignment of the overlayed image and can be either top or bottom. Default: bottom

width

Width of the overlayed image. Default: image width

height

Height of the overlayed image. Default: image height

cURL
image overlay
original
cURL
curl -L -X POST 'https://api.gumlet.com/v1/video/process' \
-H 'Authorization: Bearer <YOUR API KEY>' \
-H 'Content-Type: application/json' \
-d '{
"input":"https://gumlet.sgp1.digitaloceanspaces.com/video/sample_2.mp4",
"source_id": "5f462c1561cf8a766464ffc4",
"format": "mp4",
"image_overlay": {
"url": "https://assets.gumlet.io/assets/logo.svg?format=png",
"height": "10%",
"width": "10%",
"horizontal_align": "left",
"horizontal_margin": "5%",
"vertical_align": "top",
"vertical_margin": "5%"
}
}'
image overlay
original