Skip to content
Dashboard

Seedance 2.0 Fast

Seedance 2.0 Fast prioritizes generation speed and lower cost while retaining Seedance 2.0's multimodal inputs, synchronized audio, professional camera movements, and in-video text rendering. Your use is subject to ByteDance's Terms & Privacy Policies.

Vision (Image)Video Gentext-to-videoimage-to-videoreference-to-video
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({
model: 'bytedance/seedance-2.0-fast',
prompt: 'A serene mountain lake at sunrise.'
});
Read docs

Getting started

Generate videos with Seedance 2.0 Fast using the experimental_generateVideo function from AI SDK 6 or later. AI Gateway handles routing and polls until the video is ready.

Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video generation quickstart.

index.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bytedance/seedance-2.0-fast',
prompt: 'A chicken flying into the sunset in the style of 90s anime',
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Top-level parameters

Exercise the supported top-level params: prompt, aspectRatio, resolution, and duration.

seedance-text-to-video.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bytedance/seedance-2.0-fast',
prompt: 'A chicken flying into the sunset in the style of 90s anime',
aspectRatio: '16:9',
resolution: '1280x720',
duration: 5,
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);
ParameterTypeRequiredDescription
promptstringNoText description of the video to generate.
durationnumberNoVideo length in seconds. 4-15 seconds.
resolutionstringNoResolution ('854x480', '1280x720').
aspectRatiostringNoAspect ratio ('16:9', '4:3', '1:1', '3:4', '9:16', '21:9').
generateAudiobooleanNoGenerate synchronized audio with the video.
frameImagesArray<{ image: string; frameType: 'first_frame' | 'last_frame' }>NoOpening frame of the clip, as a single first_frame entry. Replaces prompt.image and wins when both are set. Seedance accepts image URLs only, so host local files on Vercel Blob first.
inputReferencesArray<{ data: string; mediaType: string }>NoReference images and videos, referenced in the prompt as [Image 1], [Video 1], and so on, numbered separately in the order you pass them. Tag every URL with an explicit mediaType — an untyped URL is treated as an image and emits a warning. See the Input limits table for supported counts.

Input limits

InputFormatsSourcesMax countMax sizeLimits
Imagejpeg, png, webp, bmp, tiff, gifurl930 MB≥300px · ≤6000px · aspect 2:5–5:2
Videomp4, movurl350 MB2-15s · ≥300px · ≤6000px
Audiowav, mp3url15 MB2-15s

Provider options (bytedance)

Load the compatible Seedance options under providerOptions.bytedance. Frames and references are passed at the top level through frameImages and inputReferences, which change the call shape and are shown in their own examples below.

seedance-provider-options.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bytedance/seedance-2.0-fast',
prompt: 'A chicken flying into the sunset in the style of 90s anime',
resolution: '1280x720',
duration: 5,
providerOptions: {
bytedance: {
seed: 42,
pollIntervalMs: 5000,
pollTimeoutMs: 600000,
},
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);

Pass these Seedance-specific options under providerOptions.bytedance in your generateVideo call.

ParameterTypeRequiredDescription
referenceImagesstring[]No1-9 reference image URLs for reference-to-video, referenced in the prompt as [Image 1], [Image 2], and so on. Legacy alternative to the top-level inputReferences, used only when inputReferences is omitted.
referenceVideosstring[]NoReference video URLs for reference-to-video, numbered separately from the images and referenced in the prompt as [Video 1], [Video 2], and so on. Legacy alternative to the top-level inputReferences, used only when inputReferences is omitted.
referenceAudiostring[]NoReference audio URLs, sent alongside the reference images and videos to drive the generated audio.
seednumberNoFix the random seed for reproducible output.
pollIntervalMsnumberNoHow often to check task status. Defaults to 3000.
pollTimeoutMsnumberNoMaximum wait time. Defaults to 300000 (5 minutes).

Frames take priority over references

Frames and references are mutually exclusive. When frameImages is set, inputReferences and the legacy providerOptions.bytedance.referenceImages / referenceVideos are dropped with a warning.

The top-level parameters win over their provider-option equivalents: frameImages overrides prompt.image and lastFrameImage, and inputReferences overrides referenceImages and referenceVideos. Set one or the other, not both.

providerOptions.bytedance.referenceAudio has no top-level equivalent, so it stays a provider option and is sent alongside whichever reference path you use.

Reference-to-video

Pass reference media through the top-level inputReferences so the model keeps subjects, style, and composition consistent — see the Input limits table for the supported counts. Reference each one in the prompt with [Image 1], [Video 1], and so on; images and videos are numbered separately in the order you pass them. Tag every URL with an explicit mediaType, since Seedance cannot infer image or video from a bare URL.

seedance-reference-to-video.ts
import { experimental_generateVideo as generateVideo } from 'ai';
import fs from 'node:fs';
import 'dotenv/config';
async function main() {
const result = await generateVideo({
model: 'bytedance/seedance-2.0-fast',
prompt:
'A boy from [Image 1] walking a corgi from [Image 2] through the park at sunset, cinematic',
aspectRatio: '16:9',
resolution: '1280x720',
duration: 5,
generateAudio: true,
inputReferences: [
{ data: 'https://example.com/boy.png', mediaType: 'image/png' },
{ data: 'https://example.com/corgi.png', mediaType: 'image/png' },
],
providerOptions: {
bytedance: {
pollTimeoutMs: 600000,
},
},
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);