API guides

Seedance 2.5 API guide: text, image and reference to video

Call Seedance 2.5 on DreamTo: create a task, poll it, choose text, image or reference input, pick 480p to 4K and 4 to 30 seconds, and decide when Flash fits.

Oil-painted dancer made of ribbons of light, the ribbons trailing into a strip of film
On this page

Seedance 2.5 on DreamTo runs as an asynchronous task. You send a text prompt and, optionally, images, videos and audio; you get back a task ID; you poll it (or take a callback) until a video URL appears. Clips run 4 to 30 seconds, resolution goes from 480p to 4K, and sound is generated together with the picture.

This guide covers the first task, the polling loop, each input mode, resolution and duration, and when Seedance 2.5 Flash is the better call. The code runs once DREAMTO_API_KEY is set, and the facts come from our model catalog and the Seedance 2.5 docs.

Endpoint, model ID and authentication#

Seedance 2.5 is ByteDance's audio-video model, listed on DreamTo as seedance-2.5. The catalog lists up to 30 images, 10 videos and 10 audio clips as references, editing by timestamp, extension over multiple rounds, 10-bit output at 1080p and 4K, and native audio in 11 languages.

Authentication is a bearer token. Create an API key in the console, keep it on your server, and send it as Authorization: Bearer $DREAMTO_API_KEY. The base URL is https://api.dreamto.ai, and the Seedance docs use two calls:

text
POST https://api.dreamto.ai/api/v3/contents/generations/tasksGET  https://api.dreamto.ai/api/v3/contents/generations/tasks/{id}

The path includes the /api prefix; without it you get a 404. The input mode is decided by what you put in content, not by a different endpoint. The catalog also lists an OpenAI Videos-style route (POST /v1/videos) with its own field names; this guide uses the task endpoint above, which the Seedance docs describe. To try a prompt before writing code, open the playground.

Create a task and poll it#

A minimal request is a text prompt, a duration, a resolution and a ratio. The response gives you a task ID, not a video.

bash
curl -X POST "https://api.dreamto.ai/api/v3/contents/generations/tasks" \  -H "Authorization: Bearer $DREAMTO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "seedance-2.5",    "content": [      {        "type": "text",        "text": "A seaside town at dawn; the camera descends from above, glides down the street to a bakery, and the owner opens the door with a smile"      }    ],    "ratio": "16:9",    "duration": 5,    "resolution": "720p"  }'

The response carries an id with a task_ prefix and a request_id. Query the task until status is succeeded (read content.video_url) or failed (read error.message). While the task is queued or generating, the status is running. The query endpoint says succeeded; the callback body says success.

The full loop in Python, with the polling schedule the docs recommend: every 3 seconds for the first 30 seconds, every 5 seconds up to 2 minutes, then every 10.

python
import osimport timeimport requestsAPI_KEY = os.environ["DREAMTO_API_KEY"]TASKS_URL = "https://api.dreamto.ai/api/v3/contents/generations/tasks"HEADERS = {"Authorization": f"Bearer {API_KEY}"}def create_task(payload: dict) -> str:    resp = requests.post(TASKS_URL, headers=HEADERS, json=payload, timeout=60)    if resp.status_code != 200:        raise RuntimeError(f"HTTP {resp.status_code}: {resp.json()['error']['message']}")    return resp.json()["id"]def wait_for_task(task_id: str, timeout_seconds: int = 30 * 60) -> dict:    started = time.time()    while True:        elapsed = time.time() - started        task = requests.get(f"{TASKS_URL}/{task_id}", headers=HEADERS, timeout=30).json()        if task["status"] == "succeeded":            return task        if task["status"] == "failed":            raise RuntimeError(f"Task failed: {task['error']['message']}")        if elapsed > timeout_seconds:            raise TimeoutError(f"Task {task_id} not finished after {timeout_seconds} seconds")        time.sleep(3 if elapsed < 30 else 5 if elapsed < 120 else 10)def download(video_url: str, path: str) -> None:    # Direct link: do not send the Authorization header    with requests.get(video_url, stream=True, timeout=300) as resp:        resp.raise_for_status()        with open(path, "wb") as f:            for chunk in resp.iter_content(chunk_size=1 << 20):                f.write(chunk)task_id = create_task({    "model": "seedance-2.5",    "content": [{"type": "text", "text": "A seaside town at dawn; the camera descends from above, glides down the street to a bakery, and the owner opens the door with a smile"}],    "ratio": "16:9",    "duration": 5,    "resolution": "720p",})print("Task created:", task_id)task = wait_for_task(task_id)download(task["content"]["video_url"], "output.mp4")print("Saved output.mp4")

