> ## 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.7 参照動画

> - WAN2.7 (wan2.7-reference-video) モデルは参照→動画生成をサポートし、人や物を主役として単一キャラの演技や複数キャラのインタラクション動画を生成可能
- マルチモーダル入力: 先頭フレーム画像 (`image_start`)、複数の参照画像 (`image_urls`)、複数の参照動画 (`video_urls`)、キャラごとの声バインディング
- **少なくとも 1 つ** の参照画像 (`image_urls`) または参照動画 (`video_urls`) が必要。`image_start` のみでは要件を満たしません。`image_urls` + `video_urls` の合計は ≤ 5
- **プロンプト内のキャラ指定:** 中国語では「图1, 图2 / 视频1, 视频2」、英語では「Image 1」「Video 1」を使用 — `image_urls` / `video_urls` の配列順に 1-based で対応。画像と動画は別々にカウントされ「Image 1」「Video 1」が共存可能
- **複数キャラの声バインディング:** `model_params.voice_bindings`（精密バインディング）を推奨。レガシーフィールド `audio_urls`（位置順アライメント）もサポート
- 非同期処理モード、返却されたタスク ID で[ステータスを照会](/ja/api-manual/task-management/get-task-detail)
- 生成された動画リンクの有効期間は 24 時間です。お早めに保存してください
- **課金:** 「入力動画長 + 出力動画長」で課金。生成成功時のみ課金、失敗は無料



## OpenAPI

