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

# Create Video

> Submit a Seedance 2.0 multimodal video generation task using `POST /v1/video/generations`.

# Create Video

Submit a Seedance 2.0 video generation task. It supports text-to-video, first-frame/first-and-last-frame, reference image/video/audio, video continuation, video editing, and multimodal composition modes. For assets in the media library, it is recommended to reference them in `content` using `asset://{assetId}` (see [Upload Assets](./asset-create-media)).

## Method and Path

```http theme={null}
POST /v1/video/generations
```

## Request Examples

<CodeGroup>
  ```json Text to Video theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "First-person view fruit tea ad: 0-2s picking apples by hand; 2-4s cut to pouring into a shaker cup and shaking; 4-6s close-up of pouring into a clear cup; 6-8s raise the cup toward the camera"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/apple.jpg" },
        "role": "reference_image"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/cup.jpg" },
        "role": "reference_image"
      },
      {
        "type": "video_url",
        "video_url": { "url": "https://example.com/pov_reference.mp4" },
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": { "url": "https://example.com/bgm.mp3" },
        "role": "reference_audio"
      }
    ],
    "metadata": {
      "duration": 8,
      "resolution": "720p",
      "ratio": "16:9",
      "generate_audio": true,
      "watermark": false
    }
  }
  ```

  ```json First-Frame Image to Video theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "Animate naturally from the first frame"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/first.jpg" },
        "role": "first_frame"
      }
    ],
    "metadata": {
      "duration": 10,
      "resolution": "720p",
      "ratio": "adaptive"
    }
  }
  ```

  ```json First-and-Last-Frame Image to Video theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "Smooth transition from first frame to last frame"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/first.jpg" },
        "role": "first_frame"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/last.jpg" },
        "role": "last_frame"
      }
    ],
    "metadata": {
      "duration": 5,
      "resolution": "720p",
      "ratio": "16:9"
    }
  }
  ```

  ```json Reference Image to Video theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "The subject walks forward naturally"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/character.jpg" },
        "role": "reference_image"
      }
    ],
    "metadata": {
      "duration": 10,
      "resolution": "720p",
      "ratio": "16:9"
    }
  }
  ```

  ```json Video Continuation theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "Continue the motion and style of the source video"
      },
      {
        "type": "video_url",
        "video_url": { "url": "https://example.com/source.mp4" },
        "role": "reference_video"
      }
    ],
    "metadata": {
      "duration": 8,
      "resolution": "720p",
      "ratio": "adaptive"
    }
  }
  ```

  ```json Video Editing theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "Replace product in video with product in image"
      },
      {
        "type": "video_url",
        "video_url": { "url": "https://example.com/source.mp4" },
        "role": "reference_video"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/product.jpg" },
        "role": "reference_image"
      }
    ],
    "metadata": {
      "duration": 8,
      "resolution": "720p",
      "ratio": "16:9",
      "return_last_frame": true
    }
  }
  ```

  ```json Multimodal Composition theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "First-person view fruit tea ad"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/apple.jpg" },
        "role": "reference_image"
      },
      {
        "type": "image_url",
        "image_url": { "url": "https://example.com/cup.jpg" },
        "role": "reference_image"
      },
      {
        "type": "video_url",
        "video_url": { "url": "https://example.com/pov_reference.mp4" },
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": { "url": "https://example.com/bgm.mp3" },
        "role": "reference_audio"
      }
    ],
    "metadata": {
      "duration": 8,
      "resolution": "720p",
      "ratio": "16:9",
      "generate_audio": true,
      "watermark": false
    }
  }
  ```

  ```json Reference Assets theme={null}
  {
    "model": "doubao-seedance-2-0-260128",
    "content": [
      {
        "type": "text",
        "text": "First-person view fruit tea ad: 0-2s picking apples by hand; 2-4s cut to pouring into a shaker cup and shaking; 4-6s close-up of pouring into a clear cup; 6-8s raise the cup toward the camera"
      },
      {
        "type": "image_url",
        "image_url": { "url": "asset://asset-xxx" },
        "role": "reference_image"
      },
      {
        "type": "image_url",
        "image_url": { "url": "asset://asset-xxx" },
        "role": "reference_image"
      },
      {
        "type": "video_url",
        "video_url": { "url": "asset://asset-xxx" },
        "role": "reference_video"
      },
      {
        "type": "audio_url",
        "audio_url": { "url": "asset://asset-xxx" },
        "role": "reference_audio"
      }
    ],
    "metadata": {
      "duration": 8,
      "resolution": "720p",
      "ratio": "16:9",
      "generate_audio": true,
      "watermark": false
    }
  }
  ```
</CodeGroup>

## Response Examples

<ResponseExample>
  ```json 200 theme={null}
  {
    "task_id": "cgt-20260412163502-x8k2m"
  }
  ```

  ```json 400 theme={null}
  {
    "error": {
      "code": "InvalidParameter",
      "message": "the parameter duration specified in the request is not valid",
      "type": "new_api_error"
    }
  }
  ```

  ```json 401 theme={null}
  {
    "error": {
      "code": "Unauthorized",
      "message": "Invalid API key provided",
      "type": "new_api_error"
    }
  }
  ```

  ```json 403 theme={null}
  {
    "error": {
      "code": "Forbidden",
      "message": "access denied",
      "type": "new_api_error"
    }
  }
  ```

  ```json 429 theme={null}
  {
    "error": {
      "code": "RateLimitExceeded",
      "message": "当前请求频率过高，请稍后再试",
      "type": "new_api_error"
    }
  }
  ```

  ```json 500 theme={null}
  {
    "error": {
      "code": "InternalError",
      "message": "internal server error",
      "type": "new_api_error"
    }
  }
  ```