content.video_url is a direct download link, not a permanent URL: fetch it without the Authorization header and copy the file to your own storage soon after the task succeeds. Requests rejected by validation create no task and are not billed.

Callbacks instead of tight polling#

Pass a publicly reachable callback_url when you create the task and DreamTo sends a POST to it when the task succeeds or fails. Any 2xx response counts as delivered; a failed delivery is retried after 1, 5 and 30 minutes. The callback body has its own shape, different from the query response:

json
{  "event": "task.completed",  "taskId": "task_8c1d2e3f4a5b6c7d8e9f0a1b",  "status": "success",  "result": ["https://example-cdn.com/videos/2026/11/11/output.mp4"],  "errorMsg": "",  "timestamp": "2026-11-11T08:03:16Z",  "signature": "5d0c1b7e9a..."}

Retries can deliver the same task more than once, so deduplicate on taskId. Callbacks are signed with HMAC-SHA256 only when your account has a webhook signing secret; the task callback page has the signature algorithm and verification code. The docs say callbacks only speed up notification, so keep a slow poll as a fallback and treat the query endpoint as the source of truth. The image-to-video API guide applies the same pattern to image input.

Input modes and reference media#

The mode follows from what goes into content. Images, videos and audio can be public http(s) URLs, asset://<asset Id> references to the asset library, or inline Base64 data: URIs (up to 45 MB each after decoding and 64 MB for the whole request). For large videos and audio, prefer URLs.

ModeWhat you send in contentNotes
Text to videoOne text itemratio applies
Image to videotext plus one image_url with role: first_frameOutput follows the image ratio; ratio has no effect
First and last frameTwo images, first_frame and last_frameOutput follows the input ratio; ratio has no effect
Multi-image referenceSeveral image_url items with role: reference_imageRefer to them as "image 1", "image 2" in the prompt
Reference audioaudio_url with role: reference_audioRefer to it as "audio 1"; can be combined with reference images
Video editvideo_url with role: reference_video plus omni_reference_task_type: editKeeps the input video's ratio and length
Video extendvideo_url with role: reference_video plus omni_reference_task_type: extendduration is the new part only

At least one text item is required in every request, and the prompt must be 3 to 20,000 characters. In the prompt, refer to media by position ("image 1", "video 1", "audio 1"), never by asset ID. The docs give these file limits:

MediaFormatsLimits per file
Imagejpeg, png, webp, bmp, tiff, gifUp to 30 MB; sides 300 to 6000 px; aspect ratio 0.4 to 2.5
Videomp4, mov480p or 720p; 2 to 15 seconds; 24 to 60 FPS; up to 50 MB
Audiowav, mp32 to 15 seconds; up to 15 MB

seedance-2.5 accepts up to 30 images, 10 videos and 10 audio clips per request. A task that exceeds a count or file limit ends as failed.

Text to video#

The first example in this guide is this mode. With the default ratio of adaptive, the model picks a ratio for text-only prompts; set 16:9 or 9:16 yourself when the placement is already decided. The docs' prompt formula is subject plus motion, background plus motion, camera plus motion, with the camera move named (push in, pull out, orbit). See our camera movement vocabulary for terms and the Seedance 2.5 prompt guide for structure and audio.

Image to video and first-last frame#

Set the image role to first_frame and the video starts from it. Describe how the image should move, not what it shows.

json
{  "model": "seedance-2.5",  "content": [    {      "type": "text",      "text": "Slow push-in, the person smiles, hair gently moving in the breeze, cinematic lighting"    },    {      "type": "image_url",      "image_url": { "url": "https://example.com/portrait.jpg" },      "role": "first_frame"    }  ],  "duration": 5,  "resolution": "720p"}

