API DocsAI Model APIsVideos

Seedance 2.5 260628 Video Generation

Generate video with or without audio from text, images, video, and audio. Async task API: submit a request, receive a task ID, then poll for status to get the result.

Generate 1 target video with Doubao Seedance 2.5, with or without audio. Up to 30 seconds, 480p / 720p. Supported scenarios:

  • Text-to-video: generate 1 target video from a text prompt
  • Image-to-video (first frame): 1 first-frame image + optional text prompt
  • Image-to-video (first & last frames): first-frame image + last-frame image + optional text prompt
  • Omni-reference-to-video: reference images (0–30) + reference videos (0–10) + reference audio (0–10) + optional text prompt. Audio-only is allowed. Supports creating a new video, editing, and extending, including 30-second one-shot output

This is an async task-based API: submit a request to receive a task id, poll for status, then download the video when complete.

Only the Doubao Seedance 2.5 model (doubao-seedance-2-5-260628) is supported.

Note: First frame, first & last frames, and omni-reference-to-video are 3 mutually exclusive scenarios and must not be mixed. Omni-reference can treat a reference image as the first / last frame via the prompt; for strict first/last-frame matching, prefer image-to-video (first & last frames).

Base URL

  • https://api.autorouter.top — Production

Authentication

BearerAuth: http (bearer) Authenticate using a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

Endpoints

POST /api/v3/contents/generations/tasks

Create Video Generation Task

Create a video generation task from text, images, video, and audio.

Request Body

Content-Type: application/json

Example (text-to-video):

{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "A kitten yawns at the camera"
    }
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "generate_audio": true,
  "watermark": false
}

Example (image-to-video, first frame):

{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Make this cat jump"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/cat.jpg"
      },
      "role": "first_frame"
    }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": 5,
  "generate_audio": true
}

Example (omni-reference-to-video):

{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Extend this video so the cat walks out of frame"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/cat-original.mp4"
      },
      "role": "reference_video"
    }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": -1,
  "omni_reference_task_type": "extend",
  "generate_audio": true
}

Properties:

NameTypeRequiredDescription
modelstringYesModel ID. Fixed to doubao-seedance-2-5-260628
contentobject[]YesInput content list: text, image, video, audio
content[].typestringYesContent type: text / image_url / video_url / audio_url
content[].textstringYes*Text prompt (required when type=text)
content[].image_url.urlstringYes*Image URL / Base64 / asset ID (when type=image_url)
content[].video_url.urlstringYes*Video URL / asset ID (when type=video_url)
content[].audio_url.urlstringYes*Audio URL / Base64 / asset ID (when type=audio_url)
content[].rolestringConditionalMedia role; see below
resolutionstringNoVideo resolution. Default 720p; 480p or 720p
ratiostringNoAspect ratio. Default adaptive. See below
durationintegerNoDuration in seconds. Range [4, 30] or -1; default -1
generate_audiobooleanNoWhether to generate audio. true (default) with audio; false silent
omni_reference_task_typestringNoOmni-reference task-type hint. Default auto
output_formatstringNoOutput format. Default mp4; mp4 or mov
watermarkbooleanNoWhether to add an "AI generated" watermark. false (default) off; true on
callback_urlstringNoCallback URL for task status changes
return_last_framebooleanNoWhether to return the last-frame image. Default false
execution_expires_afterintegerNoTask timeout in seconds. Range [3600, 259200]; default 172800 (48 hours)
priorityintegerNoQueue priority. Range [0, 9]; default 0. Higher values run first
toolsobject[]NoTool config such as web search. See below
safety_identifierstringNoEnd-user identifier (ASCII, ≤64 chars) for safety auditing

Note: besides the request body, resolution, ratio, duration, and watermark can also be appended to the prompt as weakly validated --[parameters] (e.g. --rs 720p --rt 16:9 --dur 5 --wm false). Prefer request-body strong validation.

