Seedance 2.5 Flash Video Generation
Generate up to 30 seconds of 480p / 720p video from text, multimodal references, editing, extension, or first and last frames.
All documentation/v1/videos/generationsSubmit with POST /v1/videos/generations, read data[0].task_id, then poll GET /v1/tasks/{task_id}.
Authorization string required
Use Authorization: Bearer <token>, where <token> is your Openrouter API key.
Request examples
curl --request POST \
--url https://openrouterapi.ru/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedance-2-5-flash",
"prompt": "A cinematic shot of a fox walking through a sunlit forest, with a slow tracking camera",
"resolution": "720p",
"size": "16:9",
"duration": 8,
"generate_audio": true,
"nsfw_check": true,
"return_last_frame": true
}'Request parameters
modelstringrequiredUse seedance-2-5-flash. The alias doubao-seedance-2-5-flash is also accepted. The dotted name seedance-2.5-flash is not supported.
nsfw_checkbooleandefault: falseWhether to run content moderation before submitting the video task.
true: useomni-moderation-latestto review prompts and input imagesfalseor omitted: do not send a moderation request, adding no moderation cost or latency (default)
A match returns HTTP 400 (nsfw_content_detected) without creating a task or charging for generation. Reference video/audio are not reviewed. Requests may proceed if the moderation service fails.
promptstringrequiredRequired prompt. Refer to media with @图片1 / @视频1 / @音频1; indices start at 1 and follow the order within each media array.
resolutionstringdefault: 720pOnly 480p / 720p; default 720p. Values such as 1080p, 2k, or 4k return HTTP 400 at submission.
sizestringdefault: adaptiveAccepts 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, and adaptive (default). Alias: aspect_ratio. First/last-frame, edit, and extend tasks require adaptive.
durationintegerInteger seconds 4–30; ordinary requests default to 5. Use -1 for automatic duration. Explicit edit only accepts -1 or omission; omission becomes -1 and output duration follows the source. Automatic duration reserves 30 seconds, then settles on actual token usage.
generate_audiobooleandefault: trueGenerate audio; defaults to true. Alias: audio. This controls output sound, separately from reference input audio_urls.
watermarkbooleandefault: falseAdd an AI-generated watermark; default false.
seedintegerOptional random seed. Reusing a seed does not guarantee identical output.
output_formatstringdefault: mp4Output container: mp4 (default) or mov.
omni_reference_task_typestringdefault: autoAccepts auto (default), reference, edit, or extend; only for requests with reference media. Explicit types trigger submission-time checks described below.
image_urlsstring[]Reference image array, all treated as reference_image. At most 10 images combined with image_with_roles. Use image_with_roles for first and last frames.
image_with_rolesobject[]Each item has url and role. Roles: reference_image, first_frame (at most 1), or last_frame (at most 1, paired with a first frame). At most 10 images combined with image_urls; avoid conflicting roles. When video_urls / audio_urls are present, first/last frames become reference images for the multimodal task.
video_urlsstring[]At most 5 reference videos, 2–30 seconds each and at most 30 seconds combined. Source videos for editing must be 4–30 seconds.
audio_urlsstring[]At most 5 audio references, 2–30 seconds each and at most 30 seconds combined. Audio-only reference is supported; images or videos are not required.
return_last_framebooleandefault: falseSet true to return a last-frame image after success at data.result.videos[].last_frame_url.
web_searchbooleandefault: falseAllow the model to search the web as needed; default false.
toolsobject[]Optional tools, for example [{"type":"web_search"}] for web search.
Warning
draft/draft_task_idare not supported; remove them from the request. Draft fields return HTTP 400 at submission. Use Seedance 2.5 for draft mode.
Media requirements
Use publicly accessible http(s) URLs or approved asset:// IDs. Output resolution and input video pixel limits are validated separately.
| Media | Limits |
|---|---|
| Images | ≤10 across both image fields; JPEG / PNG / WebP / BMP / TIFF / GIF / HEIC / HEIF; width and height each 300–6000 px; aspect ratio 0.4–2.5; <30 MB each. |
| Videos | ≤5; MP4 / MOV with H.264 / H.265 video and AAC / MP3 audio; 2–30 seconds each, ≤30 seconds combined; ≤200 MB each; width and height each 300–6000 px, aspect ratio 0.4–2.5, width × height 409,600–8,295,044 pixels, 24–60 FPS. |
| Audio | ≤5; WAV / MP3; 2–30 seconds each, ≤30 seconds combined; ≤15 MB each. |
Task types and constraints
| Mode | Usage and constraints |
|---|---|
| Text to video | Provide prompt without reference media; omit omni_reference_task_type. |
| Reference to video | Provide reference media; reference is optional. Normal duration and aspect-ratio limits still apply. |
| First / last frame | Use image_with_roles; size / aspect_ratio must be adaptive. |
| Video editing | edit; at least 1 source video of 4–30 seconds; aspect ratio must be adaptive, and duration must be -1 or omitted. |
| Video extension | extend; at least 1 reference video; aspect ratio must be adaptive. |
Invalid explicit types or constraints return HTTP 400 before task creation or charging. With auto, the model infers the task from media and prompt, so type constraints may fail asynchronously. Even an explicit type can fail with InvalidParameter.TaskTypeMismatch if it conflicts with the prompt.
Request examples
Multimodal reference
{
"model": "seedance-2-5-flash",
"prompt": "Use the composition of @视频1, the subject in @图片1, and @音频1 as background music",
"image_urls": [
"https://example.com/reference.jpg"
],
"video_urls": [
"https://example.com/reference_8s.mp4"
],
"audio_urls": [
"https://example.com/music_5s.mp3"
],
"omni_reference_task_type": "reference",
"duration": 8,
"size": "16:9"
}First and last frames
{
"model": "seedance-2-5-flash",
"prompt": "Smoothly transition from the first frame to the last frame",
"image_with_roles": [
{
"url": "https://example.com/first.jpg",
"role": "first_frame"
},
{
"url": "https://example.com/last.jpg",
"role": "last_frame"
}
],
"size": "adaptive",
"duration": 5
}Video editing
{
"model": "seedance-2-5-flash",
"prompt": "Edit @视频1: replace the cloudy sky with a clear sunset while preserving the camera movement",
"video_urls": [
"https://example.com/source_10s.mp4"
],
"omni_reference_task_type": "edit",
"size": "adaptive",
"duration": -1,
"output_format": "mov"
}Video extension
{
"model": "seedance-2-5-flash",
"prompt": "Extend @视频1 forward: continue the camera movement as the subject walks into the forest",
"video_urls": [
"https://example.com/source_10s.mp4"
],
"omni_reference_task_type": "extend",
"size": "adaptive",
"duration": 5
}Private media assets
Submit reference images or videos containing real human faces to the asset library for approval before using asset://. Set the upload model to seedance-2-5-flash as well. See the asset library API and use the Flash model name below.
curl --request POST \
--url https://openrouterapi.ru/v1/seedance2/private-avatar/assets \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedance-2-5-flash",
"group": {
"name": "flash-assets"
},
"asset_type": "Image",
"assets": [
{
"url": "https://example.com/reference.jpg",
"name": "reference"
}
]
}'Poll the asset review task through the unified task API. Once approved, obtain the asset:// ID from the asset list and use it in image_urls, image_with_roles[].url, video_urls, or audio_urls.
Task status and results
Poll the task status API. pending / processing are in progress, completed means success, and failed means failure. Read the video at data.result.videos[0].url[0]; url is an array.
curl --request GET \
--url 'https://openrouterapi.ru/v1/tasks/task_example_seedance25flash' \
--header 'Authorization: Bearer <token>'{
"code": 200,
"data": {
"id": "task_example_seedance25flash",
"status": "completed",
"progress": 100,
"cost": 0.3104,
"credits_cost": 3.104,
"usage": {
"completion_tokens": 38800
},
"result": {
"videos": [
{
"url": [
"https://example.com/generated-video.mp4"
],
"last_frame_url": "https://example.com/generated-last-frame.png"
}
]
}
}
}| Field | Meaning |
|---|---|
data.usage.completion_tokens | Tokens used for final settlement. This may be absent for a few seconds after completion; poll again. |
data.cost | Actual charge in USD after account discounts; use the returned value. |
data.credits_cost | Credits actually charged. |
data.result.videos[].url | Video URL array; download and save promptly. |
data.result.videos[].last_frame_url | Last-frame URL, present only after success when return_last_frame: true was requested. |
data.error.message | Failure reason. Failed tasks have data.cost: 0 and the reserved amount is refunded. |
Billing
- Submission reserves an amount using the per-second rate for the resolution. Reference-video requests use the input tier, with output duration plus total reference-video duration.
- Ordinary requests without
durationreserve 5 seconds of output.duration: -1, oreditwith omitted duration, reserves 30 seconds of output. - Successful tasks settle using
data.usage.completion_tokens: tokens ÷ 1,000,000 × the applicable rate per million tokens, with account discounts. The difference from the reservation is refunded or charged. Reference-video presence selectstokenortoken-input;data.costis the final charge. - Rejected submissions incur no generation charge. Failed generation refunds the reserved amount. See the pricing page for rates and account discounts.
Common errors
| Scenario | Action |
|---|---|
| HTTP 400: unsupported resolution | Use only 480p / 720p, not 1080p. |
| HTTP 400: too many references | At most 10 images combined, 5 videos, and 5 audio clips; also check duration limits. |
| HTTP 400: draft unsupported | Remove draft / draft_task_id. |
| HTTP 400: task type, duration, or ratio | Check the combination of omni_reference_task_type, duration, and size / aspect_ratio. |
HTTP 400: nsfw_content_detected | Treat as a moderation rejection, read error.message, and adjust the content. |
| Model not found | Use seedance-2-5-flash, not the dotted seedance-2.5-flash. |
Task failed | Read data.error.message; check media and prompt against the task type. The reservation is refunded. |
Responses
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_example_seedance25flash"
}
]
}Models using this endpoint
Found a problem in these docs? Email support@openrouterapi.ru.