Generate Personalized Videos Via API

Build automated image and video editing workflows and applications with Shotstack.

GET STARTED FOR FREE Example

The internet's most advanced image and video editing API

Shotstack is the most user friendly, powerful and reliable infrastructure solution to automatically generate personalized videos.

GET STARTED FOR FREE

The only thing you need is some JSON

{
"timeline": {
"soundtrack": {
"src": "https://cdn.pixabay.com/audio/2022/02/21/audio_4e7e25d719.mp3",
"effect": "fadeOut"
},
"background": "#000000",
"tracks": [
{
"clips": [
{
"asset": {
"type": "html",
"html": "<p data-html-type='text'>Happy Birthday</p>",
"css": "p { color: #9c1111; font-size: 110px; font-family: Arapey; text-align: center }",
"width": 729,
"height": 180
},
"fit": "none",
"scale": 1,
"offset": {
"x": 0.026,
"y": 0.234
},
"position": "center",
"start": 1,
"length": 4,
"effect": "zoomInSlow",
"transition": {
"in": "wipeRight",
"out": "wipeLeft"
}
},
{
"asset": {
"type": "html",
"html": "<p data-html-type='text'>Heres a small gift from us to celebrate your special day</p>",
"css": "p { color: #9c1111; font-size: 55px; font-family: Arapey; text-align: left }",
"width": 695,
"height": 180
},
"fit": "none",
"scale": 1,
"offset": {
"x": -0.096,
"y": 0.264
},
"position": "center",
"length": 7,
"start": 5,
"transition": {
"in": "slideRight",
"out": "slideLeft"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "html",
"html": "<p data-html-type='text'>{Customers Name}</p>",
"css": "p { color: #880c0c; font-size: 95px; font-family: Sue Ellen Francisco; text-align: center }",
"width": 782,
"height": 180
},
"fit": "none",
"scale": 1,
"offset": {
"x": 0.023,
"y": 0.052
},
"position": "center",
"start": 1.5,
"length": 3.5,
"effect": "zoomInSlow",
"transition": {
"in": "wipeRight",
"out": "wipeLeft"
}
},
{
"asset": {
"type": "html",
"html": "<p data-html-type='text'>50% OFF</p>",
"css": "p { color: #880c0c; font-size: 140px; font-family: Roboto Black; text-align: center }"
},
"start": 5.5,
"length": 6.5,
"fit": "none",
"scale": 1,
"offset": {
"x": -0.157,
"y": 0.028
},
"position": "center",
"transition": {
"in": "wipeRight",
"out": "wipeLeft"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "html",
"html": "<p data-html-type='text'>With love from {Your Company}</p>",
"css": "p { color: #3c3436; font-size: 35px; font-family: Arapey; text-align: center }"
},
"fit": "none",
"scale": 1,
"offset": {
"x": 0.018,
"y": -0.075
},
"length": 3.25,
"transition": {
"in": "reveal",
"out": "reveal"
},
"position": "center",
"effect": "zoomInSlow",
"start": 1.75
},
{
"asset": {
"type": "html",
"html": "<p data-html-type='text'>on your next purchase. Use {Special-Code} at checkout</p>",
"css": "p { color: #424242; font-size: 40px; font-family: Arapey; text-align: left }",
"width": 575,
"height": 180
},
"start": 5.5,
"fit": "none",
"scale": 1,
"offset": {
"x": -0.139,
"y": -0.141
},
"position": "center",
"length": 6.5,
"transition": {
"in": "wipeRight",
"out": "wipeLeft"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://static.vecteezy.com/system/resources/previews/001/198/620/original/gift-png.png"
},
"start": 6,
"length": 6,
"offset": {
"x": 0.275,
"y": 0.016
},
"position": "center",
"scale": 0.354,
"fit": "crop",
"transition": {
"in": "slideLeft",
"out": "slideRight"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://img.freepik.com/free-vector/minimalist-background-with-leaves_23-2148909131.jpg?w=1380&t=st=1662962859~exp=1662963459~hmac=da87b0769077be2be229176b9c80b4d34ea43ddb42a5f884061ba7f1a5ee00c7",
"trim": 0
},
"start": 0,
"transition": {
"out": "fade",
"in": "fade"
},
"length": 12,
"scale": 1.5,
"fit": "cover"
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1280,
"height": 720
}
}
}

Tutorials & Resources

Learn how to automatically generate personalized videos via API

Demo's & Code Examples

Automatically Generate personalized videos by using demo code

Pexels Video Maker
Pexels Video Maker

Search the Pexels stock footage video library and the Shotstack API will automatically compile an edit with music and a title

Go to demo

Christmas Personalised Video
Christmas Personalised Video

Create a personalised video with a Christmas message using the Shotstack API. Merge text and video from a form to generate a video

Go to demo