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

# Comfy Router で Seedance 1.5 Pro 251215 を使用する

> Comfy Router 経由で byteplus/seedance-1-5-pro-251215 を呼び出す: エンドポイント、リクエストの形状、Router が返すレスポンス。

`byteplus/seedance-1-5-pro-251215` の 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 のスニペットは、同じ呼び出しを生の HTTP で実行するものです。

**モデル ID:** `byteplus/seedance-1-5-pro-251215`

**エンドポイント:** `POST https://api.comfy.org/v2/models/byteplus/seedance-1-5-pro-251215`

<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/seedance-1-5-pro-251215",
              {
                  "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/seedance-1-5-pro-251215", {
        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/seedance-1-5-pro-251215 \
        -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/seedance-1-5-pro-251215",
              {
                  "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/seedance-1-5-pro-251215", {
        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/seedance-1-5-pro-251215/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/seedance-1-5-pro-251215/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/seedance-1-5-pro-251215/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">
  モデルへの入力テキスト情報。テキストプロンプトと任意のパラメータを含みます。

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

  パラメータ(任意): ビデオの仕様を制御するには、テキストプロンプトの後に --\[パラメータ] を追加します:

  * \--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/seedance-1-5-pro-251215/openapi.json` で提供するスキーマから生成されています。これは、リクエストがプロバイダーに到達する前に呼び出しを検証する際に使用する同じドキュメントです。

### 出力

<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-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-5-pro-251215",
  "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>
