Video Generation
Generate cinematic video clips with Seedance 2.5 — text-to-video, image-to-video, and video-to-video.
Using Portrait as input
Reference virtual or real-person portraits in video generation by passing asset://<asset-id> as multimodal input. asset:// is supported only by seedance-2.0 / seedance-2.0-fast — not seedance-2.5. See Portrait guide for the end-to-end onboarding flow.
Overview
Generate short cinematic video clips from a text prompt, reference images, or reference video using Seedance models. seedance-2.5 is the current flagship and covers text-to-video, image-to-video, and video-to-video (drive a new clip from a reference video via a reference_video).
Creating a video
Submit a video generation task using the Videos API:
| 1 | curl https://api.alltoken.ai/v1/videos/generations -H "Authorization: Bearer $ALLTOKEN_API_KEY" -H "Content-Type: application/json" -d '{ |
| 2 | "model": "seedance-2.5", |
| 3 | "prompt": "A serene mountain lake at sunrise, cinematic 4K", |
| 4 | "ratio": "16:9", |
| 5 | "duration": 5, |
| 6 | "resolution": "720p" |
| 7 | }' |
Reference materials
Beyond a text prompt, Seedance can take reference images, video, and audio through the content[] array. Each item has a type and a role:
| Material | type | Available role |
|---|---|---|
| Image | image_url | reference_image, first_frame, last_frame |
| Video | video_url | reference_video |
| Audio | audio_url | reference_audio |
Two ways to supply each material, and they can be mixed within one request:
- Already on a public host — pass the
http(s)URL inside the type object, e.g.{ "type": "image_url", "image_url": { "url": "https://..." }, "role": "reference_image" }. It must be publicly reachable upstream (no private or signed-only links). - Local file — presign and upload it, then reference the returned
upload_id:{ "type": "image_url", "upload_id": "upl_...", "role": "reference_image" }.
Warning
The data: base64 inline path was removed on 2026-08-06. A video request carrying data: media now returns 400 inline_media_removed. Migrate by replacing the inline URL with an upload_id — every other field stays the same. http(s) URLs and upload_id are unaffected.
| 1 | - { "type": "image_url", "image_url": { "url": "data:image/png;base64,iVBOR..." }, "role": "reference_image" } |
| 2 | + { "type": "image_url", "upload_id": "upl_9f3c...", "role": "reference_image" } |
Roles, defaults, and frame rules
You may write type in the short form image / video / audio (the gateway normalizes it), but omitting role applies a default — and for images that default is not what you might expect:
Short type | Normalizes to | Default role when omitted |
|---|---|---|
image | image_url | first_frame — not reference_image! |
video | video_url | reference_video |
audio | audio_url | reference_audio |
So { "type": "image", "upload_id": "upl_..." } is treated as a first frame, not a reference image. Prefer the long form with an explicit role and don't rely on defaults. The GET task response echoes the detected input_type so you can verify how the gateway read your content[].
Warning
Frames and visual references can't be mixed. Upstream treats them as exclusive paradigms: first_frame / last_frame (define the start/end picture) versus reference_image / reference_video (provide style or subject reference). Combining both kinds of visual material in one request returns 400 invalid_request. reference_audio is exempt — "an image as first frame + audio as reference" is a supported combination.
Input constraints
| Constraint | Value | Whose limit |
|---|---|---|
| Reference video pixel count | ≥ 409,600 (i.e. 640×640 and up) | Upstream model — passed through verbatim |
| Per-file upload size | See the Media Uploads purpose caps | AllToken |
| Reference image count | Upstream docs say 9; we don't cap it | Upstream |
When a reference video is too small, the upstream error is passed through unchanged (for example InvalidParameter: ... video pixel count ... must be greater than or equal to 409600 ...). Note that frames and camera_fixed are not supported by the 2.0 series and are silently ignored rather than rejected.
Supported models
Call GET /videos/models for the live list. seedance-2.5 is the current flagship (text-to-video, image-to-video, and video-to-video); asset:// portrait references stay on the 2.0 line.
| Model | Best for | asset:// portrait reference |
|---|---|---|
seedance-2.5 | Flagship — text / image / video-to-video | ❌ Not supported (portrait is 2.0-only) |
seedance-2.0 / seedance-2.0-fast | Portrait (asset://) workflows | ✅ Supported |
seedance-1.5-pro | Earlier generation | ❌ Not supported (use plain image URLs) |
See Portrait guide for how to obtain an asset_id.
Parameters
model—"seedance-2.5"(flagship),"seedance-2.0","seedance-2.0-fast", or"seedance-1.5-pro"; callGET /videos/modelsfor the live listprompt— text description of the desired videoratio—"16:9","9:16","4:3","3:4","21:9","1:1", or"adaptive"duration— length in seconds;-1lets the model choose automaticallyresolution—"480p","720p", or"1080p"content— multimodal input array for image-to-video or references, for example{ "type": "image_url", "image_url": { "url": "..." }, "role": "first_frame" }. Images containing real human faces must go through Portrait first — passasset://<asset_id>after onboarding (see Portrait guide); public URLs of real-person images may be rejected upstream for deepfake / consent compliance.
Checking task status
Video generation is asynchronous. Poll for status:
$curl https://api.alltoken.ai/v1/videos/generations/{task_id} -H "Authorization: Bearer $ALLTOKEN_API_KEY"The response includes status (queued, processing, completed, failed, expired, or cancelled) and a download URL when complete.
Cancel a task
Cancel a queued or processing task:
$curl -X POST https://api.alltoken.ai/v1/videos/generations/{task_id}/cancel -H "Authorization: Bearer $ALLTOKEN_API_KEY"Tasks already completed, failed, or cancelled cannot be cancelled.