Generate a video
generate_videoGenerate a video from a prompt, animate an existing image asset with referenceAssetId, or put the people, products and places of up to 5 pictures into a new shot with references (load builtin-generative-video first). Duration is 4–15 seconds. The video comes with its own sound (generateAudio null or true) unless generateAudio is false. Standard settings: 5 seconds, 16:9, 720p, standard quality, with sound. quality picks how it is made: standard (null) for B-roll and most shots; high for a hero shot, made 5 to 15 seconds long and always with its own sound; highest only when the person asks for the best quality. A video with references is made at high, whatever quality you pick. A request a quality cannot make, such as a silent video at high, runs at the next quality up and is charged at it. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. Uses credits for each second: standard about 11 credits a second at 720p and about 7.6 credits a second at 480p; high about 23 credits a second at 720p and about 19 credits a second at 480p; highest about 80 credits a second at 720p and about 36 credits a second at 480p. So a 5-second 720p video uses 57 credits at standard, 114 at high and 399 at highest. Tell the person this estimate for the quality and length you picked before you generate. A credit refusal says what the video needs and how many credits are left: retry only with a duration, resolution or quality that fits, and never substitute another media kind.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Up to 2000 characters. | |
| quality | Yes | standard (null) for B-roll and most shots, high for a hero shot, highest only when the person asks for the best quality. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| references | Yes | Up to 5 pictures of the people, products, places or look to keep in the video, in this order, or null for none. Each one is: asset:ID, an image asset; asset:ID#t=14.6, the frame of a video asset at 14.6 seconds; film:#t=3.2, the frame of the edit at 3.2 seconds. In the prompt call them Image 1 to Image 5 by their order: "Image 1 is the woman, Image 2 is her sneaker. She laces up the sneaker on a rooftop at sunset." Not with referenceAssetId: to open on a picture, put it here and say so in the prompt. | |
| resolution | Yes | ||
| aspectRatio | Yes | ||
| generateAudio | Yes | Whether the video has its own sound, made with the picture: dialogue, sound effects, ambience and music that match what happens. null or true (the default) makes sound. false makes the video silent: only when the person asks for a silent video. To keep a clip quiet under narration or music, keep its sound and set the clip's volume in the film instead: a silent video cannot get sound back. | |
| durationSeconds | Yes | ||
| referenceAssetId | Yes | Image asset id from search_assets to animate into the video, or null to generate from the prompt alone. |