For a transition, add a second image with role: last_frame. The docs note that the closer the two frames are in composition and subject, the smoother the transition. In both cases the output follows the image ratio and ratio has no effect.

Multi-image and audio reference#

Reference mode combines characters, objects and scenes from several images. Give each image role: reference_image; they are numbered in the order they appear, and the prompt says what each one is for.

json
{  "model": "seedance-2.5",  "content": [    {      "type": "text",      "text": "The boy with glasses in a blue T-shirt from [image 1] and the corgi from [image 2] sit on the lawn from [image 3], cartoon style"    },    { "type": "image_url", "image_url": { "url": "https://example.com/boy.png" }, "role": "reference_image" },    { "type": "image_url", "image_url": { "url": "https://example.com/dog.png" }, "role": "reference_image" },    { "type": "image_url", "image_url": { "url": "https://example.com/grass.png" }, "role": "reference_image" }  ],  "ratio": "16:9",  "duration": 5,  "resolution": "720p"}

To match the clip to the rhythm or mood of a sound, add an audio_url item with role: reference_audio and call it "audio 1" in the prompt.

Editing and extending a video#

Both modes take a reference video (role: reference_video) and an explicit omni_reference_task_type. The accepted values are auto, reference, edit and extend; when you omit the field, the mode is derived from content.

An edit keeps the ratio and length of the input video, so ratio must be adaptive and duration must be -1. Both are applied when omitted, and other values return 400 without charge.

json
{  "model": "seedance-2.5",  "content": [    {      "type": "text",      "text": "Edit video 1: turn the rain into gently falling heavy snow and cover the street in fresh white snow. Keep the original camera movement, timing and composition."    },    {      "type": "video_url",      "video_url": { "url": "https://example.com/street-rain.mp4" },      "role": "reference_video"    }  ],  "ratio": "adaptive",  "duration": -1,  "resolution": "720p",  "omni_reference_task_type": "edit"}

An extend treats duration differently: it is the length of the newly generated part. ratio must still be adaptive, because the output follows the input video. In the prompt, describe what happens next and how the camera moves. For stories longer than one pass, read Long videos with Seedance 2.5.

Resolution, duration and price#

Out-of-range values return 400 and are not billed. For seedance-2.5:

FieldDefaultAllowed
duration-1 (smart duration)Integer 4 to 30 seconds, or -1
resolution720p480p, 720p, 1080p, 4k
ratioadaptiveadaptive, 16:9, 9:16, 1:1, 4:3, 3:4, 21:9
generate_audiotruetrue, false
real_person_modetruetrue, false

duration must be a whole number. Decimals and strings are rejected, and so is frames. With real_person_mode on, real people in reference images and videos are converted to virtual likenesses before generation. Other optional fields include seed, camera_fixed (keeps the camera still), output_format (mp4 or mov) and bitrate_mode (standard or high).

Choosing a resolution#

The price is per second of output and depends on resolution and on whether the request includes a reference video. As of December 2026, with the 30% discount the catalog currently shows already applied, seedance-2.5 without a reference video costs:

ResolutionPrice per second
480p$0.10794
720p$0.242676
1080p$0.597051
4K$0.959364

4K costs close to nine times as much per second as 480p. With a reference video in the request, the catalog lists lower per-second prices at every resolution: $0.064562 at 480p, $0.145152 at 720p, $0.35721 at 1080p and $0.591948 at 4K. Prices change, so check the prices page before you budget.

The docs describe 480p as the fastest and cheapest option, suited to previews and quick iteration, and note that higher resolutions take longer. So iterate a prompt at 480p or 720p, then render the keeper at 1080p or 4K.

Fixed length or smart duration#

A fixed duration between 4 and 30 gives a predictable length. duration: -1 lets the model choose within 4 to 30 seconds and bills actual usage; the query response reports the actual length in duration. The docs' smart-duration example adds callback_url, a fixed seed to help reproduce a result, and return_last_frame: true, which returns content.last_frame_url for use as the first frame of the next clip.

