Skip to content

Seedance 2.5 video generation API · Unified v1 ​

API version

This page describes the Unified Video API (v1). You can independently choose the Seedance Native API (v3) instead; use the request and result format documented for your chosen interface.

For Seedance-family API model IDs, a successful, fully settled GET /v1/tasks/{id} response may include assets[].source_url for each recorded original asset URL. Other models and unfinished or failed tasks omit this field. The original link may already be expired or access-limited; its expiry is not checked and the link is not refreshed when querying. Save files promptly; use assets[].url if the original link is unavailable. Platform download links and console previews are unchanged. Do not send your Tokenlio API Key to either asset URL.

Model capabilities and optional controls

Only specifications and modes currently available for the requested API model ID can be used. Ranges on this page are interface limits, not a guarantee that every model ID supports every combination. Unsupported durations, resolutions, input counts or modes are rejected with VIDEO_REQUEST_INVALID; do not retry the same unsupported request.

Optional controls generate_audio, return_last_frame, seed, watermark and output_format may have no effect or use a default when unsupported. Defaults describe the request, not a guarantee of generated audio, a final frame, repeatable output or a particular container. Check the actual assets and downloaded file. Unknown fields, invalid types and null are still rejected.

Seedance 2.5 | explicit integer duration | video and reference inputs | asynchronous tasks

Seedance 2.5 uses the shared asynchronous video API. Use the parameters and examples below only for specifications and modes supported by the API model ID you request.

This page describes request fields and capability-dependent examples; it does not guarantee every optional feature for every request.

  • Task creation: POST https://api.tokenlio.ai/v1/videos/generations (returns 202 Accepted)
  • Task query: GET https://api.tokenlio.ai/v1/tasks/{id}
  • Content download: GET https://api.tokenlio.ai/v1/tasks/{id}/content

Before you start

  1. Sign in to the Tokenlio console and create a Workspace model-routing API Key.
  2. Copy the published Seedance 2.5 API model ID from the model catalog and replace example/seedance-2.5 in every example.
  3. Video tasks are asynchronous: creation returns a 202 response with the task id immediately, so poll the query endpoint for the result.

Differences from Seedance 2.0 ​

In the table below, 2.0 means the Standard model. Fast and Mini support only 480p and 720p; see Seedance 2.0 Fast and Seedance 2.0 Mini.

CapabilitySeedance 2.0Seedance 2.5Upgrade and caveats
Single output length4–15 seconds4–30 secondsTwice the maximum, enough for a full narrative shot in one call.
Resolutions480p / 720p / 1080p / 4k480p / 720p / 1080pNote: 2.5 does not offer 4k; 1080p is the ceiling.
Default aspect ratio16:9adaptiveMatches the source material automatically; frame and extension tasks must use adaptive.
Reference imagesUp to 9Up to 30Room for character turnarounds, concept art and texture references.
Reference videosUp to 3 (≤15s)Up to 10 (≤30s total)Richer storyboard and motion references.
Audio-only inputNot supported (needs image/video)NativeGenerate a picture from music or speech without any image or video.
Video extensionNot supportedNative (extend)Continue the story or extend the shot from an existing video.
Container formatsmp4 onlymp4 / movmov keeps more colour information for professional grading.
AI watermarkNot supportedwatermark toggleTurn the AI-generated marker on or off as needed.

Quick start (end-to-end) ​

The example walks from submitting a generation task to polling the task status.

bash
# 1. Submit the generation task (returns 202 with the task ID)
curl -X POST "https://api.tokenlio.ai/v1/videos/generations" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
    "model": "example/seedance-2.5",
    "prompt": "An ancient pine forest wrapped in morning mist, golden sunrise breaking through the branches in visible light shafts, the camera gliding forward from a low angle, glowing dust in the air, 8k cinematic look",
    "duration": 10,
    "resolution": "720p",
    "size": "adaptive",
    "generate_audio": true,
    "omni_reference_task_type": "auto"
  }'

