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.

Parameter

Description

text

This is the required parameter for text overlay. It can take the text in form of a string.

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

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

color

Font color for text. Default: black

font

Font family type for text. Default: sans

font_size

Font size in pixels. Default: 16

opacity

Overlay 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

box

This parameter allows rectangular drawing a box over the overlayed text. Values can be true or false. Default: false

box_color

Box color can be specified with this parameter. Default: white

box_opacity

Box opacity can be specified with this parameter. Default: 100

box_border

Padding between the box border and the text can be specified with this parameter in pixels. Default: 0

cURL
text 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_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"
}
}'
text overlay
original