> ## 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.

# 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">
    <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"
</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、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、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` で提供するスキーマから生成されたものであり、リクエストがプロバイダーに到達する前に呼び出しの検証に使用されるドキュメントと同じです。

### 出力

<ResponseField name="content" type="object">
  ビデオ生成タスク完了後の出力で、出力ビデオのダウンロード URL と、BytePlus が返した場合はそのラストフレームのダウンロード URL を含みます。`video_url` と `last_frame_url` はどちらも Comfy ストレージに再ホストされます。ここにあるその他のフィールドはすべて BytePlus 独自のものです。NULL 許容です。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">
  BytePlus が `content` の中にネストして返す場合の、生成済みビデオのコンテナフォーマット (mp4 または mov)。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 がこの点で一貫していないため、整数ではなく number として宣言されています。ビデオタスクが整数秒を返す例が観測される一方、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-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": "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 が入力を拒否したことを意味します。生成されたアセットは [結果 URL の有効期限](/ja/development/comfy-router/reference#結果アセット) があるため、早めにダウンロードしてください。

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

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

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