Skip to main content

Text Overlay

API reference for text overlay. Can be used with Create Asset POST request.

Text overlay can be used to brand a video or add a label in the form of text. It takes the following parameters embedded in text_overlay.

ParameterDescription
textThis is the required parameter for text overlay. It can take the text in form of a string.
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
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
colorFont color for text. Default: black
fontFont family type for text. Default: sans
font_sizeFont size in pixels. Default: 16
opacityOverlay text opacity can be specified with opacity parameter where value can be between 0 and 100 where 0 is considered completely transparent and 100 is considered completely opaque. Default: 100
boxThis parameter allows rectangular drawing a box over the overlayed text. Values can be true or false. Default: false
box_colorBox color can be specified with this parameter. Default: white
box_opacityBox opacity can be specified with this parameter. Default: 100
box_borderPadding between the box border and the text can be specified with this parameter in pixels. Default: 0
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_1.mp4",    "source_id": "5f462c1561cf8a766464ffc4",    "format": "mp4",    "text_overlay": {        "text": "Gumlet",        "horizontal_margin": "10%",        "vertical_margin": "10%",        "vertical_align": "top",        "horizontal_align": "left",        "color": "black",        "font_size": "45",        "box": true,        "box_color": "white",        "box_border": "10"    }}'