Seedance 2.5 does not accept reference images / videos that contain real human faces. Use platform virtual portraits, licensed real-person assets, or original face-containing outputs generated by Seedance 2.5 / 2.0 on this account within the last 30 days.

modelstring(Required)

Model ID to call.

ModelDescriptionDefault resolutionSupported resolutions
doubao-seedance-2-5-260628Seedance 2.5; text / image / omni-reference; up to 30 seconds720p480p, 720p

contentobject[](Required)

Input used to generate the video: text, images, audio, and video.

Supported combinations (text is optional except for text-to-video): text only; text + image; text + video; text + audio (audio-only is allowed); text + image + audio; text + image + video; text + video + audio; text + image + video + audio.

typestring(Required)

Content type: text, image_url, video_url, audio_url.

textstring(Conditional)

Text prompt describing the desired video. Required for text-to-video; optional for image-to-video and omni-reference.

  • Languages: Chinese and English; also Spanish, Indonesian, Portuguese, Japanese, Malay, Thai, Arabic, Vietnamese, Korean
  • Length: up to 500 Chinese characters or 1000 English words. Too much text can dilute the intent
  • For videos with audio, put dialogue in double quotes, e.g. A man stops a woman and says: "Remember, never point at the moon with your finger."

Example: A kitten yawns at the camera

image_url.urlstring(Conditional)

Image source. Supports:

  1. Public URL: a publicly reachable image URL
  2. Base64: data:image/<format>;base64,<encoded>; format must be lowercase, e.g. data:image/png;base64,...
  3. Asset ID: asset://<ASSET_ID> (preset assets / virtual portraits)

Per-image limits:

  • Formats: jpeg, png, webp, bmp, tiff, gif, heic, heif
  • Aspect ratio (w/h): [0.4, 2.5]
  • Side length: [300, 6000] px
  • Size: < 30 MB each; request body ≤ 64 MB. Avoid Base64 for large files

Count:

  • Image-to-video (first frame): 1 image
  • Image-to-video (first & last frames): 2 images
  • Omni-reference-to-video: 1–30 images
video_url.urlstring(Conditional)

