Multimodal Reference-to-Video
Generate video from reference images, videos, audio, and an optional text prompt. Async task API: submit, poll, then download.
Generate one target video from reference images (0–9) + videos (0–3) + audio (0–3) + optional text. Supports creating new videos, editing, and extending.
Note: Audio alone is not allowed; include at least one reference video or image.
Optional synchronized audio. Up to 15 seconds and 4K resolution (standard model).
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 Doubao Seedance 2.0 series models are supported.
Note: First frame, first & last frames, and multimodal reference-to-video are mutually exclusive. You can prompt the model to treat a reference image as the first/last frame; for strict frame matching, prefer Image-to-Video.
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 multimodal reference assets.
Request Body
Content-Type: application/json
Example:
{
"model": "doubao-seedance-2-0-260128",
"content": [
{
"type": "text",
"text": "Extend this clip so the cat walks out of frame"
},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/ref-cat.jpg"
},
"role": "reference_image"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/cat-original.mp4"
},
"role": "reference_video"
}
],
"resolution": "720p",
"ratio": "adaptive",
"duration": 5,
"generate_audio": true,
"watermark": false
}Properties:
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID. See details below |
content | object[] | Yes | Input list: text, images, videos, audio |
content[].type | string | Yes | text / image_url / video_url / audio_url |
content[].text | string | No | Text prompt when type=text |
content[].image_url.url | string | Yes* | Reference image URL / Base64 / asset ID |
content[].video_url.url | string | Yes* | Reference video URL / asset ID |
content[].audio_url.url | string | Yes* | Reference audio URL / Base64 / asset ID |
content[].role | string | Yes* | reference_image / reference_video / reference_audio |
resolution | string | No | Video resolution. See details below |
ratio | string | No | Aspect ratio. Default adaptive |
duration | integer | No | Duration in seconds. Range [4, 15] or -1; default 5 |
generate_audio | boolean | No | Whether to generate audio. Default true |
watermark | boolean | No | Whether to add watermark. Default false |
callback_url | string | No | Callback URL for status changes |
return_last_frame | boolean | No | Return last-frame image. Default false |
execution_expires_after | integer | No | Timeout in seconds. Range [3600, 259200]; default 172800 |
priority | integer | No | Queue priority. Range [0, 9]; default 0 |
tools | object[] | No | Tool config such as web search |
safety_identifier | string | No | End-user identifier (ASCII, ≤64 chars) |
Allowed combinations (text always optional): images only; video only; image+audio; image+video; video+audio; image+video+audio. Audio alone is not allowed.
Seedance 2.0 does not accept reference images/videos containing real human faces uploaded directly. Use preset virtual avatars, authorized real-person assets, or face-containing outputs generated by Seedance 2.0 under your account within the last 30 days.
modelstring(Required)
Model ID to call.
| Model | Description | Default resolution | Available resolutions |
|---|---|---|---|
doubao-seedance-2-0-260128 | Standard, quality-oriented | 720p | 480p, 720p, 1080p, 4k |
doubao-seedance-2-0-fast-260128 | Fast, lower latency | 720p | 480p, 720p |
doubao-seedance-2-0-mini-260615 | Lightweight | 720p | 480p, 720p |
contentobject[](Required)
Input for video generation: text, images, audio, and video.
Content type: text, image_url, video_url, or audio_url.
Text prompt.
- Languages: Chinese and English; also Spanish, Indonesian, Portuguese, and Japanese
- Length: Prefer ≤500 Chinese characters or ≤1000 English words
Reference image: public URL, Base64 (data:image/<format>;base64,...), or asset ID (asset://<ASSET_ID>).
Per-image limits:
- Formats: jpeg, png, webp, bmp, tiff, gif, heic, heif
- Aspect ratio:
[0.4, 2.5] - Side length:
[300, 6000]px - Size: < 30 MB each; request body ≤ 64 MB
- Count: 1–9 images
role is required and must be reference_image.
Reference video: public URL or asset ID (asset://<ASSET_ID>).
Per-video limits:
- Formats: mp4, mov (H.264/AVC, H.265/HEVC; audio AAC, MP3)
- Resolution: 480p, 720p, 1080p, 4k
- Duration:
[2, 15]s each; up to 3 videos; total video duration ≤ 15 s - Aspect ratio:
[0.4, 2.5]; side length[300, 6000]px - Total pixels:
[409600, 8295044] - Size: ≤ 200 MB each
- FPS:
[24, 60]
role is required and must be reference_video.
Reference audio: public URL, Base64 (data:audio/<format>;base64,...), or asset ID (asset://<ASSET_ID>).
Per-audio limits:
- Formats: wav, mp3
- Duration:
[2, 15]s each; up to 3 clips; total audio duration ≤ 15 s - Size: ≤ 15 MB each; request body ≤ 64 MB. Avoid Base64 for large files
role is required and must be reference_audio.
Note: Audio alone is not allowed; include at least one reference video or image.
resolutionstring(Optional)
Video resolution.
doubao-seedance-2-0-260128: default720p; options480p,720p,1080p,4kdoubao-seedance-2-0-fast-260128/doubao-seedance-2-0-mini-260615: default720p; options480p,720p
ratiostring(Optional)
Output aspect ratio. Default adaptive.
Options: 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, adaptive
adaptive rules:
- Extend / edit: map from the first extended/edited video's aspect ratio
- Reference generation: map from the first media file (priority: video > image)
Pixel sizes by resolution:
| Resolution | 16:9 | 4:3 | 1:1 | 3:4 | 9:16 | 21:9 |
|---|---|---|---|---|---|---|
| 480p | 864×496 | 752×560 | 640×640 | 560×752 | 496×864 | 992×432 |
| 720p | 1280×720 | 1112×834 | 960×960 | 834×1112 | 720×1280 | 1470×630 |
| 1080p | 1920×1080 | 1664×1248 | 1440×1440 | 1248×1664 | 1080×1920 | 2206×946 |
| 4k | 3840×2160 | 3326×2494 | 2880×2880 | 2494×3326 | 2160×3840 | 4398×1886 |
durationinteger(Optional)
Output duration in seconds. Default 5; range [4, 15] or -1.
When duration = -1, the model chooses an integer duration within the valid range.
generate_audioboolean(Optional)
Whether the output includes synchronized audio. Default true.
Generated audio is always mono, regardless of input audio channels.
toolsobject[](Optional)
Tools the model may invoke. Currently web_search.
{
"tools": [
{ "type": "web_search" }
]
}Actual search count is in usage.tool_usage.web_search on the query response.
Responses
200: Task created successfully
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-0-260128",
"content": [
{
"type": "text",
"text": "Extend this clip so the cat walks out of frame"
},
{
"type": "video_url",
"video_url": {
"url": "https://example.com/cat-original.mp4"
},
"role": "reference_video"
}
],
"resolution": "720p",
"duration": 5,
"generate_audio": true
}'Response examples
{
"id": "cgt-2025xxxxxx-xxxxx"
}Response fields:
| Name | Type | Description |
|---|---|---|
id | string | Task ID (kept for 7 days). Poll the query API for results |
GET /api/v3/contents/generations/tasks/{id}
Get Video Generation Task
Query the status and result of a video generation task.
- Only the last 7 days of task records are queryable, in the interval
[T-7 days, T), whereTis the request UTC timestamp (second precision) - Video URLs are valid for 24 hours; download or transfer them promptly
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer auth. Format: Bearer sk-xxxxxx |
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The video generation task ID to query |
Responses
200: Query succeeded
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-0-260128",
"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,
"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:
| Name | Type | Description |
|---|---|---|
id | string | Video generation task ID |
model | string | Model name and version used by the task (model-name-version) |
status | string | Task status; see details below |
error | object / null | Error info; null on success, error object on failure |
created_at | integer | Task creation Unix timestamp (seconds) |
updated_at | integer | Unix timestamp (seconds) when the task status was last updated |
content | object | Task output content |
content.video_url | string | Generated video URL (mp4). Valid for 24 hours |
content.last_frame_url | string | Last-frame image URL. Valid for 24 hours. Returned only when create used "return_last_frame": true |
seed | integer | Seed integer used for this request |
resolution | string | Output video resolution |
ratio | string | Output video aspect ratio |
duration | integer | Output duration in seconds. Mutually exclusive with frames in the response; returned when create did not specify frames |
frames | integer | Output frame count. Mutually exclusive with duration; returned when create specified frames |
framespersecond | integer | Output frame rate |
generate_audio | boolean | Whether the video includes synchronized audio. Returned for Seedance 2.0 series |
tools | object[] | Tools actually used for this request. Omitted when no tool was used |
tools[].type | string | Tool type used, e.g. web_search |
safety_identifier | string | End-user identifier. Echoed when set at create time |
priority | integer | Execution priority of the request |
service_tier | string | Service tier that actually processed the task |
execution_expires_after | integer | Task timeout threshold in seconds |
usage | object | Token usage for this request |
usage.completion_tokens | integer | Tokens consumed to generate the video; usable for billing reconciliation |
usage.total_tokens | integer | Total tokens for the request. Input tokens are not counted for video models, so total_tokens = completion_tokens |
usage.tool_usage | object | Tool usage counters |
usage.tool_usage.web_search | integer | Number of web-search calls; returned only when web search was enabled |
statusstring
Task status:
queued: waiting in queuerunning: runningcancelled: cancelled (auto-deleted after 24h; only queued tasks can be cancelled)succeeded: succeededfailed: failedexpired: timed out
Poll every 3–5 seconds until status is succeeded, failed, cancelled, or expired.
errorobject / null
Error details. null on success; error data on failure.
Error code.
Error message.
contentobject
Output content of the video generation task.
Generated video URL in mp4 format. Valid for 24 hours; download or transfer promptly.
Last-frame image URL. Valid for 24 hours; download or transfer promptly.
Returned only when create used "return_last_frame": true.
generate_audioboolean
Whether the output video includes synchronized audio. Returned for Seedance 2.0 series.
true: with synchronized audiofalse: silent video
usageobject
Token usage for this request.
Tokens consumed to generate the video; usable for billing reconciliation.
Note: Seedance 2.0 series has a minimum token usage. If actual usage is below the minimum, this field returns the minimum and billing uses that minimum.
Total tokens for the request. Video models do not count input tokens (0), so total_tokens = completion_tokens.
Tool usage counters.
web_search(integer): number of web-search calls; returned only when web search was enabled
Error handling
HTTP 400
| Case | Suggestion |
|---|---|
| Audio only, no image/video | Include at least one reference video or image |
Missing / wrong role | Use reference_image / reference_video / reference_audio |
| Mixed with first-frame modes | Modes are mutually exclusive |
| Too many refs or over total duration | ≤3 videos and ≤3 audio clips; each modality total ≤ 15 s |
Fast / Mini with 1080p or 4k | Use 480p / 720p, or switch to the standard model |
HTTP 401 / 403
401 Unauthorized: Invalid or expired API Key403 Forbidden: API Key not allowed for this model
HTTP 402
Insufficient balance. Top up in the AutoRouter console.
Task failed / expired
| Cause | Suggestion |
|---|---|
| Content moderation | Adjust prompt or reference assets |
| Media URL unreachable | Use a public URL, Base64, or asset ID |
| Unauthorized real face | Use virtual avatars, authorized assets, or recent Seedance outputs |
| Timeout | Increase execution_expires_after and retry |
Failed tasks are automatically refunded.
Image-to-Video
Generate video from a first frame or first-and-last frames plus an optional text prompt. Async task API: submit, poll, then download.
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.