Skip to content
Dashboard

Seedance 2.0 Mini

Seedance 2.0 Mini is a cost-effective multimodal video creation model, retaining the core functions and advantages of Seedance 2.0 at a lower price. 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-mini',
prompt: 'A serene mountain lake at sunrise.'
});
Read docs

Getting started

Generate videos with Seedance 2.0 Mini 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-mini',
prompt: 'A drone shot of a coastal cliff with crashing waves at golden hour.',
});
// 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

Load the common, top-level parameters supported across video models.

top-level-params.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-mini',
prompt: 'A drone shot of a coastal cliff with crashing waves at golden hour.',
duration: 5,
aspectRatio: '16:9',
resolution: '1280x720',
});
// Save the generated video
fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');
}
main().catch(console.error);
ParameterTypeRequiredDescription
promptstringYesText description of the video to generate.
durationnumberNoVideo length in seconds.
aspectRatiostringNoAspect ratio, e.g. 16:9.
resolutionstringNoOutput resolution as {width}x{height}.

Provider options

Pass provider-specific options under providerOptions.bytedance.

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-mini',
prompt: 'A drone shot of a coastal cliff with crashing waves at golden hour.',
duration: 5,
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);

Pass these under providerOptions.bytedance in your generateVideo call.

ParameterTypeRequiredDescription
providerOptions.bytedance.pollIntervalMsnumberNoHow often to check task status. Defaults to 5000.
providerOptions.bytedance.pollTimeoutMsnumberNoMaximum wait time. Defaults to 600000 (10 minutes).