Skip to content

Seedance 2.5 video generation ​

seedance2.5 handles text-to-video and video generation driven by reference media: images, video and audio. Use the async task API: create a task, then check progress with its task ID.

Before you start ​

Use the dedicated group

When you create the API key, pick the Image & Video group (图片视频专用分组). Seedance 2.5 bills per generated second, with a reference price of $0.057 / second.

For example, a 4-second clip costs about $0.23. Models and prices may change. The console and live pricing are the source of truth.

Async flow ​

StepMethod and pathNotes
1. Create a taskPOST /v1/videosReturns the task id and a queued status
2. Check the taskGET /v1/videos/{id}Poll every 10–15 seconds
3. Get the videovideo_url in the responseDownload it once completed

Don't count on a synchronous wait

In our tests, adding wait: true to the create request still returns a queued async task. Save the id and poll, so you avoid long-connection timeouts and accidentally submitting (and paying for) duplicate tasks.

Create a text-to-video task ​

bash
curl https://ai.flashapi.top/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance2.5",
    "prompt": "a cute kitten playing with a ball of yarn, cinematic lighting",
    "size": "1280x720",
    "seconds": "4",
    "generate_audio": false
  }'

Create an image-to-video task ​

The reference image can be a publicly reachable URL or a data: base64 string. For multiple images, use the images array.

bash
curl https://ai.flashapi.top/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance2.5",
    "prompt": "slow cinematic push-in, drifting clouds, golden hour",
    "size": "1280x720",
    "seconds": "4",
    "input_reference": "https://example.com/reference.jpg"
  }'

Request parameters ​

ParameterTypeRequiredDescription
modelstringYesAlways seedance2.5
promptstringConditionalDescribe the content, camera work and style. Required when content isn't provided
secondsstringNoDuration as a string, "4"–"30". Defaults to "4"
durationintegerNoDuration as an integer, 4–30. Use either this or seconds
sizestringNoWIDTHxHEIGHT, e.g. 1280x720
ratiostringNoauto, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. Overrides the aspect ratio from size
resolutionstringNo480p or 720p
generate_audiobooleanNoWhether to generate audio. Defaults to true
seedintegerNoRandom seed. -1 means random
input_referencestring / arrayNoReference media URL or data: base64
imagesstring / arrayNoReference images, up to 30
contentarrayNoMultimodal content. Can replace the top-level prompt and reference media

Multimodal references ​

content accepts text, image_url, video_url and audio_url. Up to 30 images, 10 videos and 10 audio clips.

json
{
  "model": "seedance2.5",
  "seconds": "4",
  "ratio": "16:9",
  "resolution": "720p",
  "content": [
    {"type": "text", "text": "gentle camera push-in, soft morning light"},
    {
      "type": "image_url",
      "image_url": {"url": "https://example.com/reference.jpg"}
    }
  ]
}

Reference URLs must be publicly reachable and allow server-side downloads. If they aren't, switch to data: base64 or a directly accessible object storage URL.

Create-task response ​

json
{
  "id": "video_976521f793cf4d80a7b1a091",
  "object": "video",
  "model": "seedance2.5",
  "status": "queued",
  "progress": 0,
  "seconds": "4",
  "size": "1280x720",
  "created_at": 1785248785
}

Check a task ​

bash
curl https://ai.flashapi.top/v1/videos/video_976521f793cf4d80a7b1a091 \
  -H "Authorization: Bearer YOUR_API_KEY"

In progress:

json
{
  "id": "video_976521f793cf4d80a7b1a091",
  "object": "video",
  "status": "in_progress",
  "progress": 35,
  "seconds": "4"
}

Completed:

json
{
  "id": "video_976521f793cf4d80a7b1a091",
  "object": "video",
  "status": "completed",
  "progress": 100,
  "seconds": "4",
  "video_url": "https://example-cdn.com/generated-video.mp4",
  "completed_at": 1785249046,
  "usage": {"seconds": 4, "video_count": 1}
}

Failed:

json
{
  "id": "video_976521f793cf4d80a7b1a091",
  "status": "failed",
  "error": {
    "code": "generation_failed",
    "message": "content moderated"
  }
}
StatusMeaning
queuedIn the queue
in_progress / processingRendering. Read progress if present
completedDone. Read video_url
failedFailed. Check error.message

Full Python example ​

python
import os
import time

import requests

api_key = os.environ["FLASH_API_KEY"]
base_url = "https://ai.flashapi.top"
headers = {"Authorization": f"Bearer {api_key}"}

created = requests.post(
    f"{base_url}/v1/videos",
    headers=headers,
    json={
        "model": "seedance2.5",
        "prompt": "a red hot air balloon over green mountains at sunrise",
        "size": "1280x720",
        "seconds": "4",
        "generate_audio": False,
    },
    timeout=60,
)
created.raise_for_status()
task_id = created.json()["id"]
deadline = time.monotonic() + 20 * 60

while time.monotonic() < deadline:
    try:
        response = requests.get(
            f"{base_url}/v1/videos/{task_id}", headers=headers, timeout=30
        )
        response.raise_for_status()
        task = response.json()
    except requests.RequestException:
        time.sleep(12)
        continue

    if task["status"] == "completed":
        print(task["video_url"])
        break

    if task["status"] == "failed":
        raise RuntimeError(task.get("error", "Video generation failed"))

    time.sleep(12)
else:
    raise TimeoutError(f"Task {task_id} didn't finish within 20 minutes; you can keep polling later")

Troubleshooting ​

SymptomFix
Reference media returns HTTP 403The host blocks server-side downloads. Use a directly reachable URL or data: base64
content moderatedAdjust the prompt or reference media and retry
Upstream rate limit or DataDome 429Wait for the channel to recover, then retry. Don't keep creating new tasks
Network error while pollingKeep polling with the same task ID. Don't recreate the task

Notes ​

  • Poll every 10–15 seconds, with an overall timeout of at least 20 minutes.
  • 720p is the highest supported resolution. Higher values may be downgraded to 720p.
  • Use video_url once the task completes. Don't rely on /v1/videos/{id}/content for now.
  • Cost depends on the requested duration, so test with 4 seconds first.

Next steps ​

One base URL for GPT, Claude and Gemini