RelayDanceRelayDance
HomeModelsPricingDocsGet API Key

Docs / API Reference / Generate Video

POST/v1/video/generations

Generate 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

ParameterTypeRequiredDescription
modelstringYesVideo model ID, e.g. doubao-seedance-2-0-1080p
promptstringYesText description. With reference images, cite them as @image1 to @imageN
secondsstringNoClip length in seconds as a string (e.g. "5", "10"); maximum is model-dependent
metadataobjectNoVendor parameters, see below

#metadata fields

FieldTypeDescription
ratiostringAspect ratio, e.g. "16:9", "9:16", "1:1"
resolutionstring"480p" | "720p" | "1080p" (model-dependent)
generate_audiobooleanGenerate a soundtrack (Seedance 2.0 models)
callback_urlstringWebhook URL; the final task state is POSTed here when the task finishes
contentarrayReference media entries, see below

#metadata.content[] entries

content-entry.jsonjson
{
  "type": "image_url",
  "image_url": { "url": "https://example.com/ref.jpg" },
  "role": "reference_image"
}
typePayload fieldroleLimit
image_urlimage_url.urlreference_imageUp to 9 per request
video_urlvideo_url.urlreference_videoUp to 3 per request
audio_urlaudio_url.urlreference_audioUp 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.