Generate Advertisements 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 advertisements.

GET STARTED FOR FREE

The only thing you need is some JSON

{
"timeline": {
"background": "#1c1c1c",
"soundtrack": {
"src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/templates/advertisement/funny-pets.mp3",
"effect": "fadeOut"
},
"fonts": [
{
"src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/fonts/SecularOne-Regular.ttf"
}
],
"tracks": [
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/templates/advertisement/petstore-logo.png"
},
"start": 0.5,
"length": 2.5,
"fit": "none",
"transition": {
"in": "fade",
"out": "fade"
},
"position": "center"
},
{
"asset": {
"type": "image",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/templates/advertisement/petfood1.png"
},
"start": 3,
"length": 5,
"fit": "none",
"transition": {
"in": "fade",
"out": "fade"
},
"position": "left"
},
{
"asset": {
"type": "html",
"html": "<p>BULLY STICKS</p>",
"css": "p {font-family: \"Secular One\"; color: #FFFFFF; font-size: 75px; font-weight: 600; text-align: left;}",
"width": 600,
"height": 150
},
"start": 4,
"length": 4,
"offset": {
"x": 0.18,
"y": 0.26
},
"transition": {
"in": "carouselLeft",
"out": "fade"
}
},
{
"asset": {
"type": "html",
"html": "<p>Nutriyum bully sticks contains reduced calories to help your dog achieve and maintain a healthy weight, as well as higher levels of fibre to promote feelings of fullness between meals.</p>",
"css": "p {font-family: \"Secular One\"; color: #FFFFFF; font-size: 24px; font-weight: 600; text-align: left;}",
"width": 600,
"height": 250
},
"start": 4.2,
"length": 3.8,
"offset": {
"x": 0.18,
"y": 0
},
"transition": {
"in": "carouselLeft",
"out": "fade"
}
},
{
"asset": {
"type": "html",
"html": "<p>$19.99</p>",
"css": "p {font-family: \"Secular One\"; color: #FFFFFF; font-size: 60px; font-weight: 600; text-align: left;}",
"width": 600,
"height": 100
},
"start": 4.4,
"length": 3.6,
"offset": {
"x": 0.18,
"y": -0.25
},
"transition": {
"in": "carouselLeft",
"out": "fade"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://shotstack-assets.s3.ap-southeast-2.amazonaws.com/templates/advertisement/petfood2.png"
},
"start": 8,
"length": 4,
"fit": "none",
"transition": {
"in": "fade"
},
"position": "right"
},
{
"asset": {
"type": "html",
"html": "<p>DENTAL STICKS</p>",
"css": "p {font-family: \"Secular One\"; color: #FFFFFF; font-size: 75px; font-weight: 600; text-align: left;}",
"width": 600,
"height": 150
},
"start": 8,
"length": 4,
"offset": {
"x": -0.18,
"y": 0.26
},
"transition": {
"in": "carouselRight"
}
},
{
"asset": {
"type": "html",
"html": "<p>Nutriyum Dental Sticks are delicious chew treats that contain RF2, an ingredient that fights against plaque, dental tartar, and bad breath in pets.</p>",
"css": "p {font-family: \"Secular One\"; color: #FFFFFF; font-size: 24px; font-weight: 600; text-align: left;}",
"width": 600,
"height": 250
},
"start": 8.2,
"length": 3.8,
"offset": {
"x": -0.18,
"y": 0
},
"transition": {
"in": "carouselRight"
}
},
{
"asset": {
"type": "html",
"html": "<p>$25.00</p>",
"css": "p {font-family: \"Secular One\"; color: #FFFFFF; font-size: 60px; font-weight: 600; text-align: left;}",
"width": 600,
"height": 100
},
"start": 8.4,
"length": 3.6,
"offset": {
"x": -0.18,
"y": -0.25
},
"transition": {
"in": "carouselRight"
}
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/templates/advertisement/template.mp4"
},
"start": 0,
"length": 12
}
]
}
]
},
"output": {
"format": "mp4",
"resolution": "hd"
}
}

Tutorials & Resources

Learn how to automatically generate advertisements via API

Demo's & Code Examples

Automatically Generate advertisements 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

Watermark Video
Watermark Video

Add a watermark to a video using the Shotstack API. This free demo lets you upload a video and add a watermark

Go to demo