Skip to main content

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.

ParameterDescription
urlThis is the required parameter for image overlay, it can be a URL to an image that needs to be overlayed.
horizontal_marginThis 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_marginThis 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_alignThis parameter specifies the horizontal alignment of the overlayed image and can be either left or right. Default: right
vertical_alignThis parameter specifies the vertical alignment of the overlayed image and can be either top or bottom. Default: bottom
widthWidth of the overlayed image. Default: image width
heightHeight of the overlayed image. Default: image height
curl -L -X POST 'https://api.gumlet.com/v1/video/assets' \-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%"    }}'