curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedance-2-5",
"prompt": "A cinematic product shot, slow camera push-in, natural room tone.",
"duration": 10,
"aspect_ratio": "16:9",
"resolution": "720p",
"generate_audio": true
}'
{
"model": "seedance-2-5",
"prompt": "Use image 1 for the character, video 1 for motion, and audio 1 for rhythm.",
"duration": 12,
"aspect_ratio": "16:9",
"image_with_roles": [{"url": "https://example.com/ref.png", "role": "reference_image"}],
"video_with_roles": [{"url": "https://example.com/motion.mp4", "role": "reference_video"}],
"audio_with_roles": [{"url": "https://example.com/rhythm.mp3", "role": "reference_audio"}]
}
{
"model": "seedance-2-5",
"prompt": "Extend video 1 forward, keep the camera pushing in and reveal the city outside the window.",
"video_operation": "extend",
"duration": 11,
"aspect_ratio": "adaptive",
"output_format": "mov",
"video_with_roles": [{"url": "https://example.com/source.mov", "role": "reference_video"}]
}
{
"id": "tsk_vid_xxx",
"object": "generation.task",
"model": "seedance-2-5",
"status": "in_progress",
"progress": 10,
"created_at": 1781577600
}
seedance-2-5
Seedance 2.5 Video Generation
Generate videos with the Seedance 2.5 model
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedance-2-5",
"prompt": "A cinematic product shot, slow camera push-in, natural room tone.",
"duration": 10,
"aspect_ratio": "16:9",
"resolution": "720p",
"generate_audio": true
}'
{
"model": "seedance-2-5",
"prompt": "Use image 1 for the character, video 1 for motion, and audio 1 for rhythm.",
"duration": 12,
"aspect_ratio": "16:9",
"image_with_roles": [{"url": "https://example.com/ref.png", "role": "reference_image"}],
"video_with_roles": [{"url": "https://example.com/motion.mp4", "role": "reference_video"}],
"audio_with_roles": [{"url": "https://example.com/rhythm.mp3", "role": "reference_audio"}]
}
{
"model": "seedance-2-5",
"prompt": "Extend video 1 forward, keep the camera pushing in and reveal the city outside the window.",
"video_operation": "extend",
"duration": 11,
"aspect_ratio": "adaptive",
"output_format": "mov",
"video_with_roles": [{"url": "https://example.com/source.mov", "role": "reference_video"}]
}
{
"id": "tsk_vid_xxx",
"object": "generation.task",
"model": "seedance-2-5",
"status": "in_progress",
"progress": 10,
"created_at": 1781577600
}
Note for users in mainland China: Please use
https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.seedance-2-5 and the upstream model ID doubao-seedance-2-5-260628.
- Supports text-to-video, first-frame / first-last-frame image-to-video, editing, video extension, and multimodal reference workflows.
- Supports image, video, and audio references, including audio-only references.
- The task is asynchronous. The submit API returns a
generation.task; fetch the finished video from the task status API.
Authorizations
string
required
Use Bearer Token authentication for every request.Get an API key from the API Key Management Page.
Authorization: Bearer YOUR_API_KEY
Body
string
default:"seedance-2-5"
required
Public ToAPIs model name. Use
seedance-2-5.string
Describe the scene, camera movement, subject action, style, and audio mood. When referring to media, use labels such as “image 1”, “video 1”, or “audio 1”.
string
default:"generate"
Video operation:
generate, edit, or extend. Editing and extension require at least one video_with_roles; editing uses duration=-1, while extension accepts 4–30 or -1. All three operations use this endpoint.string
Your order number or internal job ID. It is stored with the task and can be used for later lookup with
GET /v1/videos/generations/{client_business_id}.integer
Output duration in seconds. The official range is
4–30; use -1 to let the model choose the duration. Editing accepts only -1, and the output length matches the input video. Extension accepts 4–30 or -1, measured as the total output duration after extension.string
Output aspect ratio. Allowed values:
21:9, 16:9, 4:3, 1:1, 3:4, 9:16, and adaptive.Use adaptive for editing, video extension, and first/last-frame tasks, or when the input media should determine the ratio.string[]
Compatibility image URL array. For new integrations, prefer
image_with_roles so each image has an explicit role. Do not send both fields in one request.array
Images with explicit roles. Each item contains a required
url and role.Roles: first_frame, last_frame, or reference_image.Up to 30 images may be supplied. First/last-frame mode and reference-image mode are mutually exclusive.array
Reference videos. Each item contains a required
url and the role reference_video. Up to 10 videos may be supplied.array
Reference audio. Each item contains a required
url and the role reference_audio. Up to 10 audio clips may be supplied. Audio-only reference input is supported.string
Output resolution:
480p, 720p, or 1080p.string
default:"mp4"
Supported formats are
mp4 and mov.boolean
default:true
Whether to generate synchronized audio.
boolean
default:false
Whether to return the generated video’s last-frame image in the completed task result.
array
Optional tools. The supported value is
[{ "type": "web_search" }].Web search is for text-to-video requests and cannot be combined with image, video, or audio inputs.string
ToAPIs task-completion callback URL. See Task Webhooks.
string
A caller-supplied tracing ID.
boolean
default:false
Set to
true to disallow NSFW content generation.Reference input limits
The combined limit is 50 reference items: up to 30 images, 10 videos, and 10 audio clips. Use explicit roles to avoid ambiguous frame/reference interpretation.Invalid task-type combinations can fail. Editing and extension tasks set the upstream task type explicitly, so a constraint mismatch returns an error immediately at submit time. For other task types the model infers the type from the media and the prompt, and a mismatch fails asynchronously with
InvalidParameter.TaskTypeConstraint. For editing, extension, and first/last-frame tasks, set aspect_ratio to adaptive as required by the upstream API.Asset review
When a request includes image, video, or audio inputs, some channels review the media automatically before submitting generation. No extra parameter is needed; pass media URLs in the existing media fields.- An accepted request returns a video task immediately. When review is required, the task stays
queuedand generation is submitted only after all media in the request pass. First-time review can take several minutes; reusing the same URL for the same user and channel reuses the review result. - Each media preparation round lasts up to 20 minutes by default. Rejection or preparation timeout ends the task as
failed; seeerror.messagefor the reason. Failed review incurs no video generation fee. - Media must be public HTTP(S) URLs; Base64 and local paths are not accepted. Keep images within 20 MB (some channels allow up to 30 MB) and video or audio within 100 MiB. Each model’s existing format limits still apply.
- Channels that review media validate it at submission: a URL with embedded credentials or longer than 2048 bytes, the same URL used as different media types, or more than 64 media references in one request returns HTTP 400 with
error.codeinvalid_private_assets. - Media is identified by URL. Use a new URL after the file content changes.
- Final renders from a draft (
draft_task_id) are not reviewed. - Legacy
asset://references are retired and return HTTP 400.
Fetch completed results from Video task status. When original URL delivery is enabled, prefer
result.data[].url and use the optional fallback_url only if the primary URL cannot be accessed. Last frames use last_frame_url and fallback_last_frame_url. Fallback fields are returned only when copies are available.Response
string
Task ID used to query status.
string
Returned when
client_business_id was supplied.string
Fixed to
generation.task.string
The requested model name.
string
queued, in_progress, completed, or failed.integer
Progress percentage from
0 to 100.integer
Creation timestamp.
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "seedance-2-5",
"prompt": "A cinematic product shot, slow camera push-in, natural room tone.",
"duration": 10,
"aspect_ratio": "16:9",
"resolution": "720p",
"generate_audio": true
}'
{
"model": "seedance-2-5",
"prompt": "Use image 1 for the character, video 1 for motion, and audio 1 for rhythm.",
"duration": 12,
"aspect_ratio": "16:9",
"image_with_roles": [{"url": "https://example.com/ref.png", "role": "reference_image"}],
"video_with_roles": [{"url": "https://example.com/motion.mp4", "role": "reference_video"}],
"audio_with_roles": [{"url": "https://example.com/rhythm.mp3", "role": "reference_audio"}]
}
{
"model": "seedance-2-5",
"prompt": "Extend video 1 forward, keep the camera pushing in and reveal the city outside the window.",
"video_operation": "extend",
"duration": 11,
"aspect_ratio": "adaptive",
"output_format": "mov",
"video_with_roles": [{"url": "https://example.com/source.mov", "role": "reference_video"}]
}
{
"id": "tsk_vid_xxx",
"object": "generation.task",
"model": "seedance-2-5",
"status": "in_progress",
"progress": 10,
"created_at": 1781577600
}