# 2. Query the task status (poll every 5–10 seconds)
# Replace TASK_ID with the id returned above
curl -X GET "https://api.tokenlio.ai/v1/tasks/TASK_ID" \
  -H "Authorization: Bearer $TOKENLIO_API_KEY"
python
import os
import time
import requests

API_KEY = os.environ.get("TOKENLIO_API_KEY")
BASE_URL = "https://api.tokenlio.ai"

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

# 1. Create the Seedance 2.5 video task
payload = {
    "model": "example/seedance-2.5",
    "prompt": "An ancient pine forest wrapped in morning mist, golden sunrise breaking through the branches in visible light shafts, the camera gliding forward from a low angle, glowing dust in the air, 8k cinematic look",
    "duration": 10,
    "resolution": "720p",
    "size": "adaptive",
    "generate_audio": True,
    "omni_reference_task_type": "auto"
}

resp = requests.post(f"{BASE_URL}/v1/videos/generations", headers=headers, json=payload)
resp.raise_for_status()
task = resp.json()
task_id = task["id"]
print(f"Task accepted, id: {task_id}, status: {task.get('status')}")

# 2. Poll until the task finishes
while True:
    time.sleep(5)
    query_resp = requests.get(f"{BASE_URL}/v1/tasks/{task_id}", headers=headers)
    query_resp.raise_for_status()
    result = query_resp.json()
    status = result.get("status")
    print(f"Polled status: {status}")

    if status == "succeeded":
        for asset in result.get("assets", []):
            if asset.get("role") == "video":
                print(f"Video ready, download URL: {asset.get('url')}")
            elif asset.get("role") == "last_frame":
                print(f"Last frame URL: {asset.get('url')}")
        break
    elif status == "failed":
        err = result.get("error", {})
        print(f"Generation failed: {err.get('code')} - {err.get('message')}")
        break
javascript
const apiKey = process.env.TOKENLIO_API_KEY;
const baseUrl = 'https://api.tokenlio.ai';

async function generateVideo() {
  // 1. Create the video task
  const createRes = await fetch(`${baseUrl}/v1/videos/generations`, {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      model: 'example/seedance-2.5',
      prompt: 'An ancient pine forest wrapped in morning mist, golden sunrise breaking through the branches in visible light shafts, the camera gliding forward from a low angle, glowing dust in the air, 8k cinematic look',
      duration: 10,
      resolution: '720p',
      size: 'adaptive',
      generate_audio: true,
      omni_reference_task_type: 'auto',
    }),
  });

  if (!createRes.ok) {
    throw new Error(`Creation failed: ${createRes.status} ${await createRes.text()}`);
  }

  const { id } = await createRes.json();
  console.log(`Task accepted, id: ${id}`);

  // 2. Poll the result
  while (true) {
    await new Promise((r) => setTimeout(r, 5000));
    const queryRes = await fetch(`${baseUrl}/v1/tasks/${id}`, {
      headers: { 'Authorization': `Bearer ${apiKey}` },
    });
    const task = await queryRes.json();
    console.log(`Current status: ${task.status}`);

    if (task.status === 'succeeded') {
      const videoAsset = task.assets.find((a) => a.role === 'video');
      console.log('Generation succeeded, video URL:', videoAsset?.url);
      break;
    } else if (task.status === 'failed') {
      console.error('Task failed:', task.error);
      break;
    }
  }
}

generateVideo().catch(console.error);
go
package main

import (
	"bytes"
	"encoding/json"
	"fmt"
	"net/http"
	"os"
	"time"
)

