Add text to videos with timestamps: 00:00:01 - Hello; 00:00:05 - World
One POST request. Get the result back directly — as an image, video, or JSON depending on the tool.
curl -X POST https://apiai.me/api/workflow/text-on-video \
-H "X-API-Key: YOUR_API_KEY" \
-F "animation=none" \
-F "bordercolor=black" \
-F "borderw=2" \
-F "box=0" \
-F "boxborderw=10" \
-F "boxcolor=black@0.5" \
-F "crf=23" \
-F "fade_in=0" \
-F "fade_out=0" \
-F "font=modern" \
-F "fontcolor=white" \
-F "fontsize=48" \
-F "line_spacing=0" \
-F "margin=40" \
-F "max_width=0" \
-F "position=bottom-center" \
-F "preset=medium" \
-F "prompt=VALUE" \
-F "scroll_speed=50" \
-F "shadowcolor=black@0.6" \
-F "shadowx=0" \
-F "shadowy=0" \
-F "typewriter_speed=0.3"
--output result.png
Test this tool visually before writing any code. Upload an image, set parameters, and see the result live. When it looks right, copy the auto-generated curl command and paste it into your app.
Process hundreds of images at once without writing a loop. Upload a CSV with one row per item, set your parameters, and download the results as a ZIP when they're done.
| Name | Required | Description | Default / Options |
|---|---|---|---|
animation |
optional | Text animation: none (static), scroll-up/down/left/right, or typewriter (word-by-word reveal) | nonescroll-upscroll-downscroll-leftscroll-righttypewriter
|
bordercolor |
optional | Outline colour name or hex | black
|
borderw |
optional | Text outline thickness in pixels (0 = no outline) | 2
|
box |
optional | Show a background box behind the text | 01
|
boxborderw |
optional | Padding inside the background box in pixels | 10
|
boxcolor |
optional | Background box colour with opacity (e.g. black@0.5) | black@0.5
|
crf |
optional | Video quality 0-51: lower = better quality but larger file | 23
|
fade_in |
optional | Seconds to fade text in (0 = instant appear) | 0
|
fade_out |
optional | Seconds to fade text out (0 = instant disappear) | 0
|
font |
optional | Font style preset | modernclassictypewriterstrongelegantliteratureneoncomicpostersignatureeditorbubbledecosqueezesanssans-boldserifserif-boldmonomono-bold
|
fontcolor |
optional | Text colour name or hex (e.g. white, red, #FF8800) | white
|
fontsize |
optional | Font size in pixels | 48
|
line_spacing |
optional | Extra spacing between lines in pixels | 0
|
margin |
optional | Distance from the edge in pixels | 40
|
max_width |
optional | Max characters per line for auto-wrapping (0 = no wrap) | 0
|
position |
optional | Where the text appears on screen | bottom-centerbottom-leftbottom-righttop-centertop-lefttop-rightcenter-leftcentercenter-right
|
preset |
optional | Encoding speed: faster encodes quicker but larger file | ultrafastsuperfastveryfastfasterfastmediumslowslowerveryslow
|
prompt |
required | Text to burn onto the video. Plain text shows for the full duration. For timed entries use semicolons: 00:00:01 - Hello; 00:00:05 - World | — |
scroll_speed |
optional | Scroll speed in pixels per second (scroll animations only) | 50
|
shadowcolor |
optional | Shadow colour with optional opacity (e.g. black@0.6) | black@0.6
|
shadowx |
optional | Drop-shadow horizontal offset in pixels (0 = no shadow) | 0
|
shadowy |
optional | Drop-shadow vertical offset in pixels (0 = no shadow) | 0
|
typewriter_speed |
optional | Seconds between each word appearing (typewriter animation only) | 0.3
|
Get an API key, test Video Captions in the dashboard, and copy the curl command.