Generate videos
Video models are asynchronous. Submit a task, poll its status, then download the clip. Balance is reserved on submit and refunded automatically if the task fails.
1 · Submit a task
curl https://api.tokport.io/v1/videos \
-H "Authorization: Bearer $TOKPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seedance-2-0","prompt":"slow dolly-in on a coral reef at sunrise, sunbeams through the water","seconds":"5","ratio":"16:9"}'
# poll until status is "completed", then download
curl https://api.tokport.io/v1/videos/{id} -H "Authorization: Bearer $TOKPORT_API_KEY"
curl https://api.tokport.io/v1/videos/{id}/content -H "Authorization: Bearer $TOKPORT_API_KEY" -o clip.mp4| Field | Type | Description |
|---|---|---|
| model* | string | Model id. Always "seedance-2-0". |
| prompt* | string | What should happen in the clip: subject, motion, camera move and mood. |
| seconds | string (enum) | Clip length in seconds. Billed per clip, whatever the length.4568101215default: 5 |
| ratio | string (enum) | Frame aspect ratio.16:99:16default: 16:9 |
json — submit response
{
"id": "task_gz9n3dcAaaJ942r9iXjyLzvW7CU9W9eG",
"object": "video",
"model": "seedance-2-0",
"status": "queued",
"progress": 0,
"created_at": 1791535189
}2 · Poll for the result
curl
curl https://api.tokport.io/v1/videos/task_gz9n3dcAaaJ942r9iXjyLzvW7CU9W9eG \
-H "Authorization: Bearer $TOKPORT_API_KEY"
# -> { "id": "task_…", "object": "video", "status": "completed", "progress": 100,
# "created_at": 1791535189, "completed_at": 1791535206 }status is one of queued, in_progress, completed or failed (with an error object). Seedance 2.0 renders typically take 2–4 minutes. Poll every 5–10 seconds.
3 · Download the clip
curl
curl https://api.tokport.io/v1/videos/task_gz9n3dcAaaJ942r9iXjyLzvW7CU9W9eG/content \
-H "Authorization: Bearer $TOKPORT_API_KEY" -o clip.mp4The content route streams the MP4 bytes through the gateway. Save it: output storage upstream is not permanent.
Image to video
Same endpoint; add the first frame as image (URL or data: URL). The prompt becomes optional and describes the motion.
curl https://api.tokport.io/v1/videos \
-H "Authorization: Bearer $TOKPORT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seedance-2-0","image":"https://example.com/frame.png","prompt":"slow dolly-in on a coral reef at sunrise, sunbeams through the water","seconds":"5","ratio":"16:9"}'
# poll until status is "completed", then download
curl https://api.tokport.io/v1/videos/{id} -H "Authorization: Bearer $TOKPORT_API_KEY"
curl https://api.tokport.io/v1/videos/{id}/content -H "Authorization: Bearer $TOKPORT_API_KEY" -o clip.mp4Video models
- seedance-2-04 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- seedance-2-0-4k4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- seedance-2-0-fast4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- seedance-2-54 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- seedance-2-0-mini4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- happyhorse-1-14 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- happyhorse-1-04 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- wan3-video4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- kling-3-04 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- kling-3-0-omni4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- kling-o14 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- wan3-video-prime4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- kling-omni-4-04 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s
- minimax-h3-768p4 s / 5 s / 6 s / 8 s / 10 s / 12 s / 15 s