bash
curl -X POST "https://api.dreamto.ai/api/v3/contents/generations/tasks" \  -H "Authorization: Bearer $DREAMTO_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "seedance-2.5",    "content": [      {        "type": "text",        "text": "Waves crash on the rocks at sunset; the camera slowly moves from a wide shot to a close-up of the spray"      }    ],    "ratio": "16:9",    "duration": -1,    "resolution": "1080p",    "seed": 20261111,    "return_last_frame": true,    "callback_url": "https://your-server.example.com/dreamto/callback"  }'

When to use Seedance 2.5 Flash#

Seedance 2.5 Flash (seedance-2.5-flash) is the faster, lower-cost tier of the 2.5 series. The catalog describes it as about twice as quick as the flagship, covering the same task types: text to video, first and first-last frame, omni reference, editing and extension. Clips still run 4 to 30 seconds with synchronized audio.

What you give up is resolution and reference capacity:

Seedance 2.5Seedance 2.5 Flash
Model IDseedance-2.5seedance-2.5-flash
Resolution480p, 720p, 1080p, 4k480p, 720p
Reference images3010
Reference videos105
Reference audio105
real_person_modeSupportedNot supported

Flash rejects five fields that the flagship accepts: camera_fixed, real_person_mode, draft, bitrate_mode and task_nickname return 400 with <field> is not supported by this model. Strip them when you copy a request body from the flagship.

The catalog positions Flash for review rounds: comparing shot ideas, testing alternate openings, exploring several shots in parallel, and previewing landscape and portrait framings. As of December 2026, with the same 30% discount applied, Flash costs $0.070615 per second at 480p and $0.15876 at 720p without a reference video, against $0.10794 and $0.242676 for the flagship. See /prices for the current figures.

One way to split the work: explore with Flash, then render the final with seedance-2.5 when you need 1080p, 4K or the larger reference limits. For the differences from the previous generation, see Seedance 2.5 vs Seedance 2.0.

Error codes and failed tasks#

Errors arrive with an HTTP status and an error object holding code, message, type, http_status and request_id; validation errors add param, the offending field. Branch on the status and error.code, not on the message text.

HTTPerror.codeTypical cause
400invalid_parameterValidation failed, including undocumented fields
401unauthorizedMissing or invalid API key
402insufficient_balanceBalance too low
404not_foundTask missing or created with another API key; model unknown or not enabled
429rate_limit_exceededToo many requests
500api_errorInternal error; retry later
502, 503, 504service_unavailableTemporarily unavailable; retry later

Retry 429 and 5xx with exponential backoff; other 4xx errors need a corrected request.

A task that fails during generation is different: the query endpoint returns HTTP 200 with status: failed and an error.code of task_failed. The errors page has the full table, and the shared Seedance guide covers what the Seedance models have in common.

To compare Seedance 2.5 with other video models before you commit, see How to choose an AI video API, or browse all models.

FAQ#

How long can a Seedance 2.5 video be?#

A single task runs 4 to 30 seconds. Set duration to a whole number in that range, or to -1 to let the model choose. For longer pieces, extend a clip with omni_reference_task_type: extend.

Does Seedance 2.5 support 4K output?#

Yes. resolution accepts 480p, 720p, 1080p and 4k on seedance-2.5, with 10-bit output at 1080p and 4K. Seedance 2.5 Flash accepts 480p and 720p only.

How do I get the video after creating a task?#

Poll GET /api/v3/contents/generations/tasks/{id} until status is succeeded, then read content.video_url. You can also pass callback_url at creation to receive a POST when the task finishes. Download the file soon: the URL is not permanent.

Can I generate a video without audio?#

Yes. Audio is generated by default; set generate_audio to false for a silent video.

What is the difference between Seedance 2.5 and Seedance 2.5 Flash?#

Flash is the faster, lower-cost tier: 480p and 720p only, with up to 10 images, 5 videos and 5 audio clips as references. The flagship adds 1080p and 4K and takes up to 30 images, 10 videos and 10 audio clips. Both support text, image, reference, edit and extend modes.

Am I charged if my request is rejected?#

No. Requests that fail validation return HTTP 400, create no task and are not billed.

  • Seedance 2.5
  • Video API
  • Text to Video