> ## Documentation Index
> Fetch the complete documentation index at: https://dripart-willie-des-1087-router-migration-block.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Dreamina Seedance 2.0 260128 を Comfy Router で使用する

> Comfy Router 経由で byteplus/dreamina-seedance-2-0-260128 を呼び出します。endpoint、リクエストの形状、Router が返すレスポンスについて説明します。

BytePlus から Comfy Router が提供する `byteplus/dreamina-seedance-2-0-260128` の API リファレンスです。

## クイックスタート

[Comfy ワークスペース](https://platform.comfy.org/profile/api-keys)でキーを作成し、`COMFY_API_KEY` としてエクスポートします。Python と TypeScript のスニペットは Comfy SDK（`pip install comfy-sdk`、`npm install @comfyorg/sdk`）を使用します。cURL のスニペットは、生の HTTP で同じ呼び出しを行います。

**モデル ID:** `byteplus/dreamina-seedance-2-0-260128`

**エンドポイント:** `POST https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128`

<Tabs>
  <Tab title="Wait for the result">
    <CodeGroup>
      ```python Python theme={null}
      from comfy_sdk import Comfy

      # Reads COMFY_API_KEY from the environment.
      # The SDK automatically creates an idempotency key and reuses it for automatic retries.
      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.
      // The SDK automatically creates an idempotency key and reuses it for automatic retries.
      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>
  </Tab>

  <Tab title="Queue and collect later">
    同じボディを `POST https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128/requests` に送信します。Router は実行が受け付けられ次第 `201` と `request_id` を返し、結果は準備が整った時点で、このプロセスからでも別のプロセスからでも取得できます。ステータス、キャンセル、結果の取得の詳細は [Queued delivery](/ja/development/comfy-router/queue) を参照してください。

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

      # Reads COMFY_API_KEY from the environment.
      # Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
      with Comfy() as client:
          handle = client.models.submit(
              "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("request_id:", handle.request_id)  # with the model ID, all another process needs

          # Poll until the request completes, waiting the Retry-After the server names.
          for update in handle.iter_events():
              print(update.status, update.queue_position)

          # The provider's own payload, the same value models.run() returns.
          # A request that failed or was cancelled raises the typed Router error here.
          result = handle.get()

      print(result)
      ```

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

      // Reads COMFY_API_KEY from the environment.
      // Each submit() call mints its own Idempotency-Key and reuses it for automatic retries.
      const handle = await comfy.models.submit("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("requestId:", handle.requestId); // with the model ID, all another process needs

      // Poll until the request completes, waiting the Retry-After the server names.
      for await (const update of handle.events()) {
        console.log(update.status, update.queuePosition);
      }

      // The same result models.run() returns. A request that failed or was cancelled rejects here.
      const result = await handle.get();

      console.log(result.data);
      ```

      ```bash cURL theme={null}
      # 1. Submit. Router answers 201 with request_id, status_url, response_url and cancel_url.
      curl https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128/requests \
        -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\"}"

      # 2. Poll until status is COMPLETED, waiting the Retry-After seconds each response names.
      REQUEST_ID="<request_id from the 201 body>"
      curl -i https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128/requests/$REQUEST_ID/status \
        -H "X-API-Key: $COMFY_API_KEY"

      # 3. Collect. 200 with the model's native output, 202 with the status body while it is still running.
      curl https://api.comfy.org/v2/models/byteplus/dreamina-seedance-2-0-260128/requests/$REQUEST_ID \
        -H "X-API-Key: $COMFY_API_KEY"
      ```
    </CodeGroup>
  </Tab>
</Tabs>

## Schema

### 入力

<ParamField body="callback_url" type="string (uri)">
  この生成タスクの結果を受け取るコールバック通知先

  フォーマット: `uri`
</ParamField>

<ParamField body="content" type="object[]" required>
  モデルがビデオを生成するための入力コンテンツ
</ParamField>

<ParamField body="content[].audio_url" type="object">
  入力オーディオオブジェクト。オーディオ入力に対応するのは Seedance 2.5、2.0、2.0 fast のみです。Seedance 2.0 と 2.0 fast はオーディオのみを使用できません。少なくとも画像1枚またはビデオ1本を含める必要があります。Seedance 2.5 はオーディオのみの入力に対応しています。
</ParamField>

<ParamField body="content[].audio_url.url" type="string" required>
  オーディオURL、Base64エンコーディング、またはアセットID。
  オーディオURL: オーディオの公開URL（wav、mp3）。
  Base64: フォーマット data:audio/\<format>;base64,\<content>
  アセットID: フォーマット asset://\<ASSET\_ID>
</ParamField>

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

<ParamField body="content[].image_url.url" type="string" required>
  画像から動画を生成するための画像コンテンツ（type が "image\_url" の場合）
  画像URL: 画像URLにアクセスできることを確認してください。
  Base64エンコードされたコンテンツ: フォーマットは data:image/\<format>;base64,\<content> である必要があります
  アセットID: フォーマット asset://\<ASSET\_ID>
</ParamField>

<ParamField body="content[].role" type="string">
  コンテンツ項目の役割/位置。
  画像の場合: first\_frame、last\_frame、または reference\_image。
  ビデオの場合: reference\_video（Seedance 2.5、2.0、2.0 fast のみ）。
  オーディオの場合: reference\_audio（Seedance 2.5、2.0、2.0 fast のみ）。

  指定可能な値: `first_frame`、`last_frame`、`reference_image`、`reference_video`、`reference_audio`
</ParamField>

<ParamField body="content[].text" type="string">
  モデルへの入力テキスト情報。テキストプロンプトと任意のパラメータを含みます。

  テキストプロンプト（必須）: 生成するビデオの説明。中国語および英語の文字を使用します。

  パラメータ（任意）: テキストプロンプトの後に --\[parameters] を追加すると、ビデオの仕様を制御できます:

  * \--resolution (--rs): 480p、720p、1080p（デフォルト: 720p）
  * \--ratio (--rt): 21:9、16:9、4:3、1:1、3:4、9:16、9:21、adaptive（デフォルト: 16:9 または adaptive）
  * \--duration (--dur): 3〜12秒（デフォルト: 5）
  * \--framepersecond (--fps): 24（デフォルト: 24）
  * \--watermark (--wm): true/false（デフォルト: false）
  * \--seed (--seed): -1〜2^32-1（デフォルト: -1）
  * \--camerafixed (--cf): true/false（デフォルト: false）

  例: "A beautiful landscape --ratio 16:9 --resolution 720p --duration 5"

  Comfy側のガードレールであり、BytePlusの制約ではありません。BytePlusは
  テキスト長の制限を公開しておらず、テスト（2026-09-17）では40,000文字を
  受け付けました。バイト数ではなく文字数をカウントするため、マルチバイトの
  プロンプトは転送時にこの数倍のサイズになる可能性があります。これはこの1つの
  フィールドを制限するものであり、リクエスト全体を制限するものではありません。
  `content` は配列であり、リクエスト全体のサイズを制限するのはリクエストごとの
  ボディ制限です。これを適用するのは Comfy Router（/v2/models/byteplus/\{model}）
  であり、直接 v1 /proxy を呼び出した場合は代わりに BytePlus 自身のバリデータが
  応答します。実際のトラフィックよりもはるかに高く設定されているため、正当な
  プロンプトを判定することはありません。呼び出し元がより大きな値を必要とする
  場合は引き上げてください。
</ParamField>

<ParamField body="content[].type" type="string" required>
  入力コンテンツのタイプ

  指定可能な値: `text`、`image_url`、`video_url`、`audio_url`
</ParamField>

<ParamField body="content[].video_url" type="object">
  入力ビデオオブジェクト。ビデオ入力に対応するのは Seedance 2.5、2.0、2.0 fast のみです。
</ParamField>

<ParamField body="content[].video_url.url" type="string" required>
  ビデオURLまたはアセットID。
  ビデオURL: ビデオの公開URL（mp4、mov）。
  アセットID: フォーマット asset://\<ASSET\_ID>
</ParamField>

<ParamField body="duration" type="`-1` | object">
  ビデオの再生時間（秒）。Seedance 2.5: \[4,30] または -1（自動。ビデオ編集タスクは -1 のみに対応）。Seedance 2.0 & 2.0 fast: \[4,15] または -1（自動）。Seedance 1.5 pro: \[4,12] または -1。Seedance 1.0: \[2,12]。

  範囲: `2` から `30`
</ParamField>

<ParamField body="execution_expires_after" type="integer">
  タスクのタイムアウトしきい値（秒）。デフォルトは 172800（48時間）。範囲: \[3600, 259200]。

  範囲: `3600` から `259200`
</ParamField>

<ParamField body="generate_audio" type="boolean" default="true">
  Seedance 2.5、2.0、2.0 fast、1.5 pro でサポートされています。生成されたビデオに映像と同期したオーディオを含めるかどうか。
  true: モデルは同期したオーディオ付きのビデオを出力します。
  false: モデルは無音のビデオを出力します。
</ParamField>

<ParamField body="model" type="string">
  呼び出すモデルのID。サポートされるモデル: seedance-1-5-pro-251215、seedance-1-0-pro-250528、seedance-1-0-pro-fast-251015、dreamina-seedance-2-0-260128、dreamina-seedance-2-0-fast-260128、dreamina-seedance-2-0-mini、dreamina-seedance-2-5-260628。POST /proxy/byteplus/api/v3/contents/generations/tasks への直接 v1 呼び出しでは必ず指定する必要があります。プロキシはそれ以外の値、および省略された場合は 400 で拒否します。このスキーマの `required` リストには含まれていません。Comfy Router が /v2/models/byteplus/\{model} の `{model}` パスセグメントから設定するため、Router の呼び出し元は省略します。
</ParamField>

<ParamField body="output_format" type="string" default="&#x22;mp4&#x22;">
  Seedance 2.5 のみ。出力ビデオのコンテナフォーマット。
  mp4: 汎用コンテナ（H.264/AAC、yuv420p）で、幅広い互換性とより小さなファイルサイズを実現します。
  mov: プロフェッショナル向けコンテナ（H.264 High 4:4:4 Predictive/PCM、yuv444p）で、色精度が高くポストプロダクションに適しています。ファイルサイズは大きくなります。

  指定可能な値: `mp4`、`mov`
</ParamField>

<ParamField body="ratio" type="string">
  生成されるビデオのアスペクト比。Seedance 2.0 & 2.0 fast、1.5 pro のデフォルト: adaptive。

  指定可能な値: `16:9`、`4:3`、`1:1`、`3:4`、`9:16`、`21:9`、`9:21`、`adaptive`
</ParamField>

<ParamField body="resolution" type="string">
  ビデオの解像度。Seedance 2.5、2.0 & 2.0 fast、1.5 pro、1.0 lite のデフォルト: 720p。Seedance 1.0 pro & pro-fast のデフォルト: 1080p。
  注: Seedance 2.0 & 2.0 fast は 1080p に対応していません。Seedance 2.5 は 480p、720p、1080p に対応しています。

  指定可能な値: `480p`、`720p`、`1080p`、`4k`
</ParamField>

<ParamField body="return_last_frame" type="boolean" default="false">
  生成されたビデオの最終フレーム画像を返すかどうか。
  true: 生成されたビデオの最終フレーム画像を返します。このパラメータを true に設定すると、ビデオ生成タスクの情報をクエリすることで最終フレーム画像を取得できます。最終フレーム画像は PNG 形式で、ピクセル単位の幅と高さは生成されたビデオと一致し、ウォーターマークは含まれません。このパラメータを使用すると、複数の連続したビデオを生成できます。先に生成されたビデオの最終フレームが次のビデオタスクの最初のフレームとして使用され、複数の連続したビデオをすばやく生成できます。
  false: 生成されたビデオの最終フレーム画像を返しません。
</ParamField>

<ParamField body="seed" type="integer">
  ランダム性を制御するシード整数。範囲: \[-1, 2^32-1]。-1 はランダムなシードを使用します。

  範囲: `-1` から `4294967295`
</ParamField>

<ParamField body="service_tier" type="string">
  処理のサービスティア。Seedance 2.5、2.0、2.0 fast は flex（オフライン推論）をサポートしていません。

  指定可能な値: `default`、`flex`
</ParamField>

<ParamField body="watermark" type="boolean" default="false">
  生成されたビデオにウォーターマークが含まれるかどうか。
</ParamField>

Router が `GET /v2/models/byteplus/dreamina-seedance-2-0-260128/openapi.json` で提供するスキーマから生成されたもので、リクエストがプロバイダーに到達する前に Router が呼び出しを検証する際に使用するドキュメントと同じものです。

### 出力

<ResponseField name="content" type="object">
  ビデオ生成タスク完了後の出力です。出力ビデオのダウンロード URL と、BytePlus が返す場合はその最終フレームのダウンロード URL を含みます。`video_url` と `last_frame_url` はいずれも Comfy ストレージに再ホストされますが、ここにあるその他のフィールドはすべて BytePlus 自身のものです。Nullable です。BytePlus はタスクの 24 時間後に URL をクリアするため、その後ポーリングした succeeded ドキュメントでは `content` が存在しないか null である可能性があります。
</ResponseField>

<ResponseField name="content.last_frame_url" type="string">
  生成されたビデオの最終フレームのダウンロード URL で、リクエストで `return_last_frame` を設定したときに返されます。この URL から画像形式を推測しないでください。BytePlus はリクエスト側で最終フレームを PNG と記載していますが、Router は提供されたバイト列をそのまま再ホストし、上流の Content-Type またはコンテンツスニッフから型を判別します。`image/jpeg` はその両方が失敗した場合の最後の手段のフォールバックにすぎません。Router は最終フレームを Comfy ストレージに再ホストしてこのフィールドを書き換えるため、通常は最大 24 時間有効な Comfy 署名付き URL になります。発行時に 24 時間で署名され、23 時間のメモから再生されるため、後でポーリングすると残り 1 時間しかない URL が返されることがあります。再ホストを実行できなかった場合、このフィールドは代わりに BytePlus 自身の URL を保持しますが、これは BytePlus がタスクの 24 時間後にクリアします。いずれにせよリンクは失効するため、URL を保存するのではなくフレームをダウンロードしてください。
</ResponseField>

<ResponseField name="content.output_format" type="string">
  生成されたビデオのコンテナ形式 (mp4 または mov) で、BytePlus がこれを `content` 内にネストする場合のものです。Seedance モデルでは、これを `content` のトップレベルの兄弟として返すことのほうが一般的です。トップレベルの `output_format` フィールドを参照してください。Router はどちらか存在する方を読み取ります。
</ResponseField>

<ResponseField name="content.video_url" type="string">
  出力ビデオのダウンロード URL です。Router はビデオを Comfy ストレージに再ホストしてこのフィールドを書き換えるため、通常は最大 24 時間有効な Comfy 署名付き URL になります。発行時に 24 時間で署名され、23 時間のメモから再生されるため、後でポーリングすると残り 1 時間しかない URL が返されることがあります。再ホストを実行できなかった場合、このフィールドは代わりに BytePlus 自身の URL を保持しますが、これは BytePlus がタスクの 24 時間後にクリアし、一部のモデルでは 100 ダウンロードに制限されます。いずれにせよリンクは失効するため、URL を保存するのではなくビデオをダウンロードしてください。
</ResponseField>

<ResponseField name="created_at" type="integer">
  タスクが作成された時間です。値は秒単位の UNIX タイムスタンプです。
</ResponseField>

<ResponseField name="duration" type="number">
  生成されたビデオの再生時間 (秒) です。BytePlus が一貫していないため、整数ではなく数値として宣言されています。ビデオタスクが整数秒を返すことが確認されている一方で、BytePlus の関連サーフェスでは小数の再生時間が報告されるため、クライアントは整数値を前提にしてはなりません。BytePlus 自身のフィールドで、成功したビデオタスクで返され、そのまま転送されます。
</ResponseField>

<ResponseField name="error" type="object">
  エラー情報です。タスクが成功した場合は null が返されます。タスクが失敗した場合はエラー情報が返されます。
</ResponseField>

<ResponseField name="error.code" type="string">
  エラーコード
</ResponseField>

<ResponseField name="error.message" type="string">
  エラーメッセージ
</ResponseField>

<ResponseField name="id" type="string">
  ビデオ生成タスクの ID
</ResponseField>

<ResponseField name="model" type="string">
  タスクで使用されたモデルの名前とバージョン
</ResponseField>

<ResponseField name="output_format" type="string">
  生成されたビデオのコンテナ形式 (mp4 または mov) で、`content` の兄弟としてトップレベルで返されます。Seedance のビデオタスククエリはここでこれを返します。BytePlus 自身のフィールドで、そのまま転送されます。
</ResponseField>

<ResponseField name="resolution" type="string">
  生成されたビデオの解像度 (例: `1080p`)。BytePlus 自身のフィールドで、成功したビデオタスクで返され、そのまま転送されます。
</ResponseField>

<ResponseField name="seed" type="integer">
  タスクで実際に使用された生成シード。BytePlus 自身のフィールドで、成功したビデオタスクで返され、そのまま転送されます。

  形式: `int64`
</ResponseField>

<ResponseField name="status" type="string">
  タスクの状態

  取り得る値: `queued`、`running`、`cancelled`、`succeeded`、`failed`、`expired`
</ResponseField>

<ResponseField name="updated_at" type="integer">
  タスクが最後に更新された時間です。値は秒単位の UNIX タイムスタンプです。
</ResponseField>

<ResponseField name="usage" type="object">
  リクエストのトークン使用量
</ResponseField>

<ResponseField name="usage.completion_tokens" type="integer">
  モデルが生成したトークン数
</ResponseField>

<ResponseField name="usage.total_tokens" type="integer">
  ビデオ生成モデルでは、入力トークン数は計算されず 0 がデフォルトです。したがって、total\_tokens = completion\_tokens となります。
</ResponseField>

## 例

### 入力

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

### 出力

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

## 出荷前の確認

SDK は `Idempotency-Key` を生成し、自動リトライで再利用します。手動リトライでは元のキーを再利用してください。Router は最大 10 分間接続を保持できます。

リクエストが失敗すると、Router は理由を説明する `X-Comfy-Error-Type` レスポンスヘッダーを送信します。`422` は、プロバイダーを呼び出す前に Router が入力を拒否したことを意味し、`413` はリクエスト本文が Router の受け入れ可能なサイズを超えていたことを意味します。生成されたアセットは [結果 URL の有効期限](/ja/development/comfy-router/reference#結果アセット) があるため、早めにダウンロードしてください。

上記のフィールド説明に記載されているサイズ制限は、プロバイダーの仕様から引用した、そのフィールドに対するプロバイダー自身の上限です。Router はリクエスト本文全体に対して別の上限を適用し、base64 エンコードされたメディアもこれにカウントされます。[リクエスト本文のサイズ](/ja/development/comfy-router/limitations) を参照してください。

<CardGroup cols={3}>
  <Card title="ヘッダー" icon="list" href="/ja/development/comfy-router/headers">
    認証、冪等性、リクエスト ID、エラー分類、リトライ間隔、支出上限。
  </Card>

  <Card title="Router API の利用" icon="code" href="/ja/development/comfy-router/api">
    モデルの検出、バリデーションエラー、リトライ、課金。
  </Card>

  <Card title="制限事項" icon="triangle-exclamation" href="/ja/development/comfy-router/limitations">
    Router が現在対応していないことと、代替手段。
  </Card>
</CardGroup>