func main() {
	apiKey := os.Getenv("TOKENLIO_API_KEY")
	baseURL := "https://api.tokenlio.ai"

	// 1. Create the task
	payload := map[string]any{
		"model":                    "example/seedance-2.5",
		"prompt":                   "An ancient pine forest wrapped in morning mist, golden sunrise breaking through the branches in visible light shafts, the camera gliding forward from a low angle, glowing dust in the air, 8k cinematic look",
		"duration":                 10,
		"resolution":               "720p",
		"size":                     "adaptive",
		"generate_audio":           true,
		"omni_reference_task_type": "auto",
	}
	body, _ := json.Marshal(payload)

	req, _ := http.NewRequest("POST", baseURL+"/v1/videos/generations", bytes.NewBuffer(body))
	req.Header.Set("Authorization", "Bearer "+apiKey)
	req.Header.Set("Content-Type", "application/json")

	client := &http.Client{Timeout: 30 * time.Second}
	resp, err := client.Do(req)
	if err != nil {
		panic(err)
	}
	defer resp.Body.Close()

	var created struct {
		ID     string `json:"id"`
		Status string `json:"status"`
	}
	_ = json.NewDecoder(resp.Body).Decode(&created)
	fmt.Printf("Task created, id: %s, status: %s\n", created.ID, created.Status)

	// 2. Poll the result
	for {
		time.Sleep(5 * time.Second)
		qReq, _ := http.NewRequest("GET", baseURL+"/v1/tasks/"+created.ID, nil)
		qReq.Header.Set("Authorization", "Bearer "+apiKey)

		qResp, err := client.Do(qReq)
		if err != nil {
			continue
		}
		var result struct {
			Status string `json:"status"`
			Assets []struct {
				Role string `json:"role"`
				URL  string `json:"url"`
			} `json:"assets"`
		}
		_ = json.NewDecoder(qResp.Body).Decode(&result)
		qResp.Body.Close()

		fmt.Printf("Task status: %s\n", result.Status)
		if result.Status == "succeeded" {
			for _, asset := range result.Assets {
				if asset.Role == "video" {
					fmt.Println("Generation succeeded, video URL:", asset.URL)
				}
			}
			break
		} else if result.Status == "failed" {
			fmt.Println("Task processing failed")
			break
		}
	}
}

Response formats ​

Creation returns HTTP 202 Accepted:

json
{
  "id": "e89a542b-7c11-4f81-9b16-8f3a1d9429c3",
  "model": "example/seedance-2.5",
  "status": "queued",
  "assets": []
}

A finished task returns HTTP 200 OK:

json
{
  "id": "e89a542b-7c11-4f81-9b16-8f3a1d9429c3",
  "model": "example/seedance-2.5",
  "status": "succeeded",
  "assets": [
    {
      "role": "video",
      "url": "https://download.tokenlio.ai/videos/e89a542b-7c11-4f81-9b16-8f3a1d9429c3.mp4?expires=1786219148"
    }
  ]
}

Request parameters ​