Reference video source: public URL or asset ID (asset://<ASSET_ID>).

Per-video limits:

  • Formats: mp4, mov (video H.264/AVC, H.265/HEVC; audio AAC, MP3)
  • Resolution: 480p, 720p, 1080p, 4k
  • Duration: [2, 30] s each; up to 10 reference videos; total duration of all videos ≤ 30 s
  • Aspect ratio: [0.4, 2.5]; side length [300, 6000] px
  • Total pixels: [409600, 8295044]
  • Size: ≤ 200 MB each
  • Frame rate: [24, 60] FPS
audio_url.urlstring(Conditional)

Reference audio source: public URL, Base64 (data:audio/<format>;base64,...), or asset ID (asset://<ASSET_ID>).

Per-audio limits:

  • Formats: wav, mp3
  • Duration: [2, 30] s each; up to 10 clips; total duration of all audio ≤ 30 s
  • Size: ≤ 15 MB each; request body ≤ 64 MB. Avoid Base64 for large files

Seedance 2.5 can take audio alone, without images / video, or together with images / video.

rolestring(Conditional)

Media position or purpose.

Image-to-video (first frame)

One image_url object; role is first_frame or omitted.

Image-to-video (first & last frames)

Two image_url objects; role is required:

  • First frame: first_frame
  • Last frame: last_frame

Note: first and last frame images may be the same. If aspect ratios differ, the first frame wins and the last frame is cropped to match.

Omni-reference-to-video

  • Reference image: role required, always reference_image
  • Reference video: role always reference_video
  • Reference audio: role always reference_audio

Note: first frame, first & last frames, and omni-reference-to-video are 3 mutually exclusive scenarios and must not be mixed.

resolutionstring(Optional)

Video resolution. Default 720p; 480p or 720p.

Seedance 2.5 does not support 1080p or 4k.

ratiostring(Optional)

Aspect ratio of the generated video. Default adaptive.

Allowed values: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive

Note: for Seedance 2.5 video edit, video extend, and first-frame / first-and-last-frame tasks (see task types and matching rules), ratio must be adaptive; a specific aspect ratio is not allowed.

Limits by task type:

Task typeRule
Text-to-videoYou may set an aspect ratio, or let the model choose from the prompt (adaptive allowed)
Image-to-video (first / first & last frames)Output matches the first-frame image aspect ratio; adaptive only
Omni-reference-to-videoYou may set an aspect ratio, or let the model choose (adaptive allowed)
Omni edit / extendOutput matches the source video aspect ratio; adaptive only

Pixel sizes by resolution:

Resolution16:94:31:13:49:1621:9
480p854×480752×560640×640560×752480×854992×432
720p1280×7201112×834960×960834×1112720×12801470×630

If the chosen aspect ratio does not match the uploaded image, the platform center-crops.

durationinteger(Optional)

Output duration in seconds. Default -1; range [4, 30] or -1.

When duration = -1, the model picks an integer second length within the valid range.

Video-edit limits:

  • duration must be -1; a specific output length is not allowed
  • The source video to edit must be [4, 30] s, or the request fails
  • Output duration is essentially the same as the input (may be slightly shorter, ~0.4 s)

The duration returned by the query API is an integer-second estimate (floored): returned duration = actual frame count / 24.

generate_audioboolean(Optional)

Whether the output video includes sound synchronized with the picture. Default true.

  • true: video with audio; the model generates matching speech, SFX, and BGM from the prompt and visuals
  • false: silent video

Note: generated audio is always mono, regardless of the input audio channel count.

omni_reference_task_typestring(Optional)

Task-type hint for omni-reference-to-video, used to validate constraints early. Default auto.

  • auto: the model infers the task type from assets and the prompt. If parameters are incompatible with the actual type, the task fails asynchronously (InvalidParameter.TaskTypeConstraint)
  • reference: reference-to-video; generate a new video from reference images, videos, or audio. No extra ratio / duration limits
  • edit: video edit; edit the picture or audio of the source video. content must include at least one reference_video of 4–30 seconds; ratio must be adaptive; duration must be -1
  • extend: video extend; extend the source video forward or backward. content must include at least one reference_video; ratio must be adaptive

Note: at runtime the model still infers the task type from the prompt. If that differs from the value you set, the task still fails asynchronously (InvalidParameter.TaskTypeMismatch). Follow the prompt style for each task type to reduce errors.

This parameter applies only to omni-reference-to-video.

output_formatstring(Optional)

Output video format. Default mp4.

  • mp4: general-purpose, best compatibility, standard color precision; plays on web, mobile, players, and distribution platforms
  • mov: high color-precision format for professional work (H.264 + yuv444p + PCM); better color and brightness consistency for grading, keying, and compositing. Prefer mov as input and output for edit and extend

Note: some players may not support mov. Common players that do: IINA (macOS), VLC, mpv, ffplay.

toolsobject[](Optional)

Tools the model may call.

typestring(Required)

Tool type. Currently web_search. When enabled, the model decides whether to search the web from the prompt, which can improve freshness at some extra latency.

Actual search count is in usage.tool_usage.web_search from the query API; 0 means no search.

Example:

{
  "tools": [
    { "type": "web_search" }
  ]
}

Responses

200: Task created

Content-Type: application/json

400: Invalid request parameters

Content-Type: application/json

429: Rate limited

Content-Type: application/json

Request examples

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "A kitten yawns at the camera"
    }
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "generate_audio": true,
  "watermark": false
}'

Response examples

{
  "id": "cgt-2025xxxxxx-xxxxx"
}

Response fields:

NameTypeDescription
idstringVideo generation task ID. Kept for 7 days from created_at. Creation is async; use the query API to get the result

More Scenario Examples

