> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elkapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Seedance Video

> <ul><li>Call Doubao Seedance 2.0 video generation through ElkAPI.</li><li>Asynchronous task endpoint. Returns a task ID after submission.</li><li>Put official Seedance parameters in metadata for pass-through forwarding.</li></ul>

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/v1/video/generations' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "doubao-seedance-2-0-260128",
      "prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
      "metadata": {
        "duration": 8,
        "ratio": "16:9",
        "resolution": "720p",
        "generate_audio": true,
        "watermark": false
      }
    }'
  ```

  ```python Python theme={null} theme={null}
  import requests

  url = "https://api.elkapi.com/v1/video/generations"
  headers = {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
  }
  payload = {
      "model": "doubao-seedance-2-0-260128",
      "prompt": "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
      "metadata": {
          "duration": 8,
          "ratio": "16:9",
          "resolution": "720p",
          "generate_audio": True,
          "watermark": False
      }
  }

  response = requests.post(url, headers=headers, json=payload)
  print(response.json())
  ```

  ```javascript JavaScript theme={null} theme={null}
  const response = await fetch("https://api.elkapi.com/v1/video/generations", {
    method: "POST",
    headers: {
      "Authorization": "Bearer <token>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      model: "doubao-seedance-2-0-260128",
      prompt: "A first-person fruit tea ad, picking apples by hand, freshly cut and shaken, close-up product shots, cinematic, highly detailed",
      metadata: {
        duration: 8,
        ratio: "16:9",
        resolution: "720p",
        generate_audio: true,
        watermark: false
      }
    })
  });

  console.log(await response.json());
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null} theme={null}
  {
    "id": "task_abc123",
    "task_id": "task_abc123",
    "object": "video",
    "model": "doubao-seedance-2-0-260128",
    "status": "queued",
    "progress": 0,
    "created_at": 1760000000
  }
  ```

  ```json 400 theme={null} theme={null}
  {
    "error": {
      "message": "prompt is required",
      "type": "invalid_request_error",
      "param": "prompt",
      "code": "invalid_request"
    }
  }
  ```
</ResponseExample>

## Authorizations

<ParamField header="Authorization" type="string" required>
  All endpoints require Bearer Token authentication.

  ```
  Authorization: Bearer YOUR_API_KEY
  ```
</ParamField>

## Body

<ParamField body="model" type="string" required default="doubao-seedance-2-0-260128">
  Seedance model ID.

  Available values: `doubao-seedance-2-0-260128`, `doubao-seedance-2-0-fast-260128`
</ParamField>

<ParamField body="prompt" type="string" required>
  Text prompt. The current adapter sends this field upstream as the final `content` text item.
</ParamField>

<ParamField body="images" type="array<string>">
  Array of image URLs or Base64 strings. If you need to specify `role`, use `metadata.content` instead.
</ParamField>

<ParamField body="seconds" type="string">
  Video duration in seconds. If set, it overrides `metadata.duration`.
</ParamField>

<ParamField body="metadata" type="object">
  Parameter object passed through to the Seedance upstream. Put official Seedance fields here.
</ParamField>

<ParamField body="metadata.duration" type="integer">
  Video duration. Seedance 2.0 is usually `4` to `15` seconds; you can also pass `-1` if supported upstream.
</ParamField>

<ParamField body="metadata.ratio" type="string">
  Video aspect ratio.

  Example: `16:9`, `4:3`, `1:1`, `3:4`, `9:16`, `21:9`, `adaptive`
</ParamField>

<ParamField body="metadata.resolution" type="string">
  Resolution.

  Example: `480p`, `720p`, `1080p`
</ParamField>

<ParamField body="metadata.generate_audio" type="boolean">
  Whether to generate audio.
</ParamField>

<ParamField body="metadata.watermark" type="boolean">
  Whether to add a watermark.
</ParamField>

<ParamField body="metadata.seed" type="integer">
  Random seed.
</ParamField>

<ParamField body="metadata.content" type="array<object>">
  Multimodal reference content. Supports `image_url`, `video_url`, and `audio_url`; use the top-level `prompt` for text content.

  ```json theme={null}
  [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/reference.png"
      },
      "role": "reference_image"
    },
    {
      "type": "video_url",
      "video_url": {
        "url": "https://example.com/reference.mp4"
      },
      "role": "reference_video"
    },
    {
      "type": "audio_url",
      "audio_url": {
        "url": "https://example.com/reference.mp3"
      },
      "role": "reference_audio"
    }
  ]
  ```
</ParamField>

## Multimodal Example

<RequestExample>
  ```bash cURL theme={null} theme={null}
  curl --request POST \
    --url 'https://api.elkapi.com/v1/video/generations' \
    --header 'Authorization: Bearer <token>' \
    --header 'Content-Type: application/json' \
    --data '{
      "model": "doubao-seedance-2-0-260128",
      "prompt": "Use the first-person composition of the reference video throughout, use the reference audio as background music, and generate a fruit tea advertisement",
      "metadata": {
        "duration": 11,
        "ratio": "16:9",
        "generate_audio": true,
        "watermark": false,
        "content": [
          {
            "type": "image_url",
            "image_url": {
              "url": "https://example.com/first-frame.jpg"
            },
            "role": "reference_image"
          },
          {
            "type": "video_url",
            "video_url": {
              "url": "https://example.com/reference.mp4"
            },
            "role": "reference_video"
          },
          {
            "type": "audio_url",
            "audio_url": {
              "url": "https://example.com/music.mp3"
            },
            "role": "reference_audio"
          }
        ]
      }
    }'
  ```
</RequestExample>

## Response

<ResponseField name="id" type="string">
  Public task ID returned by ElkAPI.
</ResponseField>

<ResponseField name="task_id" type="string">
  Compatibility field. The value is the same as `id`.
</ResponseField>

<ResponseField name="object" type="string">
  Object type, fixed as `video`.
</ResponseField>

<ResponseField name="model" type="string">
  Model used by the request.
</ResponseField>

<ResponseField name="status" type="string">
  Task status. Usually `queued` after successful submission.
</ResponseField>

<ResponseField name="created_at" type="integer">
  Task creation timestamp.
</ResponseField>
