> ## 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.5 260628 を Comfy Router で使用する

> Comfy Router 経由で byteplus/dreamina-seedance-2-5-260628 を呼び出します: エンドポイント、リクエスト形状、Router が返すレスポンス。

`byteplus/dreamina-seedance-2-5-260628` の API リファレンスです。このモデルは BytePlus から Comfy Router によって提供されています。

## クイックスタート

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

**モデル ID:** `byteplus/dreamina-seedance-2-5-260628`

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

<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-5-260628",
              {
                  "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-5-260628", {
        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-5-260628 \
        -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-5-260628/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-5-260628",
              {
                  "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-5-260628", {
        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-5-260628/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-5-260628/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-5-260628/requests/$REQUEST_ID \
        -H "X-API-Key: $COMFY_API_KEY"
      ```
    </CodeGroup>
  </Tab>
</Tabs>

## スキーマ

### 入力

<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 つ含める必要があります。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 は
  テキスト長の上限を公表しておらず、テストでは 40,000 文字を受け付けました（2026-09-17）。
  バイト数ではなく文字数を数えるため、マルチバイトのプロンプトは通信路上で
  この数倍のサイズになる可能性があります。これはこの 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-5-260628/openapi.json` で提供するスキーマから生成されています。これは、リクエストがプロバイダーに到達する前に Router が呼び出しの検証に使用するドキュメントと同じです。

### 出力

<ResponseField name="content" type="object">
  ビデオ生成タスクが完了した後の出力です。生成されたビデオのダウンロード URL と、BytePlus が返した場合はそのラストフレームのダウンロード URL を含みます。`video_url` と `last_frame_url` の両方は Comfy のストレージに再ホストされ、ここにある他のすべてのフィールドは BytePlus 独自のものです。Nullable: BytePlus はタスクの 24 時間後に URL をクリアするため、その後にポーリングした成功済みドキュメントでは `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 時間しかないものが返る可能性があります。再ホストを実行できなかった場合、このフィールドは 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 時間しかないものが返る可能性があります。再ホストを実行できなかった場合、このフィールドは 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-5-260628",
  "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>
