Seedance 2.5 Flash
Seedance 2.5 Flash is a lower-cost variant of Seedance 2.5 for joint audio-video generation. It generates video from text, image, video, and audio references, and supports video editing, video extension, and first-and-last-frame control, producing 4 to 30 second clips at 480p or 720p and 24 fps. Your use is subject to ByteDance's Terms & Privacy Policies.
View API reference- Output price
- Output $7, Per 1M generated tokens
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'bytedance/seedance-2.5-flash', prompt: 'A serene mountain lake at sunrise.'});Copy link to headingPlayground
Try out Seedance 2.5 Flash by ByteDance. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated video will appear here.
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Getting started
Generate videos with Seedance 2.5 Flash 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.
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.5-flash', 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.
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.5-flash', 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);| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | No | Text description of the video to generate. |
duration | number | No | Video length in seconds. 4-30 seconds. |
resolution | string | No | Resolution ('854x480', '1280x720'). |
aspectRatio | string | No | Aspect ratio ('16:9', '4:3', '1:1', '3:4', '9:16', '21:9'). |
generateAudio | boolean | No | Generate synchronized audio with the video. |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| Image | jpeg, png, webp, bmp, tiff, gif, heic, heif | url | 10 | 30 MB | ≥300px · ≤6000px · aspect 2:5–5:2 |
| Video | mp4, mov | url | 5 | 200 MB | 2-30s · ≥300px · ≤6000px |
| Audio | mp3, wav | url | — | 15 MB | 2-30s |
Provider options
Pass provider-specific options under providerOptions.bytedance.
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.5-flash', 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
providerOptions.bytedance.pollIntervalMs | number | No | How often to check task status. Defaults to 5000. |
providerOptions.bytedance.pollTimeoutMs | number | No | Maximum wait time. Defaults to 600000 (10 minutes). |