Seedance 2.0
Generate video from text, ordered frames, or mixed references with output-token billing.
The public model ID is seedance-2.0. It supports 480p, 720p, 1080p, and 4k; omitting input.resolution defaults to 480p. The API neither accepts nor returns the internal upstream model ID.
The Seedance 2.0 family is available only through Official API Relay. Authorize the relevant model for your API key in the console before creating an asynchronous media task.
Generation modes
| Mode | task | Input requirement |
|---|---|---|
| Text-to-video | Txt2Video | Non-empty input.prompt; image, video, and audio arrays must be empty |
| Image-to-video | Img2Video | One publicly accessible URL in input.images |
| First/last-frame video | Img2Video | Two URLs in input.images, ordered as first frame then last frame |
| Omni reference | OmniVideo | At least one item across input.images, input.videos, or input.audios |
Reference media must be non-empty URL strings. Convert local files or Base64 input to public URLs with file uploads first. When creating an image-to-video or omni-reference task, the platform accepts the request immediately, then uploads these URLs to the upstream asset library and creates the video task in the background. Callers do not need to obtain or submit asset:// addresses.
Request parameters
| Parameter | Required | Description |
|---|---|---|
task | Yes | Txt2Video, Img2Video, or OmniVideo |
model | Yes | Fixed to seedance-2.0 on this page |
input.prompt | For text mode | Content description; must be non-empty for text-to-video |
input.images | By mode | One image for image-to-video, two for first/last frame; at most 9 for omni reference |
input.videos | No | Up to 3 omni-reference videos; non-empty input selects the “with video input” price |
input.audios | No | Up to 3 omni-reference audio files |
input.resolution | No | 480p, 720p, 1080p, or 4k; defaults to 480p |
input.aspect_ratio | No | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9, or adaptive; omitted means not forwarded |
input.duration | No | Positive seconds; defaults to 5; available durations depend on the current model service |
input.generate_audio | No | Boolean requesting output audio; distinct from audios, which supplies reference audio |
input.pass_through | No | Extensions supported by the current upstream; undocumented fields are not guaranteed stable |
callback_url | No | Optional public HTTPS webhook. See Media task callbacks. |
callback_url is not forwarded upstream. Polling with the platform task ID still works.
Request examples
Each JSON object below is a request body for POST /v1/router/task/create. Authenticate with Authorization: Bearer sk-YOUR_KEY or x-api-key: sk-YOUR_KEY.
Text-to-video
{
"task": "Txt2Video",
"model": "seedance-2.0",
"input": {
"prompt": "a cinematic mountain sunrise with clouds moving slowly",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "1080p",
"generate_audio": true
}
}Image-to-video
{
"task": "Img2Video",
"model": "seedance-2.0",
"input": {
"prompt": "make the clouds move slowly as the camera glides forward",
"images": ["https://assets.example.com/input.png"],
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "720p"
}
}First/last-frame video
The first item in input.images is the first frame, and the second item is the last frame.
{
"task": "Img2Video",
"model": "seedance-2.0",
"input": {
"prompt": "transition naturally from morning to sunset",
"images": ["https://assets.example.com/first.png", "https://assets.example.com/last.png"],
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "720p"
}
}Omni reference
This request combines image, video, and audio references. You can also send only one or two media types, provided that at least one of the three arrays is non-empty.
{
"task": "OmniVideo",
"model": "seedance-2.0",
"input": {
"prompt": "follow the reference camera motion, use the reference audio as background music, and preserve the product appearance",
"images": ["https://assets.example.com/product.png"],
"videos": ["https://assets.example.com/camera-motion.mp4"],
"audios": ["https://assets.example.com/background-music.mp3"],
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "480p",
"pass_through": {}
}
}Asynchronous task queries and responses
A successful create response immediately returns a platform tsk_* task ID. Other success fields are not a stable contract. Reference uploads and upstream video-task creation continue in the background. Poll GET /v1/router/tasks/{task_id} every 3–5 seconds. An API key can query only tasks owned by the same buyer.
{ "code": 200, "message": "success", "task_id": "tsk_0f3c9a72b1e04d5f" }The query has no request body. Use an API key authorized to access the task and place the platform task ID from the create response in the path. The query also accepts the x-api-key header:
GET https://hopsapi.com/v1/router/tasks/tsk_0f3c9a72b1e04d5f
Authorization: Bearer sk-YOUR_KEY{ "task_id": "tsk_0f3c9a72b1e04d5f", "status": 1, "results": [] }| Status | Meaning |
|---|---|
0 | Queued |
1 | Processing; unbillable usage or insufficient balance also remains here |
2 | Successful and settled; the video URL and buyer-facing cost are available |
3 | Failed; not charged |
4 | Cancelled; not charged |
{
"task_id": "tsk_0f3c9a72b1e04d5f",
"status": 2,
"result": {
"content": { "video_url": "https://static.example.com/video.mp4" },
"resolution": "720p",
"usage": { "total_tokens": 50638 }
},
"cost": 42.54
}Querying a stored failed terminal task still returns HTTP 200; the response body uses business error code=424 and includes a traceable request ID without raw provider diagnostics.
{
"code": 424,
"message": "Provider error (request id: aitk-...)",
"task_id": "tsk_0f3c9a72b1e04d5f",
"status": 3,
"fail_reason": "Provider error (request id: aitk-...)",
"error_message": "Provider error (request id: aitk-...)"
}Token pricing
| Resolution | No video input | With video input |
|---|---|---|
480p, 720p | $7.0 / 1M tokens | $4.3 / 1M tokens |
1080p | $7.7 / 1M tokens | $4.7 / 1M tokens |
4k | $4.0 / 1M tokens | $2.4 / 1M tokens |
The terminal result.resolution selects the tier, falling back to the request resolution when absent. Token count uses a positive integer result.usage.total_tokens first, then completion_tokens. The query response cost is the actual credits charged after applying the account pricing coefficient.
Token tasks are not prepaid. If usage is missing, not a positive integer, or the balance is insufficient, the platform withholds video_url, keeps the task at status=1, and retries settlement. Failed or cancelled tasks are not charged.
Parameter errors
- Unsupported
task, an empty text prompt, malformed media arrays, or unsupported resolution returns HTTP400without calling upstream. Img2Videorequires one or two images;OmniVideorequires at least one reference item and accepts at most 9 images, 3 videos, and 3 audio files.- If any background reference upload fails or times out, the task enters terminal
status=3; the upstream video task is not submitted and no credits are charged. Query the platform task ID to read the neutral provider error. - An unauthorized or unavailable model, including an internal upstream model name, returns HTTP
403.
Fast and Mini use the same workflow and modes but have different public IDs, resolutions, and prices. See Seedance 2.0 Fast and Seedance 2.0 Mini.