Image-to-video (first frame)

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Make this cat jump"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/cat.jpg"
      },
      "role": "first_frame"
    }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": 5,
  "generate_audio": true
}'

Image-to-video (first & last frames)

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Slowly pull the camera back from a close-up"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/first.jpg"
      },
      "role": "first_frame"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/last.jpg"
      },
      "role": "last_frame"
    }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": 5,
  "generate_audio": true
}'

Omni-reference-to-video

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Using these references, generate a video of a cat playing in the living room"
    },
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/ref-cat.jpg"
      },
      "role": "reference_image"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/ref-motion.mp4"
      },
      "role": "reference_video"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/ref-voice.mp3"
      },
      "role": "reference_audio"
    }
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "omni_reference_task_type": "reference",
  "generate_audio": true
}'

Video edit

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Replace the background with a seaside sunset"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/cat-original.mp4"
      },
      "role": "reference_video"
    }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": -1,
  "omni_reference_task_type": "edit",
  "generate_audio": true
}'

Video extend

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Extend this video so the cat walks out of frame"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/cat-original.mp4"
      },
      "role": "reference_video"
    }
  ],
  "resolution": "720p",
  "ratio": "adaptive",
  "duration": -1,
  "omni_reference_task_type": "extend",
  "generate_audio": true
}'

Audio only

curl -X POST "https://api.autorouter.top/api/v3/contents/generations/tasks" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "model": "doubao-seedance-2-5-260628",
  "content": [
    {
      "type": "text",
      "text": "Generate matching visuals from this audio"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/narration.mp3"
      },
      "role": "reference_audio"
    }
  ],
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "omni_reference_task_type": "reference",
  "generate_audio": true
}'

GET /api/v3/contents/generations/tasks/{id}

Query Video Generation Task

Query the status and result of a video generation task.

  • Only tasks from the last 7 days are queryable, in [T-7 days, T), where T is the UTC timestamp of the request (second precision)
  • Video URLs are valid for 24 hours; download or transfer promptly
  • Seedance 2.5 video URLs may be downloaded at most 100 times

Headers

NameTypeRequiredDescription
AuthorizationstringYesAuth header. Format: Bearer sk-xxxxxx

Path Parameters

NameTypeRequiredDescription
idstringYesVideo generation task ID to query

Responses

200: Task queried

Content-Type: application/json

Request examples

curl -X GET "https://api.autorouter.top/api/v3/contents/generations/tasks/{id}" \
  -H "Authorization: Bearer sk-xxxxxx"

Response examples

{
  "id": "cgt-2025xxxxxx-xxxxx",
  "model": "doubao-seedance-2-5-260628",
  "status": "succeeded",
  "error": null,
  "created_at": 1730000000,
  "updated_at": 1730000060,
  "content": {
    "video_url": "https://ark-video-xxx.volces.com/xxx.mp4",
    "last_frame_url": "https://ark-video-xxx.volces.com/xxx.png"
  },
  "seed": -1,
  "resolution": "720p",
  "ratio": "16:9",
  "duration": 5,
  "framespersecond": 24,
  "generate_audio": true,
  "output_format": "mp4",
  "tools": [
    { "type": "web_search" }
  ],
  "safety_identifier": "user_hash_xxx",
  "priority": 0,
  "service_tier": "default",
  "execution_expires_after": 172800,
  "usage": {
    "completion_tokens": 108000,
    "total_tokens": 108000,
    "tool_usage": {
      "web_search": 1
    }
  }
}

Response fields:

