Hello World: text and a soundtrack
{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "rich-text",
"text": "HELLO WORLD",
"font": {
"family": "Montserrat",
"color": "#ffffff",
"size": 32
},
"align": {
"horizontal": "left"
}
},
"start": 0,
"length": 5,
"transition": {
"in": "fade",
"out": "fade"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "audio",
"src": "https://s3-ap-southeast-2.amazonaws.com/shotstack-assets/music/moment.mp3",
"effect": "fadeOut"
},
"start": 0,
"length": "end"
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1024,
"height": 576
}
}
} Hello World using curl , read on Nov 7, 2026.
{
"inputs": {
"music": "https://example.com/moment.mp3"
},
"outputs": [
{
"type": "video",
"filename": "hello.mp4",
"resize": {
"width": 1024,
"height": 576
},
"audio": {
"input": "music"
},
"concat": [
{
"color": "black",
"duration": 5,
"text": [
{
"text": "HELLO WORLD",
"font": "montserrat",
"size": 32,
"position": "left",
"end": 5,
"fade": {
"in": 0.5,
"out": 0.5
}
}
]
}
]
}
]
} curl "$VIDEXO_API_URL/v1/jobs" \
-H "Authorization: Bearer $VIDEXO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": {
"music": "https://example.com/moment.mp3"
},
"outputs": [
{
"type": "video",
"filename": "hello.mp4",
"resize": {
"width": 1024,
"height": 576
},
"audio": {
"input": "music"
},
"concat": [
{
"color": "black",
"duration": 5,
"text": [
{
"text": "HELLO WORLD",
"font": "montserrat",
"size": 32,
"position": "left",
"end": 5,
"fade": {
"in": 0.5,
"out": 0.5
}
}
]
}
]
}
]
}' const response = await fetch(`${process.env.VIDEXO_API_URL}/v1/jobs`, {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.VIDEXO_API_KEY}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
"inputs": {
"music": "https://example.com/moment.mp3"
},
"outputs": [
{
"type": "video",
"filename": "hello.mp4",
"resize": {
"width": 1024,
"height": 576
},
"audio": {
"input": "music"
},
"concat": [
{
"color": "black",
"duration": 5,
"text": [
{
"text": "HELLO WORLD",
"font": "montserrat",
"size": 32,
"position": "left",
"end": 5,
"fade": {
"in": 0.5,
"out": 0.5
}
}
]
}
]
}
]
}),
});
const job = await response.json(); ffmpeg \
-f lavfi -i color=c=0x000000:s=1024x576:r=30:d=5 \
-i https://example.com/moment.mp3 \
-filter_complex "[0:v]trim=end_frame=150,drawtext=expansion=none:fontfile=/opt/videxo/fonts/Montserrat-Regular.ttf:text=HELLO WORLD:fontsize=32:fontcolor=0xFFFFFF:x=48:y=(h-40)/2:y_align=font:enable='lte(t,5)':alpha='clip(min(t/0.5,(5-t)/0.5),0,1)'[o0c0v];[o0c0v]concat=n=1:v=1:a=0[o0cv]" \
-map "[o0cv]" \
-c:v libx264 -preset veryfast -crf 23 -pix_fmt yuv420p \
-map 1:a:0 \
-af apad \
-c:a aac -b:a 128k -shortest -movflags +faststart \
hello.mp4 POST /v1/jobs makes hello.mp4: 5 seconds at 1024 by 576, the text at the left on black, fading in and out, over the music.
- There are no tracks: the sound goes on the output, the picture in its parts.
- A soundtrack has no
fadeOutof its own;fadeon an output fades picture and sound together. - A Videxo job always reads at least one file, here the music. A video with no input at all is refused.