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

# Wan2.6 参照動画

> - WAN2.6（wan2.6-reference-video）モデルは参照動画から動画への生成をサポートしています
- 参照動画をアップロードすると、モデルがキャラクターの外見と音声を抽出して新しい動画を生成します
- 非同期処理モード、返されたタスクIDを使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)してください
- 生成された動画リンクは24時間有効です。速やかに保存してください
- **課金**：入力＋出力動画の長さに基づく合算課金、生成成功後のみ課金され、失敗時は課金されません



## OpenAPI

````yaml ja/api-manual/video-series/wan2.6/wan2.6-reference-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: wan2.6-reference-video API
  description: WAN2.6モデルを使用して参照動画から動画を生成し、アップロードされた参照動画からキャラクターの外見と音声を抽出して新しい動画を作成します
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - 動画生成
      summary: wan2.6-reference-video API
      description: >-
        - WAN2.6（wan2.6-reference-video）モデルは参照動画から動画への生成をサポートしています

        - 参照動画をアップロードすると、モデルがキャラクターの外見と音声を抽出して新しい動画を生成します

        -
        非同期処理モード、返されたタスクIDを使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)してください

        - 生成された動画リンクは24時間有効です。速やかに保存してください

        - **課金**：入力＋出力動画の長さに基づく合算課金、生成成功後のみ課金され、失敗時は課金されません
      operationId: createWan26ReferenceVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan26ReferenceVideoRequest'
            examples:
              reference_video:
                summary: 参照動画から動画生成
                value:
                  model: wan2.6-reference-video
                  prompt: A person dancing
                  video_urls:
                    - >-
                      https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4
      responses:
        '200':
          description: 動画タスクが正常に作成されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: リクエストパラメータが不正です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未認証、トークンが無効または期限切れです
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: クォータ不足のため、チャージが必要です
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: アクセスが拒否されました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: wan2.6-reference-video'
                  type: invalid_request_error
        '429':
          description: レート制限を超えました
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: サーバー内部エラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    Wan26ReferenceVideoRequest:
      type: object
      required:
        - model
        - prompt
        - video_urls
      properties:
        model:
          type: string
          description: モデル名
          enum:
            - wan2.6-reference-video
          default: wan2.6-reference-video
          example: wan2.6-reference-video
        prompt:
          type: string
          description: 生成したい動画を説明するプロンプト、1500文字まで
          example: A person dancing
          maxLength: 1500
        video_urls:
          type: array
          items:
            type: string
            format: uri
          description: >-
            参照動画ファイルURLの配列。参照動画からキャラクターの外見と音声を抽出して新しい動画を生成するために使用されます。


            **URL要件：**

            - HTTPまたはHTTPSプロトコルをサポート

            -
            ローカルファイルは[ファイルアップロード](/ja/api-manual/file-series/upload-base64)で一時URLを取得できます


            **配列の制限：**

            - 最大3本の動画


            **動画の要件：**

            - フォーマット：mp4、mov

            - 長さ：2〜30秒

            - ファイルサイズ：1本あたり100MB以下


            **入力動画の課金ルール：**

            - 各参照動画は切り捨てて合算され、入力課金時間の合計は最大`5`秒です

            - 動画1本：`min(動画の長さ, 5s)`

            - 動画2本：`min(動画1の長さ, 2.5s) + min(動画2の長さ, 2.5s)`

            - 動画3本：`min(動画1の長さ, 1.65s) + min(動画2の長さ, 1.65s) + min(動画3の長さ,
            1.65s)`

            - `1080p`画質はより高い料金となります
          maxItems: 3
          example:
            - >-
              https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp4
        aspect_ratio:
          type: string
          description: |-
            動画のアスペクト比、デフォルトは`16:9`

            **オプション：**
            - `720p`：`16:9`（横向き）、`9:16`（縦向き）、`1:1`（正方形）、`4:3`、`3:4`をサポート
            - `1080p`：`16:9`（横向き）、`9:16`（縦向き）、`1:1`（正方形）、`4:3`、`3:4`をサポート
          example: '16:9'
        quality:
          type: string
          description: |-
            動画の画質、デフォルトは`720p`

            **オプション：**
            - `720p`：標準画質、標準価格、これがデフォルトです
            - `1080p`：高画質、より高い価格

            **注意：** 画質レベルによってサポートされるアスペクト比が異なります。`aspect_ratio`パラメータを参照してください
          example: 720p
        duration:
          type: integer
          description: |-
            生成される動画の長さを指定します（秒）

            **注意:**
            - `2~10`秒の任意の整数値をサポート
            - 各リクエストは`duration`値に基づいて事前請求され、実際の請求は生成された動画の秒数に基づきます
          example: 5
          minimum: 2
          maximum: 10
        model_params:
          type: object
          description: モデルパラメータ設定
          properties:
            shot_type:
              type: string
              description: >-
                生成される動画のショットタイプを指定します。つまり、動画が単一の連続ショットで構成されるか、複数の切り替えショットで構成されるかを指定します


                **パラメータの優先順位：**

                - `shot_type` > `prompt`

                -
                例えば、`shot_type`を`single`に設定した場合、`prompt`に`マルチショット動画を生成`と含まれていても、モデルはシングルショット動画を出力します


                **オプション：**

                - `single`：デフォルト、シングルショット動画を出力

                - `multi`：マルチショット動画を出力


                **注意：**

                -
                動画のナラティブ構造を厳密に制御したい場合にこのパラメータを使用してください（例：商品紹介にはシングルショット、ショートストーリーにはマルチショット）
              enum:
                - single
                - multi
              example: single
        callback_url:
          type: string
          description: >-
            タスク完了時のHTTPSコールバックURL


            **コールバックのタイミング：**

            - タスクが完了、失敗、またはキャンセルされた時にトリガーされます

            - 課金確認後に送信されます


            **セキュリティ制限：**

            - HTTPSプロトコルのみサポートされています

            -
            内部IPアドレスへのコールバックは禁止されています（127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x
            など）

            - URLの長さは`2048`文字を超えてはなりません


            **コールバックメカニズム：**

            - タイムアウト：`10`秒

            - 失敗後最大`3`回リトライ（失敗後`1`/`2`/`4`秒でリトライ）

            - コールバックのレスポンス形式はタスク照会APIのレスポンスと同一です

            - 2xxステータスコードは成功とみなされ、その他のステータスコードはリトライをトリガーします
          format: uri
          example: https://your-domain.com/webhooks/video-task-completed
    VideoGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: タスク作成タイムスタンプ
          example: 1757169743
        id:
          type: string
          description: タスク ID
          example: task-unified-1757169743-7cvnl5zw
        model:
          type: string
          description: 使用された実際のモデル名
          example: wan2.6-reference-video
        object:
          type: string
          enum:
            - video.generation.task
          description: タスクタイプ
        progress:
          type: integer
          description: タスク進捗率（0-100）
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: タスクステータス
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
        task_info:
          $ref: '#/components/schemas/VideoTaskInfo'
          description: 動画タスクの詳細
        type:
          type: string
          enum:
            - text
            - image
            - audio
            - video
          description: タスク出力タイプ
          example: video
        usage:
          $ref: '#/components/schemas/Usage'
          description: 使用量と課金情報
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: エラーコード識別子
            message:
              type: string
              description: エラーの説明
            type:
              type: string
              description: エラータイプ
    VideoTaskInfo:
      type: object
      properties:
        can_cancel:
          type: boolean
          description: タスクをキャンセルできるかどうか
          example: true
        estimated_time:
          type: integer
          description: 推定完了時間（秒）
          minimum: 0
          example: 120
    Usage:
      type: object
      description: 使用量と課金情報
      properties:
        billing_rule:
          type: string
          description: 課金ルール
          enum:
            - per_call
            - per_token
            - per_second
          example: per_call
        credits_reserved:
          type: number
          description: 推定クレジット消費量
          minimum: 0
          example: 5
        user_group:
          type: string
          description: ユーザーグループカテゴリ
          enum:
            - default
            - vip
          example: default
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ## すべてのAPIにBearer Token認証が必要です ##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````