> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-chore-sync-comfy-api-v2-spec.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Dreamina Seedance 2.0 260128 with Comfy Router

> Call byteplus/dreamina-seedance-2-0-260128 through Comfy Router: endpoint, request shape and the response Router returns.

API Reference for `byteplus/dreamina-seedance-2-0-260128`, served by Comfy Router from BytePlus.

## Quick start

Create a key at [platform.comfy.org/profile/api-keys](https://platform.comfy.org/profile/api-keys) and export it as `COMFY_API_KEY`. The Python and TypeScript snippets use the Comfy SDKs (`pip install comfy-sdk`, `npm install @comfyorg/sdk`); the cURL snippet is the same call over raw HTTP.

**Model ID:** `byteplus/dreamina-seedance-2-0-260128`

**Endpoint:** `POST https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128`

<CodeGroup>
  ```python Python theme={null}
  from comfy_sdk import Comfy

  # Reads COMFY_API_KEY from the environment. Each call sends a fresh
  # Idempotency-Key and waits up to 10 minutes for the finished result.
  with Comfy() as client:
      result = client.models.run(
          "byteplus/dreamina-seedance-2-0-260128",
          {
              "content": [
                  {
                      "text": "A red fox trotting through a snowy pine forest",
                      "type": "text",
                  },
              ],
              "duration": 5,
              "ratio": "16:9",
              "resolution": "720p",
          },
      )

  print(result)
  ```

  ```typescript TypeScript theme={null}
  import { comfy } from "@comfyorg/sdk";

  // Reads COMFY_API_KEY from the environment. Each call sends a fresh
  // Idempotency-Key and waits up to 10 minutes for the finished result.
  const { data } = await comfy.models.run("byteplus/dreamina-seedance-2-0-260128", {
    content: [
      {
        text: "A red fox trotting through a snowy pine forest",
        type: "text",
      },
    ],
    duration: 5,
    ratio: "16:9",
    resolution: "720p",
  });

  console.log(data);
  ```

  ```bash cURL theme={null}
  curl https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128 \
    -H "X-API-Key: $COMFY_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)" \
    -H "Content-Type: application/json" \
    -d "{\"content\": [{\"text\":\"A red fox trotting through a snowy pine forest\",\"type\":\"text\"}], \"duration\": 5, \"ratio\": \"16:9\", \"resolution\": \"720p\"}"
  ```
</CodeGroup>

## Schema

### Input

<ParamField body="callback_url" type="string (uri)">
  Callback notification address for the result of this generation task

  Format: `uri`
</ParamField>

<ParamField body="content" type="object | object | object | object[]" required>
  The input content for the model to generate a video
</ParamField>

<ParamField body="content[].audio_url" type="object">
  Input audio object. Only Seedance 2.5, 2.0 & 2.0 fast support audio input. Seedance 2.0 & 2.0 fast cannot use audio alone - they must include at least 1 image or video; Seedance 2.5 supports audio-only input.
</ParamField>

<ParamField body="content[].audio_url.url" type="string" required>
  Audio URL, Base64 encoding, or Asset ID.
  Audio URL: Public URL of the audio (wav, mp3).
  Base64: Format data:audio/\<format>;base64,\<content>
  Asset ID: Format asset://\<ASSET\_ID>
</ParamField>

<ParamField body="content[].image_url" type="object" />

<ParamField body="content[].image_url.url" type="string" required>
  Image content for image-to-video generation (when type is "image\_url")
  Image URL: Make sure that the image URL is accessible.
  Base64-encoded content: Format must be data:image/\<format>;base64,\<content>
  Asset ID: Format asset://\<ASSET\_ID>
</ParamField>

<ParamField body="content[].role" type="string">
  The role/position of the content item.
  For images: first\_frame, last\_frame, or reference\_image.
  For videos: reference\_video (Seedance 2.5, 2.0 & 2.0 fast only).
  For audio: reference\_audio (Seedance 2.5, 2.0 & 2.0 fast only).

  Possible values: `first_frame`, `last_frame`, `reference_image`, `reference_video`, `reference_audio`
</ParamField>

<ParamField body="content[].text" type="string">
  The input text information for the model. Includes text prompt and optional parameters.

  Text prompt (required): Description of the video to be generated using Chinese and English characters.

  Parameters (optional): Add --\[parameters] after the text prompt to control video specifications:

  * \--resolution (--rs): 480p, 720p, 1080p (default: 720p)
  * \--ratio (--rt): 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21, adaptive (default: 16:9 or adaptive)
  * \--duration (--dur): 3-12 seconds (default: 5)
  * \--framepersecond (--fps): 24 (default: 24)
  * \--watermark (--wm): true/false (default: false)
  * \--seed (--seed): -1 to 2^32-1 (default: -1)
  * \--camerafixed (--cf): true/false (default: false)

  Example: "A beautiful landscape --ratio 16:9 --resolution 720p --duration 5"
</ParamField>

<ParamField body="content[].type" type="string" required>
  The type of the input content

  Possible values: `text`, `image_url`, `video_url`, `audio_url`
</ParamField>

<ParamField body="content[].video_url" type="object">
  Input video object. Only Seedance 2.5, 2.0 & 2.0 fast support video input.
</ParamField>

<ParamField body="content[].video_url.url" type="string" required>
  Video URL or Asset ID.
  Video URL: Public URL of the video (mp4, mov).
  Asset ID: Format asset://\<ASSET\_ID>
</ParamField>

<ParamField body="duration" type="`-1` | object">
  Video duration in seconds. Seedance 2.5: \[4,30] or -1 (auto; video editing tasks support only -1). Seedance 2.0 & 2.0 fast: \[4,15] or -1 (auto). Seedance 1.5 pro: \[4,12] or -1. Seedance 1.0: \[2,12].

  Range: `2` to `30`
</ParamField>

<ParamField body="execution_expires_after" type="integer">
  Task timeout threshold in seconds. Default 172800 (48h). Range: \[3600, 259200].

  Range: `3600` to `259200`
</ParamField>

<ParamField body="generate_audio" type="boolean" default="true">
  Supported by Seedance 2.5, 2.0, 2.0 fast, and 1.5 pro. Whether the generated video includes audio synchronized with the visuals.
  true: The model outputs a video with synchronized audio.
  false: The model outputs a silent video.
</ParamField>

<ParamField body="model" type="string">
  The ID of the model to call. Supported models: seedance-1-5-pro-251215, seedance-1-0-pro-250528, seedance-1-0-pro-fast-251015, seedance-1-0-lite-t2v-250428, seedance-1-0-lite-i2v-250428, dreamina-seedance-2-0-260128, dreamina-seedance-2-0-fast-260128, dreamina-seedance-2-0-mini and dreamina-seedance-2-5-260628. A direct v1 call to POST /proxy/byteplus/api/v3/contents/generations/tasks MUST supply it — the proxy refuses any other value, and an omitted one, with a 400. It is NOT in this schema's `required` list because Comfy Router fills it from the `{model}` path segment of /v2/models/byteplus/\{model}, so a Router caller omits it.
</ParamField>

<ParamField body="output_format" type="string" default="&#x22;mp4&#x22;">
  Seedance 2.5 only. Container format of the output video.
  mp4: General-purpose container (H.264/AAC, yuv420p) with broad compatibility and smaller file size.
  mov: Professional container (H.264 High 4:4:4 Predictive/PCM, yuv444p) with high color precision, suited for post-production; larger file size.

  Possible values: `mp4`, `mov`
</ParamField>

<ParamField body="ratio" type="string">
  Aspect ratio of the generated video. Seedance 2.0 & 2.0 fast, 1.5 pro default: adaptive.

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

<ParamField body="resolution" type="string">
  Video resolution. Seedance 2.5, 2.0 & 2.0 fast, 1.5 pro, 1.0 lite default: 720p. Seedance 1.0 pro & pro-fast default: 1080p.
  Note: Seedance 2.0 & 2.0 fast do not support 1080p. Seedance 2.5 supports 480p, 720p, and 1080p.

  Possible values: `480p`, `720p`, `1080p`, `4k`
</ParamField>

<ParamField body="return_last_frame" type="boolean" default="false">
  Whether to return the last frame image of the generated video.
  true: Returns the last frame image of the generated video. After setting this parameter to true, you can obtain the last frame image by calling the Querying the information about a video generation task. The last frame image is in PNG format, with its pixel width and height consistent with those of the generated video, and it contains no watermarks. Using this parameter allows the generation of multiple consecutive videos: the last frame of the previously generated video is used as the first frame of the next video task, enabling quick generation of multiple consecutive videos.
  false: Does not return the last frame image of the generated video.
</ParamField>

<ParamField body="seed" type="integer">
  Seed integer for controlling randomness. Range: \[-1, 2^32-1]. -1 uses a random seed.

  Range: `-1` to `4294967295`
</ParamField>

<ParamField body="service_tier" type="string">
  Service tier for processing. Seedance 2.5, 2.0 & 2.0 fast do not support flex (offline inference).

  Possible values: `default`, `flex`
</ParamField>

<ParamField body="watermark" type="boolean" default="false">
  Whether the generated video includes a watermark.
</ParamField>

Generated from the schema Router serves at `GET /v2/models/byteplus/dreamina-seedance-2-0-260128/openapi.json`, the same document it validates a call against before the request reaches the provider.

### Output

<ResponseField name="content" type="object">
  The output after the video generation task is completed, which contains the download URL of the output video and, when BytePlus returns one, the download URL of its last frame. Both `video_url` and `last_frame_url` are RE-HOSTED onto Comfy storage; every other field here is BytePlus's own. Nullable - BytePlus clears the URLs 24 hours after the task, and a succeeded document polled after that can carry `content` absent or null.
</ResponseField>

<ResponseField name="content.last_frame_url" type="string">
  Download URL for the last frame of the generated video, returned when the request set `return_last_frame`. Do not infer the image format from this URL: BytePlus documents the last frame as PNG on the request side, Router re-hosts whatever bytes it is served and types them from the upstream Content-Type or a content sniff, and `image/jpeg` is only the last-resort fallback when both fail. Router re-hosts the last frame onto Comfy storage and rewrites this field, so it is normally a Comfy-signed URL valid for up to 24 hours - signed for 24 hours when minted and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left. When the re-host could not be performed the field keeps BytePlus's own URL instead, which BytePlus clears 24 hours after the task. Either way the link expires, so download the frame rather than storing the URL.
</ResponseField>

<ResponseField name="content.output_format" type="string">
  Container format of the generated video (mp4 or mov), when BytePlus nests it inside `content`. Seedance models more commonly return it as a TOP-LEVEL sibling of `content` - see the top-level `output_format` field - and Router reads whichever of the two is present.
</ResponseField>

<ResponseField name="content.video_url" type="string">
  Download URL for the output video. Router re-hosts the video onto Comfy storage and rewrites this field, so it is normally a Comfy-signed URL valid for up to 24 hours - signed for 24 hours when minted and replayed from a 23-hour memo, so a later poll can hand back one with as little as an hour left. When the re-host could not be performed the field keeps BytePlus's own URL instead, which BytePlus clears 24 hours after the task and caps at 100 downloads on some models. Either way the link expires, so download the video rather than storing the URL.
</ResponseField>

<ResponseField name="created_at" type="integer">
  The time when the task was created. The value is a UNIX timestamp in seconds.
</ResponseField>

<ResponseField name="duration" type="number">
  The duration of the generated video in seconds. Declared as a number rather than an integer because BytePlus is not consistent about it - video tasks have been observed returning whole seconds and sibling BytePlus surfaces report fractional durations - so a client must not assume an integral value. BytePlus's own field, returned on succeeded video tasks and forwarded unchanged.
</ResponseField>

<ResponseField name="error" type="object">
  The error information. If the task succeeds, null is returned. If the task fails, the error information is returned.
</ResponseField>

<ResponseField name="error.code" type="string">
  The error code
</ResponseField>

<ResponseField name="error.message" type="string">
  The error message
</ResponseField>

<ResponseField name="id" type="string">
  The ID of the video generation task
</ResponseField>

<ResponseField name="model" type="string">
  The name and version of the model used by the task
</ResponseField>

<ResponseField name="output_format" type="string">
  Container format of the generated video (mp4 or mov), returned at the TOP LEVEL as a sibling of `content` - this is where the Seedance video task query returns it. BytePlus's own field, forwarded unchanged.
</ResponseField>

<ResponseField name="resolution" type="string">
  The resolution of the generated video, for example `1080p`. BytePlus's own field, returned on succeeded video tasks and forwarded unchanged.
</ResponseField>

<ResponseField name="seed" type="integer">
  The generation seed actually used for the task. BytePlus's own field, returned on succeeded video tasks and forwarded unchanged.

  Format: `int64`
</ResponseField>

<ResponseField name="status" type="string">
  The state of the task

  Possible values: `queued`, `running`, `cancelled`, `succeeded`, `failed`, `expired`
</ResponseField>

<ResponseField name="updated_at" type="integer">
  The time when the task was last updated. The value is a UNIX timestamp in seconds.
</ResponseField>

<ResponseField name="usage" type="object">
  The token usage for the request
</ResponseField>

<ResponseField name="usage.completion_tokens" type="integer">
  The number of tokens generated by the model
</ResponseField>

<ResponseField name="usage.total_tokens" type="integer">
  For the video generation model, the number of input tokens is not calculated and defaults to 0. Therefore, total\_tokens = completion\_tokens.
</ResponseField>

## Examples

### Input

```json theme={null}
{
  "content": [
    {
      "text": "A red fox trotting through a snowy pine forest",
      "type": "text"
    }
  ],
  "duration": 5,
  "ratio": "16:9",
  "resolution": "720p"
}
```

### Output

```json theme={null}
{
  "content": {
    "last_frame_url": "https://example.invalid/byteplus/seedance-1-0-lite-t2v-250428/last-frame",
    "video_url": "https://example.invalid/byteplus/seedance-1-0-lite-t2v-250428/generated.mp4"
  },
  "created_at": 1767225600,
  "duration": 5,
  "error": null,
  "id": "3f7a1b28-5c0d-4e91-8a6f-1b2c3d4e5f60",
  "model": "seedance-1-0-lite-t2v-250428",
  "output_format": "mp4",
  "resolution": "1080p",
  "seed": 1234567890123,
  "status": "succeeded",
  "updated_at": 1767225730
}
```

## Before you ship

The snippets above are the shortest working call. Three things are the same for every model and are documented once on the [Comfy Router headers](/development/comfy-router/headers) page: send an `Idempotency-Key` on every paid call and reuse it when you retry, expect the connection to be held up to Router's 10 minute deadline, and keep `X-Comfy-Request-Id` from every response. The SDKs do all three for you; the cURL tab does none of them. On failure, `X-Comfy-Error-Type` names the bucket, and a `422` means the body failed the model's schema and was never billed.

<CardGroup cols={3}>
  <Card title="Headers" icon="list" href="/development/comfy-router/headers">
    Authentication, idempotency, request IDs, error buckets, retry pacing, spend limits.
  </Card>

  <Card title="Quick Start" icon="rocket" href="/development/comfy-router/quickstart">
    Typed error handling in Python and TypeScript, reading the 422, walking the catalog.
  </Card>

  <Card title="Limitations" icon="triangle-exclamation" href="/development/comfy-router/limitations">
    What Router does not do today, and what to use instead.
  </Card>
</CardGroup>
