Skip to main content

Creating Videos with Generative AI Assets

Enhance your videos by incorporating generative AI assets instead of relying solely on stock footage. Shotstack enables you to create and embed AI-generated audio and image assets directly into your video projects.

Generative AI Assets

Shotstack supports the following AI-generated assets, which can be easily integrated into your videos:

  • Text to Image: Transform text prompts into high-quality images.
  • Text to Speech: Convert and translate text into speech with a variety of voices and languages.

How to Add Generative AI Assets

Integrating generative AI assets into your videos is simple. Specify the type of asset you want to create, adjust the generation settings, and define the clip properties to control exactly when and where the asset appears in your video.

For example, to generate an image using the text-to-image asset:

{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "text-to-image",
"prompt": "Landscape of Sydney harbour in bad weather, Editorial Photography, Aerial View, 32k, Optics",
"width": 1280,
"height": 720
},
"start": 0,
"length": 5
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1280,
"height": 720
}
}
}

Using Multiple AI Assets

You can combine multiple AI assets in a single video. Shotstack will generate the assets according to your specifications and automatically insert them into your video at the designated points.

{
"timeline": {
"tracks": [
{
"clips": [
{
"asset": {
"type": "text-to-speech",
"text": "Good evening, in Sydney tonight we’re tracking a developing story as unexpected storms roll in across the city, bringing with them flash flooding warnings and major disruptions to the evening commute.",
"voice": "Joanna"
},
"start": 0,
"length": "auto"
}
]
},
{
"clips": [
{
"asset": {
"type": "text-to-image",
"prompt": "Landscape of Sydney harbour in bad weather, Editorial Photography, Aerial View, 32k, Optics",
"width": 1280,
"height": 720
},
"start": 0,
"length": "end"
}
]
}
]
},
"output": {
"format": "mp4",
"size": {
"width": 1280,
"height": 720
}
}
}