NameTypeDescription
idstringVideo generation task ID
modelstringModel name and version used, as name-version
statusstringTask status; see below
errorobject / nullError info; null on success, error payload on failure
created_atintegerTask creation time, Unix timestamp (seconds)
updated_atintegerLast status update time, Unix timestamp (seconds)
contentobjectOutput of the video generation task
content.video_urlstringGenerated video URL. Valid 24 hours; download limit 100
content.last_frame_urlstringLast-frame image URL. Valid 24 hours; download limit 100. Returned only when create used "return_last_frame": true
seedintegerSeed integer used for this request
resolutionstringOutput video resolution
ratiostringOutput video aspect ratio
durationintegerOutput video duration (seconds)
framespersecondintegerOutput video frame rate
generate_audiobooleanWhether the output includes synchronized audio
output_formatstringActual output format (mp4 or mov)
toolsobject[]Tools actually used. Omitted when none were used
tools[].typestringTool type used, e.g. web_search
safety_identifierstringEnd-user identifier. Echoed only if set on create
priorityintegerExecution priority assigned by account and model policy. Higher runs first
service_tierstringService tier actually used
execution_expires_afterintegerExpiry after submit (seconds). Timed-out tasks become expired
usageobjectToken usage for this request
usage.completion_tokensintegerTokens consumed to generate the video; usable for billing reconciliation
usage.total_tokensintegerTotal tokens for the request. Video generation does not count input tokens, so total_tokens = completion_tokens
usage.tool_usageobjectTool usage counters
usage.tool_usage.web_searchintegerWeb-search calls; returned only when web search was enabled

statusstring

Task status:

  • queued: queued
  • running: running
  • cancelled: cancelled (removed 24h after cancel; only queued tasks can be cancelled)
  • succeeded: succeeded
  • failed: failed
  • expired: timed out

Poll every 3–5 seconds until status is succeeded, failed, cancelled, or expired.

errorobject / null

Error message. null on success; error payload on failure.

Note: for some Seedance 2.5 task types, errors are returned only after the task is dequeued and consumed.

codestring

Error code.

messagestring

Error message.

contentobject

Output of the video generation task.

video_urlstring

Generated video URL. Valid for 24 hours; download limit 100. Download or transfer promptly.

last_frame_urlstring

Last-frame image URL. Valid for 24 hours; download limit 100. Download or transfer promptly.

Returned only when create used "return_last_frame": true.

generate_audioboolean

Whether the output video includes synchronized audio.

  • true: video includes synchronized audio
  • false: silent video

output_formatstring

Actual output video format.

  • mp4: general-purpose format
  • mov: professional post-production format

usageobject

Token usage for this request.

completion_tokensinteger

Tokens consumed to generate the video; usable for billing reconciliation.

total_tokensinteger

Total tokens for the request. Video models do not count input tokens (0), so total_tokens = completion_tokens.

tool_usageobject

Tool usage counters.

  • web_search (integer): number of web-search calls; returned only when web search was enabled

Error handling

HTTP 400

CaseSuggestion
Missing content / modelProvide required fields
Unknown model nameUse doubao-seedance-2-5-260628
1080p or 4kSeedance 2.5 supports only 480p and 720p
Mixing first frame / first & last frames / reference-to-videoThe three scenarios are mutually exclusive
Non-adaptive ratio on first frame / first & last frames / edit / extendSet ratio to adaptive
Specific duration on video editEdit tasks only allow duration = -1
Too many reference videos / audio clips or total duration too longUp to 10 videos and 10 audio clips; each total duration ≤ 30 s
omni_reference_task_type does not match assets / promptMeet constraints such as reference_video for that type, or use auto

HTTP 401 / 403

  • 401 Unauthorized: Invalid or expired API Key
  • 403 Forbidden: API Key not allowed for this model (check the token model allowlist)

HTTP 402

Insufficient balance. Top up in the AutoRouter console.

Task failed / expired

CauseSuggestion
Content moderationAdjust the prompt or replace reference assets
Media URL unreachableEnsure the URL is publicly reachable, or use Base64 / asset ID
Unauthorized real human facesUse virtual portraits, licensed assets, or recent outputs from this account
Task-type constraints not metCheck ratio, duration, and reference-video duration for that task type
TimeoutIncrease execution_expires_after and retry

Failed tasks are automatically refunded.

On this page