Seedance 2.5 API Python Tutorial: Text-to-Video, Multi-Reference & Async Polling (2026)
Tutorial · 7 min read · Updated 2026-12-03
Complete Python guide to calling ByteDance Seedance 2.5 via VideoToken: POST /v1/videos/generations (Recommended seedance-2-5 with 480p–4K & R2 delivery), Value tier switching, Idempotency-Key, and async polling.
Which Seedance 2.5 API tier should you pick on VideoToken (December 2026)?
On VideoToken (video-token.cc), use Official Recommended seedance-2-5 ($0.0677/s 480p, $0.1023/s 720p, $0.2273/s 1080p, $0.5455/s 4K) when you need Cloudflare R2 CDN delivery, 480p-to-1080p/4K Draft Mode, or zero reference-video surcharge; choose Value dreamina-seedance-2-5-cheap ($0.0485/s 480p, $0.0818/s 720p) for lowest-cost 480p/720p direct-upstream batches; or choose doubao-seedance-2-5-260628 for Ark v3 token metering with reusable POST /v1/assets.
Official Recommended (seedance-2-5): 480p $0.0677/s, 720p $0.1023/s, 1080p $0.2273/s, 4K $0.5455/s with Cloudflare R2 CDN delivery, 480p-to-1080p/4K Draft Mode, zero reference-video surcharge, and POST /v1/videos/generations. Seedance Value (dreamina-seedance-2-5-cheap): lowest 480p ($0.0485/s) & 720p ($0.0818/s) rate via POST /v1/videos with direct upstream delivery (no 1080p/4K or Draft Mode). Official Token (doubao-seedance-2-5-260628): output-token metering via Volcengine Ark v3 (/api/v3/contents/generations/tasks) with reusable POST /v1/assets.
- Recommended endpoint (seedance-2-5): POST /v1/videos/generations (HTTP 202 returning task_id) -> poll GET /v1/tasks/{task_id} (pending -> running -> succeeded / failed).
- Value endpoint (dreamina-seedance-2-5-cheap): POST /v1/videos (HTTP 200 returning id) -> poll GET /v1/videos/{id} (queued -> in_progress -> completed / failed).
- Billing safety across all tiers: funds are reserved on submit, settled on actual billable usage, and 100% refunded automatically on upstream failure.
How do you submit a Seedance 2.5 video job in Python?
Send an authenticated POST https://video-token.cc/v1/videos/generations request with model "seedance-2-5", an explicit aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4, or 21:9), integer duration (4–30s), and a unique Idempotency-Key (UUIDv4) — VideoToken returns HTTP 202 with task_id and deduplicates network retries without double-billing.
import os
import time
import uuid
import requests
BASE_URL = "https://video-token.cc"
API_KEY = os.environ["VIDEOTOKEN_API_KEY"]
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
"Idempotency-Key": str(uuid.uuid4()),
}
payload = {
"model": "seedance-2-5",
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
"generate_audio": True,
"content": [
{
"type": "text",
"text": "Slow 85mm macro push-in on a smoked-glass luxury perfume bottle on wet black basalt, warm golden caustic reflections, crisp mist, photorealistic commercial cinematography.",
}
],
}
create_resp = requests.post(f"{BASE_URL}/v1/videos/generations", json=payload, headers=headers, timeout=30)
create_resp.raise_for_status()
task_id = create_resp.json()["task_id"]
print("Submitted task:", task_id)How do you poll task status and download the Cloudflare R2 MP4?
Poll GET https://video-token.cc/v1/tasks/{task_id} every 5–10 seconds until status equals "succeeded" (then download video_url from Cloudflare R2) or "failed" (100% auto-refunded by VideoToken). Typical wall-clock latency is 1–3 minutes for 480p/720p and 3–6 minutes for 1080p/4K.
poll_headers = {"Authorization": f"Bearer {API_KEY}"}
while True:
r = requests.get(f"{BASE_URL}/v1/tasks/{task_id}", headers=poll_headers, timeout=20)
r.raise_for_status()
data = r.json()
status = data.get("status")
print("Status:", status, "Progress:", data.get("progress"))
if status == "succeeded":
video_url = data["video_url"]
print("Cloudflare R2 MP4 ready:", video_url)
video_bytes = requests.get(video_url, timeout=120).content
with open("seedance_output.mp4", "wb") as f:
f.write(video_bytes)
break
if status == "failed":
raise RuntimeError(f"Task {task_id} failed (100% auto-refunded): {data.get('error')}")
time.sleep(5)How do multi-reference uploads, Value tier switching, and GET /api/pricing work?
To run first/last frames or multi-reference scenes on seedance-2-5, append image_url (role: first_frame, last_frame, or reference_image), video_url (role: reference_video — zero extra surcharge on seedance-2-5), or audio_url (role: reference_audio) items inside content[]. Use direct anonymous HTTPS URLs without 302 redirects.
Need the lowest possible 480p/720p rate instead? Switch to model dreamina-seedance-2-5-cheap via POST /v1/videos and poll GET /v1/videos/{id} until status == completed. To inspect live USD rates before queueing a batch, call unauthenticated GET https://video-token.cc/api/pricing (returns {"data": [{"model_name": ..., "prices": [...]}]}).
Frequently Asked Questions
How much does a 5-second Seedance 2.5 720p clip cost via VideoToken?
On Official Recommended seedance-2-5 (with 480p–4K, Draft Mode, R2 CDN, and zero ref-video surcharge), 480p is $0.0677/s (~$0.34/5s) and 720p is $0.1023/s (~$0.51/5s). On Value dreamina-seedance-2-5-cheap (480p/720p upstream direct), 480p is $0.0485/s (~$0.24/5s) and 720p is $0.0818/s (~$0.41/5s).
What happens if my Python script times out while waiting for POST /v1/videos/generations?
Re-sending the exact same request with the same Idempotency-Key returns the original task_id without charging your balance twice.
Related Models
seedance-2-5 · dreamina-seedance-2-5-cheap · doubao-seedance-2-5-260628
All Guides · Seedance 2.5 Pricing · Wan 3.0 Pricing · Prompt Library · Try Online Studio