ParameterTypeRequired / defaultDefinition and limits
modelstringRequiredThe exact published API model ID from the catalog (for example example/seedance-2.5).
promptstringRequired for text-to-video / recommended otherwiseUp to 4,000 characters. Supports @image1, @video1, @audio1 references to materials.
durationintegerRequired (no default)Output length in seconds; an integer from 4–30. Automatic duration -1 is not supported. Only use this option within the model's currently available capabilities.
resolutionstring720p480p, 720p, 1080p. 2k and 4k are not supported. Only use this option within the model's currently available capabilities.
sizestringadaptiveAspect ratio: 16:9, 9:16, 1:1, 4:3, 3:4, 21:9, adaptive. Frame and extension tasks require adaptive. Only use this option within the model's currently available capabilities.
generate_audiobooleantrueOptional audio-generation preference; supported models apply true or false. It may have no effect; it does not guarantee audio in the result.
return_last_framebooleanfalseOptional final-frame request. Use an asset with role=last_frame only if it is returned; some models ignore this control.
watermarkbooleanfalseOptional watermark preference, applied only when supported; do not treat it as a guarantee of a visible compliance mark.
seedintegerOptionalOptional signed 64-bit random seed. It may be ignored and never guarantees identical output.
output_formatstringmp4Requested container: mp4/mov (2.5 only). If unsupported, it may fall back to mp4; inspect the downloaded file instead of relying on its extension.
omni_reference_task_typestringautoSub-task type: auto (decide automatically), reference (multimodal references), extend (video extension). edit is not supported. Only use this option within the model's currently available capabilities.
image_urlsstring[]OptionalPublic HTTPS reference images, up to 30. Cannot be combined with image_with_roles. Only use this option within the model's currently available capabilities.
image_with_rolesobject[]OptionalImage objects with roles for first/last frames, up to 2 items. Cannot be combined with image_urls. Only use this option within the model's currently available capabilities.
image_with_roles[].urlstringRequiredPublic HTTPS URL of the image.
image_with_roles[].rolestringRequiredfirst_frame or last_frame (a last frame requires a first frame).
video_urlsstring[]OptionalPublic HTTPS reference videos, up to 10. An extend task needs at least one. Only use this option within the model's currently available capabilities.
audio_urlsstring[]OptionalPublic HTTPS reference audio, up to 10. Audio-only references are supported (no image or video needed). Only use this option within the model's currently available capabilities.
expected_pricing_revisionstringOptionalA pricing version you already hold; a changed version returns VIDEO_PRICE_CHANGED and does not lock the price.
max_charge_amountstringOptionalMaximum USD you are willing to pay, at most 8 fractional digits (for example "1.20").

Key 2.5 validation rules

  1. Frame and extension tasks must use size: "adaptive": a fixed ratio such as 16:9 triggers a 400 validation error.
  2. edit is not a supported task type: use extend to continue a video, or reference with a prompt to restyle.
  3. Duration must be explicit: duration must be an integer from 4–30; there is no default and -1 is rejected.

Usage scenarios ​

Advanced examples apply only when the requested model supports the illustrated specification or mode. They use the same create, query and download endpoints.

Scenario 1: 30-second cinematic text-to-video(when available) ​

Use the 30-second output to generate a complete narrative sequence with a beginning, development and finish in one call.

json
{
  "model": "example/seedance-2.5",
  "prompt": "A 30-second shot sequence with epic cinematic feel: a high overview of an ancient frozen ruin at dawn, then the camera pushes slowly through a wind-driven snow canyon, at second ten the frame focuses on a glowing rune stele at the main gate pulsing with light, and finally the camera tilts up to reveal a magnificent aurora curtain and stars, cinematic depth of field and particle light",
  "duration": 30,
  "resolution": "1080p",
  "size": "16:9",
  "generate_audio": true,
  "omni_reference_task_type": "auto"
}

Scenario 2: adaptive framing from a single still (first frame)(when available) ​

Provide a high-quality portrait or landscape still as the first frame (first_frame); the model inherits its aspect ratio and colour style and starts the motion naturally.

json
{
  "model": "example/seedance-2.5",
  "prompt": "The character in the frame turns slowly toward the camera, eyes resolute, a faint smile appearing, a strong wind whipping the red cloak, war banners snapping in the background",
  "duration": 8,
  "resolution": "720p",
  "size": "adaptive",
  "image_with_roles": [
    {
      "url": "https://YOUR_PUBLIC_CDN/character_portrait.png",
      "role": "first_frame"
    }
  ]
}

Format requirement

When a first frame is used with Seedance 2.5, "size": "adaptive" is required.


Scenario 3: smooth first-to-last frame transition(when available) ​

Supply the starting and ending images; the model fills in the motion path, lighting changes and physical interaction in between.

