Docs / API Reference / Generate Video
POST
/v1/video/generationsGenerate Video
Submit an asynchronous video generation task. The call returns a task_id immediately; fetch the result via Get Video Task or receive it on a webhook via metadata.callback_url.
#Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Video model ID, e.g. doubao-seedance-2-0-1080p |
prompt | string | Yes | Text description. With reference images, cite them as @image1 to @imageN |
seconds | string | No | Clip length in seconds as a string (e.g. "5", "10"); maximum is model-dependent |
metadata | object | No | Vendor parameters, see below |
#metadata fields
| Field | Type | Description |
|---|---|---|
ratio | string | Aspect ratio, e.g. "16:9", "9:16", "1:1" |
resolution | string | "480p" | "720p" | "1080p" (model-dependent) |
generate_audio | boolean | Generate a soundtrack (Seedance 2.0 models) |
callback_url | string | Webhook URL; the final task state is POSTed here when the task finishes |
content | array | Reference media entries, see below |
#metadata.content[] entries
content-entry.jsonjson
{
"type": "image_url",
"image_url": { "url": "https://example.com/ref.jpg" },
"role": "reference_image"
}| type | Payload field | role | Limit |
|---|---|---|---|
image_url | image_url.url | reference_image | Up to 9 per request |
video_url | video_url.url | reference_video | Up to 3 per request |
audio_url | audio_url.url | reference_audio | Up to 3 per request |
Reference images are cited in the prompt as
@image1 to @imageN in content[] order, and are mutually exclusive with first/last-frame mode. callback_url goes inside metadata, never top-level.#Example: text-to-video
terminalbash
curl https://relaydance.com/v1/video/generations \
-H "Authorization: Bearer $RELAYDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "doubao-seedance-2-0-1080p",
"prompt": "A timelapse of storm clouds rolling over a mountain range",
"seconds": "10",
"metadata": {
"ratio": "16:9",
"resolution": "1080p",
"generate_audio": true
}
}'#Example: with a reference image
terminalbash
curl https://relaydance.com/v1/video/generations \
-H "Authorization: Bearer $RELAYDANCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "seedance-1-5-pro-with-audio",
"prompt": "@image1 rotates slowly on a marble pedestal, studio lighting",
"seconds": "5",
"metadata": {
"ratio": "1:1",
"resolution": "720p",
"content": [
{
"type": "image_url",
"image_url": { "url": "https://example.com/product.jpg" },
"role": "reference_image"
}
]
}
}'#Response
response.jsonjson
{
"task_id": "task_abc123",
"status": "submitted"
}Failed tasks are not billed. Model IDs are listed on the Video Generation page and via
GET /v1/models.