````yaml ja/api-manual/video-series/wan2.7/wan2.7-reference-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: wan2.7-reference-video API
  description: WAN2.7 モデルで参照画像、参照動画、音声入力を組み合わせて動画を生成
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
paths:
  /v1/videos/generations:
    post:
      tags:
        - 動画生成
      summary: wan2.7-reference-video API
      description: >-
        - WAN2.7 (wan2.7-reference-video)
        モデルは参照→動画生成をサポートし、人や物を主役として単一キャラの演技や複数キャラのインタラクション動画を生成可能

        - マルチモーダル入力: 先頭フレーム画像 (`image_start`)、複数の参照画像 (`image_urls`)、複数の参照動画
        (`video_urls`)、キャラごとの声バインディング

        - **少なくとも 1 つ** の参照画像 (`image_urls`) または参照動画 (`video_urls`)
        が必要。`image_start` のみでは要件を満たしません。`image_urls` + `video_urls` の合計は ≤ 5

        - **プロンプト内のキャラ指定:** 中国語では「图1, 图2 / 视频1, 视频2」、英語では「Image 1」「Video 1」を使用 —
        `image_urls` / `video_urls` の配列順に 1-based で対応。画像と動画は別々にカウントされ「Image
        1」「Video 1」が共存可能

        - **複数キャラの声バインディング:**
        `model_params.voice_bindings`（精密バインディング）を推奨。レガシーフィールド
        `audio_urls`（位置順アライメント）もサポート

        - 非同期処理モード、返却されたタスク ID
        で[ステータスを照会](/ja/api-manual/task-management/get-task-detail)

        - 生成された動画リンクの有効期間は 24 時間です。お早めに保存してください

        - **課金:** 「入力動画長 + 出力動画長」で課金。生成成功時のみ課金、失敗は無料
      operationId: createWan27ReferenceVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan27ReferenceVideoRequest'
            examples:
              single_reference_video:
                summary: 単一参照動画
                value:
                  model: wan2.7-reference-video
                  prompt: 参照動画のキャラが草原で踊る
                  video_urls:
                    - https://example.com/reference.mp4
              multi_subject_with_voice_bindings:
                summary: 複数主体参照 + 精密な声バインディング（推奨）
                value:
                  model: wan2.7-reference-video
                  prompt: >-
                    Image 1 が Image 2 を抱え、Image 3
                    の椅子に座って柔らかなカントリーフォークを演奏しながら「今日は本当にいい天気ですね」と言う
                  image_urls:
                    - https://example.com/girl.jpg
                    - https://example.com/object.png
                    - https://example.com/chair.png
                  model_params:
                    voice_bindings:
                      image1: https://example.com/girl_voice.mp3
                  duration: 10
              multi_grid_storyboard:
                summary: 単一参照画像（マルチグリッド ストーリーボード）
                value:
                  model: wan2.7-reference-video
                  prompt: >-
                    参考画像、3D カートゥーン アドベンチャー映画風。ストーリーボード: 1. ファンタジー森林のロング; 2.
                    少年が蔓を払って探索; 3. 小型ロボットが前方をスキャン; 4. 宝の地図のクローズアップ; 5.
                    興奮する少年の表情; 6. 木の根を飛び越えてさらに奥へ
                  image_urls:
                    - https://example.com/storyboard.png
                  duration: 10
      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.7-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:
    Wan27ReferenceVideoRequest:
      required:
        - model
        - prompt
      type: object
      properties:
        model:
          type: string
          description: モデル名、`wan2.7-reference-video` 固定
          enum:
            - wan2.7-reference-video
          example: wan2.7-reference-video
        prompt:
          type: string
          description: >-
            動画生成用のテキストプロンプト。中国語と英語をサポート、各文字 / アルファベット / 句読点を 1
            文字としてカウントし、超過分は自動的に切り詰められます。最大 5000 文字


            **キャラ指定ルール:**

            - 中国語: 「图1, 图2 / 视频1, 视频2」を使用 — `image_urls` / `video_urls` の配列順に
            1-based で対応

            - 英語: 「Image 1」「Video 1」を使用（先頭大文字、語と数字の間にスペース）

            - 画像と動画は別々にカウントされ、「Image 1」「Video 1」が共存可能

            - 参照画像または参照動画が 1 つだけの場合は「the reference image」「the reference
            video」と簡略化可能


            **マルチグリッド画像（ストーリーボード）:**
            マルチグリッド画像を提供する場合、ストーリーボード形式で主要シーンを記述。モデルがグリッドレイアウトを認識し遷移を補完します
          maxLength: 5000
          example: Video 1 が Image 3 を抱え、Image 4 の椅子に座って柔らかなカントリーフォークを演奏する
        negative_prompt:
          type: string
          description: 動画に表示したくない内容を記述するネガティブプロンプト。中国語と英語をサポート、最大 500 文字、超過分は自動的に切り詰められます
          maxLength: 500
          example: ぼやけ、低品質
        image_start:
          type: string
          format: uri
          description: >-
            先頭フレーム画像 URL、生成動画の最初のフレームとして使用。**`image_urls` + `video_urls` ≤ 5
            の上限にカウントされません**。**声バインディングを受け付けません**（先頭フレーム自体は複数キャラの声割当に参加しない）


            **ユースケース:**

            - 先頭フレームに参照対象が既に存在する場合: 参照素材と組み合わせてアイデンティティの一貫性を強化

            - 先頭フレームに参照対象がない場合: 動画進行中に登場する新主体を参照素材で定義


            **画像制限:**

            - フォーマット: JPEG、JPG、PNG（透明非対応）、BMP、WEBP

            - 解像度: 幅・高さが `[240, 8000]` ピクセル

            - アスペクト比: 1:8 ~ 8:1

            - ファイルサイズ: `20MB` 以下
          example: https://example.com/first_frame.jpg
        image_urls:
          type: array
          items:
            type: string
            format: uri
          description: >-
            参照画像 URL のリスト。主体（人 / 動物 /
            物体）またはシーン背景を提供可能。主体を含む場合、各画像には**単一**キャラのみ含めることを推奨


            **数量制限:**

            - `image_urls` + `video_urls` の合計 ≤ 5

            - `image_urls` / `video_urls` のいずれかが必須（`image_start` のみでは不足）


            **画像制限:**

            - フォーマット: JPEG、JPG、PNG（透明非対応）、BMP、WEBP

            - 解像度: 幅・高さが `[240, 8000]` ピクセル

            - アスペクト比: 1:8 ~ 8:1

            - ファイルサイズ: `20MB` 以下
          example:
            - https://example.com/ref1.jpg
            - https://example.com/ref2.jpg
        video_urls:
          type: array
          items:
            type: string
            format: uri
          description: >-
            参照動画 URL のリスト。動画は主体（人 / 動物 /
            物体）を含むことを推奨し、空ショットや純粋な背景動画は非推奨。主体を含む場合、各動画には**単一**キャラのみ含めることを推奨。動画の音声は声参照として利用可能


            **数量制限:**

            - `image_urls` + `video_urls` の合計 ≤ 5

            - `image_urls` / `video_urls` のいずれかが必須


            **動画制限:**

            - フォーマット: mp4、mov

            - 長さ: `1 ~ 30` 秒

            - 解像度: 幅・高さが `[240, 4096]` ピクセル

            - アスペクト比: 1:8 ~ 8:1

            - ファイルサイズ: `100MB` 以下


            **注意:** `video_urls` を渡す場合、`duration` の上限は 10 秒に制限されます
          example:
            - https://example.com/reference.mp4
        audio_urls:
          type: array
          items:
            type: string
            format: uri
          maxItems: 5
          description: >-
            **【互換性フィールド — `model_params.voice_bindings` の使用を推奨】**


            参照声音声 URL のリスト。参照素材に位置順でバインドされます — まず `video_urls` 配列、次に
            `image_urls` 配列の順に（出現順で 1 対 1 対応）。最大 5 要素


            **優先度:**

            - `model_params.voice_bindings` と `audio_urls`
            を同時に指定した場合、`voice_bindings` のみ使用され本フィールドは無視されます

            - `video_urls`
            の動画に音声が含まれており声バインディングが未指定の場合、元の音声が使用されます。明示的な声バインディングを指定すると元の音声を上書きします


            **音声制限:**

            - 対応フォーマット: `wav`、`mp3`

            - 長さ: `1 ~ 10` 秒

            - ファイルサイズ: `15MB` 以下
          example:
            - https://example.com/voice1.mp3
            - https://example.com/voice2.mp3
        model_params:
          type: object
          description: 高度なパラメータコンテナ（推奨）
          properties:
            voice_bindings:
              type: object
              description: >-
                **複数キャラの精密な声バインディング（推奨）。** `audio_urls` より優先


                **バインディングルール:**

                - キーは `image{N}` または `video{N}` 形式（1-based、先頭ゼロ不可、例:
                `image1`、`video2`）

                - キーの N はプロンプト内の「图N / Image N」または「视频N / Video
                N」に対応し、`image_urls[N-1]` / `video_urls[N-1]` に対応

                - 値は当該キャラの声音声 URL

                - 総バインディング数 ≤ 5

                - `image_start`（先頭フレーム）は声バインディングを**受け付けません**

                - 一部キャラをスキップ可能（例: image1 と image3 のみバインドし image2 はバインドしない）


                **音声制限:**

                - 対応フォーマット: `wav`、`mp3`

                - 長さ: `1 ~ 10` 秒

                - ファイルサイズ: `15MB` 以下


                **バリデーションエラー:**

                - キー形式エラー: `voice_bindings key "img1"/"image01" invalid`

                - インデックス範囲外: `voice_bindings.image5 out of range`

                - 値が空、重複バインディング、または 5 件超過
              additionalProperties:
                type: string
                format: uri
              example:
                image1: https://example.com/voice_a.mp3
                image3: https://example.com/voice_c.mp3
                video1: https://example.com/voice_v.mp3
        quality:
          type: string
          description: |-
            動画品質、デフォルト `720p`

            **オプション:**
            - `720p`: 標準画質、標準価格（デフォルト）
            - `1080p`: 高画質、価格が高くなります
          enum:
            - 720p
            - 1080p
          default: 720p
          example: 720p
        aspect_ratio:
          type: string
          description: >-
            動画のアスペクト比、デフォルト `16:9`


            **動作:**

            - `image_start` 未指定: 指定した `aspect_ratio` で動画を生成

            - `image_start` 指定: 本フィールドは**無視**され、先頭フレーム画像のアスペクト比に近い比率で生成


            **画質別の出力解像度:**


            | 画質 | 16:9 | 9:16 | 1:1 | 4:3 | 3:4 |

            | --- | --- | --- | --- | --- | --- |

            | 720p | 1280×720 | 720×1280 | 960×960 | 1104×832 | 832×1104 |

            | 1080p | 1920×1080 | 1080×1920 | 1440×1440 | 1648×1248 | 1248×1648
            |
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
          default: '16:9'
          example: '16:9'
        duration:
          type: number
          description: |-
            動画長（秒、整数）

            **範囲:**
            - `video_urls` なし: `2 ~ 15`、デフォルト `5`
            - `video_urls` あり: `2 ~ 10`（10 秒に制限）

            **課金:** 実際に生成された動画の長さに基づきます
          minimum: 2
          maximum: 15
          default: 5
          example: 5
        seed:
          type: integer
          description: |-
            ランダムシード、デフォルトはランダム

            **説明:**
            - 範囲: `1` ~ `2147483647`
            - シードを固定するとプロンプト調整時の変動を抑制し再現性が向上します
          minimum: 1
          maximum: 2147483647
          example: 42
        prompt_extend:
          type: boolean
          description: >-
            プロンプトのインテリジェント書き換えを有効にするかどうか。有効にすると、大規模モデルがプロンプトを最適化し、シンプルまたは記述の不十分なプロンプトの結果を大幅に改善します。


            **注意:** デフォルト値は `false` です。フィールドを省略するか `false`
            を送信した場合、書き換えは行われません。有効にするには明示的に `true` を送信してください。
          default: false
          example: false
        callback_url:
          type: string
          description: >-
            タスク完了時の HTTPS コールバック URL


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

            - タスクの完了 (completed)、失敗 (failed)、キャンセル (cancelled) 時にトリガー

            - 課金確定後に送信


            **セキュリティ制約:**

            - 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.7-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 Key の取得:**

        [API Key 管理ページ](https://evolink.ai/dashboard/keys) で API Key を取得してください

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

````