json
{
  "model": "example/seedance-2.5",
  "prompt": "Starting from the closed rosebud of the first frame, the camera shoots a macro time-lapse as petals unfurl layer by layer, a dewdrop slides off, resolving smoothly into the fully opened red rose of the last frame",
  "duration": 10,
  "resolution": "1080p",
  "size": "adaptive",
  "image_with_roles": [
    {
      "url": "https://YOUR_PUBLIC_CDN/flower_bud.jpg",
      "role": "first_frame"
    },
    {
      "url": "https://YOUR_PUBLIC_CDN/flower_bloom.jpg",
      "role": "last_frame"
    }
  ]
}

Scenario 4: chaining clips with return_last_frame(when available) ​

For long series or extended shots, enable "return_last_frame": true to get the final frame of the generated clip, then use it as the first_frame of the next task to join several clips seamlessly.

json
{
  "model": "example/seedance-2.5",
  "prompt": "A detective with a flashlight walks slowly into a dark abandoned factory, the beam sweeping over rusted pipes, the camera following steadily behind, footsteps echoing through the empty hall",
  "duration": 12,
  "resolution": "720p",
  "size": "16:9",
  "return_last_frame": true
}

Scenario 5: audio-driven video (2.5 exclusive) ​

No reference image or video required. Give Seedance 2.5 a piece of audio (music, sound design or emotive dialogue) plus a descriptive prompt, and it follows the emotional arc, pauses and instrument swells of the track to generate matching visuals.

json
{
  "model": "example/seedance-2.5",
  "prompt": "The picture matches the dynamics and mood of the input audio exactly: the calm intro shows a still deep-blue lake with gentle ripples, and as the drums rise the camera shoots up into the clouds, lightning tears the night sky, rain and thunder, with visual and audio beats fully aligned",
  "duration": 15,
  "resolution": "1080p",
  "size": "16:9",
  "audio_urls": [
    "https://YOUR_PUBLIC_CDN/dramatic_soundtrack.mp3"
  ]
}

Scenario 6: precise multimodal references (@ syntax) ​

For reference tasks, declare "omni_reference_task_type": "reference" and address materials as @image1, @image2, @video1, @audio1 (1-based, in array order) to assign each input its own job.

json
{
  "model": "example/seedance-2.5",
  "prompt": "Use the hero look and costume from @image1 throughout, place the scene in the cyberpunk night market of @image2, follow the fast camera and retreating follow angle of @video1 exactly, and use @audio1 as the location music and crowd ambience",
  "duration": 12,
  "resolution": "1080p",
  "size": "16:9",
  "omni_reference_task_type": "reference",
  "image_urls": [
    "https://YOUR_PUBLIC_CDN/hero_character.png",
    "https://YOUR_PUBLIC_CDN/cyber_market_scene.jpg"
  ],
  "video_urls": [
    "https://YOUR_PUBLIC_CDN/camera_motion_track.mp4"
  ],
  "audio_urls": [
    "https://YOUR_PUBLIC_CDN/cyber_ambience.mp3"
  ]
}

Scenario 7: extend an existing video (extend)(when available) ​

Pass an existing clip and continue the story forward from it.

json
{
  "model": "example/seedance-2.5",
  "prompt": "Continue the running motion and camera push of the reference video: the character bursts out of a dim corridor, pushes the door open onto a sunlit lawn, breathing hard, the camera pushing forward smoothly",
  "duration": 8,
  "resolution": "720p",
  "size": "adaptive",
  "omni_reference_task_type": "extend",
  "video_urls": [
    "https://YOUR_PUBLIC_CDN/running_part1.mp4"
  ]
}

Extension requirements

  • omni_reference_task_type must be "extend".
  • video_urls must contain at least one source video.
  • size must be "adaptive" so the aspect ratio matches the source video exactly.
  • The prompt should describe continuing the action forward or backward.

Scenario 8: MOV output for professional editing(when available) ​

Request output_format: mov only when the model supports it. Unsupported requests may use mp4; the actual downloaded container is authoritative. A container choice alone does not guarantee better color or image quality.