</ResponseExample>

After submission, use [Query Task](./query) to poll `task_id`.

## Authentication

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Body

<ParamField body="model" type="string" required>
  Model name:

  * `doubao-seedance-2-0-260128`: Standard version, optimized for the best visual quality and complex shot planning
  * `doubao-seedance-2-0-fast-260128`: Fast version, optimized for low latency and cost-sensitive scenarios
</ParamField>

<ParamField body="content" type="array<object>" required>
  Multimodal input array; the order affects role assignment.
</ParamField>

<ParamField body="content[].type" type="string" required>
  Content type: `text`, `image_url`, `video_url`, `audio_url`, `draft_task`.
</ParamField>

<ParamField body="content[].text" type="string">
  Required when `type=text`; prompt text.
</ParamField>

<ParamField body="content[].image_url" type="object">
  Used when `type=image_url`; must include `url`.
</ParamField>

<ParamField body="content[].image_url.url" type="string" required>
  Public image URL or asset reference `asset://{assetId}`.
</ParamField>

<ParamField body="content[].video_url" type="object">
  Used when `type=video_url`; must include `url`.
</ParamField>

<ParamField body="content[].video_url.url" type="string" required>
  Public video URL or `asset://{assetId}`.
</ParamField>

<ParamField body="content[].audio_url" type="object">
  Used when `type=audio_url`; must include `url`.
</ParamField>

<ParamField body="content[].audio_url.url" type="string" required>
  Public audio URL or `asset://{assetId}`.
</ParamField>

<ParamField body="content[].draft_task" type="object">
  Used when `type=draft_task`; must include `id`, and it must be the only element in `content`.
</ParamField>

<ParamField body="content[].draft_task.id" type="string" required>
  Draft task ID, used to continue generation from a draft.
</ParamField>

<ParamField body="content[].role" type="string">
  Media role:

  * `first_frame`: first frame (image)
  * `last_frame`: last frame (image)
  * `reference_image`: reference image
  * `reference_video`: reference/source video (continuation, editing)
  * `reference_audio`: reference audio (requires `metadata.generate_audio=true`)
</ParamField>

<ParamField body="metadata" type="object">
  Video generation parameters; all are optional.
</ParamField>

<ParamField body="metadata.duration" type="integer">
  Video duration in seconds. Valid range `[4, 15]` or `-1` (automatically determined by the model), default `5`.
</ParamField>

<ParamField body="metadata.resolution" type="string">
  Resolution: `480p`, `720p`, `1080p`, default `720p`.
</ParamField>

<ParamField body="metadata.ratio" type="string">
  Aspect ratio: `16:9`, `9:16`, `1:1`, `4:3`, `adaptive`, default `16:9`.
</ParamField>

<ParamField body="metadata.frames" type="integer">
  Total number of video frames. Mutually exclusive with `duration`; if `frames` is provided, it takes precedence over `duration`.
</ParamField>

<ParamField body="metadata.seed" type="integer">
  Random seed. The same `seed` plus the same input can produce similar results.
</ParamField>

<ParamField body="metadata.camera_fixed" type="boolean">
  Whether to keep the camera fixed (suppress camera movement), default `false`.
</ParamField>

<ParamField body="metadata.watermark" type="boolean">
  Whether to add a watermark in the bottom-right corner of the video, default `true`.
</ParamField>

<ParamField body="metadata.generate_audio" type="boolean">
  Whether to generate or synthesize audio. Must be `true` when using `reference_audio`, default `false`.
</ParamField>

<ParamField body="metadata.return_last_frame" type="boolean">
  Whether to return the final frame image URL for subsequent continuation, default `false`.
</ParamField>

<ParamField body="metadata.draft" type="boolean">
  Draft mode: faster generation with slightly lower quality, suitable for previews, default `false`.
</ParamField>

<ParamField body="metadata.service_tier" type="string">
  Service tier, default `default`.
</ParamField>

<ParamField body="metadata.execution_expires_after" type="integer">
  Maximum task execution time in seconds, range `[3600, 259200]` (1 hour to 3 days), default `172800`.
</ParamField>

<ParamField body="metadata.callback_url" type="string">
  Callback URL when the task is completed.
</ParamField>

## content Mixing Rules

Violating the following rules may return `400`:

* `reference_image` cannot appear together with `first_frame` / `last_frame`
* `audio_url` cannot be the only input in `content`; it must be paired with at least an image or video
* `draft_task` must be the only element in the `content` array

## Generation Mode Comparison

| Mode                                | Request Example Label               | `content` Key Points                           |
| ----------------------------------- | ----------------------------------- | ---------------------------------------------- |
| Text to Video                       | Text to Video                       | `text` + optional reference image/video/audio  |
| First-Frame Image to Video          | First-Frame Image to Video          | `text` + `first_frame`                         |
| First-and-Last-Frame Image to Video | First-and-Last-Frame Image to Video | `text` + `first_frame` + `last_frame`          |
| Reference Image to Video            | Reference Image to Video            | `text` + `reference_image`                     |
| Video Continuation                  | Video Continuation                  | `text` + `reference_video`                     |
| Video Editing                       | Video Editing                       | `text` + `reference_video` + `reference_image` |
| Multimodal Composition              | Multimodal Composition              | `text` + multiple types of references          |
| Reference Assets                    | Reference Assets                    | Each URL uses `asset://{assetId}`              |

## Response

<ResponseField name="task_id" type="string">
  Task ID, used for [Query Task](./query).
</ResponseField>

## Related Pages

* [Seedance-2 Overview](./overview)
* [Query Task](./query)
* [Upload Assets](./asset-create-media)
