Skip to main content

Generating AI images, video, speech and music

P
Written by Peace Aisosa

You can generate images, video, speech and music with AI, either in Studio or through the API. Generated clips go straight into your edit like any other asset.
​

In Studio

  1. Open your template in Studio and click the AI icon in the toolbar. The Add AI clip panel opens.

  2. Choose what to create: Image, Video, Speech or Music.

  3. Choose a Model. Each one shows a short description, so you can pick the right fit.

  4. Set the options, such as resolution, aspect ratio or voice.

  5. Write your Prompt. For speech, type the words in Text to speak.

  6. Set the Clip length in seconds.

  7. Click Add and generate. The button shows the estimated cost in credits before you generate.

If you're not ready to generate yet, click Add draft instead. Drafts are free, and you're only charged when you generate or render. To generate a draft later, select it in the timeline, check the settings, and generate.
​


​

Through the API

Add an AI asset to your timeline by giving it a prompt and a model. It's generated when your video renders.
For example:

{  "asset": {    "type": "image",    "prompt": "A product shot of a ceramic mug on a marble table",    "model": "nano-banana-2",    "options": { "resolution": "1K", "aspectRatio": "16:9" }  },  "start": 0,  "length": 5}

Use "type": "video", "type": "audio" for speech or music, or "type": "image", with a model from the list below. To see every model and its options, call GET /models. For full examples, see the AI generation guide in our docs.
​

Always set the model. If you leave model out, the default for that type is used. An audio prompt with no model is read aloud as speech, so music needs "model": "elevenlabs-music". Animating an image needs an image-to-video model, with the image URL in options.startSrc.
​

Generating an asset on its own

You can also generate a single asset without rendering a video. POST the asset to the generate endpoint, for example https://api.shotstack.io/edit/stage/generate, written exactly as it would be inside a clip:

{  "asset": {    "type": "image",    "prompt": "A lighthouse on a rocky coast at sunset, cinematic lighting",    "model": "nano-banana-2"  }}

You get back an id. Poll GET /generate/{id} until the status is done, and the response includes a permanent URL to the file. For video and music, add length next to asset to set the duration in seconds. Use this to check an asset before you render, to reuse it across many edits, or to use it outside Shotstack.
​

You never pay twice for the same asset

Every generated file is stored on your account. If you ask for exactly the same asset again (same type, model, prompt, options and, for video and music, length), the stored file is reused and nothing is charged. This works across renders and the generate endpoint. To get a different result, change the prompt, or set a different seed on a model that accepts one.
​

Sandbox and production keep separate stores, so an asset made in the sandbox is generated and charged again the first time production asks for it. To carry one across, generate it once with the generate endpoint and use the returned URL as the src of an asset with no prompt.


Generated files are listed under My Generations in your dashboard, where you can preview them, copy the URL or delete them. A deleted file is gone for good, and the next request for the same asset generates and charges again.
​

Older AI asset types

The text-to-image, text-to-speech and image-to-video asset types are deprecated. Edits that use them keep working, because Shotstack converts them automatically, but use the image, audio and video asset types with a prompt and model for new work. The video models behind the old image-to-video asset are deprecated too, so move those edits to a current video model.
​

Available models

Type

Models

Image

Nano Banana 2, Nano Banana 2 Edit, Nano Banana Pro, GPT Image 2.5 (Sunburst), GPT Image 2.5 Edit (Sunburst), FLUX Schnell

Video

Seedance 2.0 and 2.5, Wan 3.0 Prime, Gemini Omni Flash 1.1, each in text-to-video and image-to-video

Speech

ElevenLabs Turbo v2.5, ElevenLabs Multilingual v2, MiniMax Speech 2.8 HD, Amazon Polly Neural

Music

ElevenLabs Music

Image-to-video and end frames are available through the API and Director, but not yet in Studio.

For what each model costs, see Understanding Shotstack credit consumption.
If AI isn't available on your account, see Why can't I use AI generation?

Did this answer your question?