json
{
  "model": "example/seedance-2.5",
  "prompt": "Vintage film tones, sunlight falling on an outdoor wooden café table, a breeze turning the pages of a book, dappled light, rich colour layering, fine film grain",
  "duration": 6,
  "resolution": "1080p",
  "size": "16:9",
  "output_format": "mov",
  "generate_audio": false
}

Scenario 9: AI-generated watermark (watermark: true)(when available) ​

Where a review process requires it, set "watermark": true and the model embeds a translucent "AI generated" marker in the lower right corner.

json
{
  "model": "example/seedance-2.5",
  "prompt": "An AI virtual anchor reports global technology news to camera, natural and lively expression, lip sync matching the voice exactly",
  "duration": 10,
  "resolution": "720p",
  "size": "16:9",
  "watermark": true,
  "generate_audio": true
}

Scenario 10: large material combinations (short film scale) ​

Seedance 2.5 accepts up to 30 images, 10 videos and 10 audio clips. This example combines several concept designs with layered ambience:

json
{
  "model": "example/seedance-2.5",
  "prompt": "Combine the pilot design of @image1, the mech armour of @image2 and the desert wasteland of @image3, follow the tactical shooting motion of @video1, and pair it with the heavy mech footsteps of @audio1 and the sandstorm wind of @audio2",
  "duration": 15,
  "resolution": "1080p",
  "size": "16:9",
  "omni_reference_task_type": "reference",
  "image_urls": [
    "https://YOUR_PUBLIC_CDN/pilot_portrait.png",
    "https://YOUR_PUBLIC_CDN/mech_armor_design.png",
    "https://YOUR_PUBLIC_CDN/desert_environment.jpg"
  ],
  "video_urls": [
    "https://YOUR_PUBLIC_CDN/tactical_action_ref.mp4"
  ],
  "audio_urls": [
    "https://YOUR_PUBLIC_CDN/mech_footsteps.mp3",
    "https://YOUR_PUBLIC_CDN/desert_wind.mp3"
  ]
}

Input material guidelines ​

To keep multimodal inputs parsed smoothly, prepare materials within these limits:

MaterialRecommended specs and hard limits
ImagesUp to 30 in total; JPEG, PNG, WebP, BMP, TIFF, GIF, HEIC; each < 30 MB; 300×300 to 6000×6000 px; aspect ratio 0.4–2.5.
VideosUp to 10; MP4 or MOV, H.264/H.265 video with AAC/MP3 audio; 2–30 seconds per clip and <= 30 seconds in total; each < 200 MB; 24–60 FPS.
AudioUp to 10; WAV or MP3; 2–30 seconds per clip and <= 30 seconds in total; each < 15 MB. Audio may be the only input.

Public reachability

Every material URL must be a publicly reachable HTTPS link. Avoid private IPs, unsigned hotlink-protected links or temporary addresses behind complex client authentication.


Error codes and troubleshooting ​

Invalid creation requests return 400 Bad Request:

Error code / messageCause and fix
duration must be an explicit integer from 4 to the model maximumduration is missing, not an integer, or outside 4–30 seconds.
unsupported model resolutionThe resolution is not supported. 2.5 offers only 480p, 720p and 1080p; 2k and 4k are not available.
frame and extension tasks require adaptive size; extension requires video1. A frame task (first_frame/last_frame) did not set "size": "adaptive";
2. An extend task did not set "size": "adaptive" or supplied no video_urls.
automatic duration and video editing are not supported"omni_reference_task_type": "edit" was sent. edit is explicitly rejected.
unsupported video reference task typeInvalid task type. 2.5 supports only auto, reference and extend.
frame inputs cannot be mixed with reference inputsFrames were mixed with ordinary references. Frame objects cannot be sent together with image_urls, video_urls or audio_urls.
unique bounded asset identifiers are requiredThe same URL appears more than once in the input arrays.

Next steps ​

Access leading AI models through one unified API