> ## 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-text-to-video) モデルはテキストから動画への生成をサポートし、テキストプロンプトから滑らかな動画を生成します
- **マルチショットナラティブ:** `prompt` 内の自然言語でショット構成を制御
  - シングルショット: プロンプトに「シングルショット動画を生成」と指定
  - マルチショット: 「マルチショット動画を生成」または時間タイムスタンプ付きショットリスト（例：「ショット 1 [0-3秒] ロング: 雨の夜の通り」）
  - デフォルト: 指定がない場合、モデルが `prompt` の内容を自動解釈します
- **音声処理:**
  - `audio_urls` あり: 当該音声を駆動ソースとして使用
  - `audio_urls` なし: 映像内容に合った BGM や効果音を自動生成
- 非同期処理モード、返却されたタスク ID で[ステータスを照会](/ja/api-manual/task-management/get-task-detail)
- 生成された動画リンクの有効期間は 24 時間です。お早めに保存してください



## OpenAPI

````yaml ja/api-manual/video-series/wan2.7/wan2.7-text-to-video.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: wan2.7-text-to-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-text-to-video API
      description: >-
        - WAN2.7 (wan2.7-text-to-video)
        モデルはテキストから動画への生成をサポートし、テキストプロンプトから滑らかな動画を生成します

        - **マルチショットナラティブ:** `prompt` 内の自然言語でショット構成を制御
          - シングルショット: プロンプトに「シングルショット動画を生成」と指定
          - マルチショット: 「マルチショット動画を生成」または時間タイムスタンプ付きショットリスト（例：「ショット 1 [0-3秒] ロング: 雨の夜の通り」）
          - デフォルト: 指定がない場合、モデルが `prompt` の内容を自動解釈します
        - **音声処理:**
          - `audio_urls` あり: 当該音声を駆動ソースとして使用
          - `audio_urls` なし: 映像内容に合った BGM や効果音を自動生成
        - 非同期処理モード、返却されたタスク ID
        で[ステータスを照会](/ja/api-manual/task-management/get-task-detail)

        - 生成された動画リンクの有効期間は 24 時間です。お早めに保存してください
      operationId: createWan27TextToVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan27TextToVideoRequest'
            examples:
              single_shot:
                summary: シングルショット テキスト→動画
                value:
                  model: wan2.7-text-to-video
                  prompt: 月明かりの下を走る小さな子猫
                  aspect_ratio: '16:9'
                  duration: 5
              multi_shot_storyboard:
                summary: マルチショット ストーリーボード
                value:
                  model: wan2.7-text-to-video
                  prompt: >-
                    緊迫した刑事追跡劇。ショット 1 [0-3秒] ロング: 雨の夜の通り、ネオンが明滅。ショット 2 [3-6秒]
                    ミディアム: 刑事が古い建物に入る。ショット 3 [6-9秒] クローズアップ:
                    決意のまなざし、遠くにサイレン。ショット 4 [9-12秒] ミディアム: 暗い廊下を慎重に進む。ショット 5
                    [12-15秒] クローズアップ: 重要な手がかりを発見、はっとした表情。
                  aspect_ratio: '16:9'
                  duration: 15
              with_audio:
                summary: 駆動音声付き
                value:
                  model: wan2.7-text-to-video
                  prompt: 金色の鎧を着た小さく可愛い猫の将軍が軍馬に乗り古典詩を朗詠する
                  audio_urls:
                    - https://example.com/recital.mp3
                  duration: 10
              with_negative_prompt:
                summary: ネガティブプロンプトの利用
                value:
                  model: wan2.7-text-to-video
                  prompt: 月明かりの下を走る小さな子猫
                  negative_prompt: 花
      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-text-to-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:
    Wan27TextToVideoRequest:
      required:
        - model
        - prompt
      type: object
      properties:
        model:
          type: string
          description: モデル名、`wan2.7-text-to-video` 固定
          enum:
            - wan2.7-text-to-video
          example: wan2.7-text-to-video
        prompt:
          type: string
          description: >-
            動画生成用のテキストプロンプト。中国語と英語をサポート、各文字/アルファベットを 1
            文字としてカウントし、超過分は自動的に切り詰められます。最大 5000 文字


            **マルチショットナラティブ:** 自然言語でショット構成を制御

            - シングルショット: プロンプトに「シングルショット動画を生成」と指定

            - マルチショット: 「マルチショット動画を生成」または時間タイムスタンプ付きショットリスト（例：「ショット 1 [0-3秒]」）
          maxLength: 5000
          example: 月明かりの下を走る小さな子猫
        negative_prompt:
          type: string
          description: 動画に表示したくない内容を記述するネガティブプロンプト。中国語と英語をサポート、最大 500 文字、超過分は自動的に切り詰められます
          maxLength: 500
          example: ぼやけ、低品質
        audio_urls:
          type: array
          items:
            type: string
            format: uri
          minItems: 1
          maxItems: 1
          description: >-
            駆動音声 URL のリスト（オプション）。**現在は 1 要素のみサポート**


            **動作:**

            - 指定あり: 当該音声を駆動ソースとして使用

            - 指定なし: 映像内容に合った BGM や効果音を自動生成


            **フォーマット要件:**

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

            - 長さ: `2 ~ 30` 秒

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


            **切り詰め処理:**

            - 音声長が `duration` を超える場合、先頭 N 秒を使用し残りを破棄

            - 音声長が動画長より短い場合、超過部分は無音となります。例: 音声 3 秒、動画 5 秒の場合、最初の 3 秒は有音、後の 2
            秒は無音
          example:
            - https://example.com/audio.mp3
        quality:
          type: string
          description: |-
            動画品質、デフォルト `720p`

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


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


            | 画質 | 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: |-
            動画長（秒）、範囲 2-15

            **注意:**
            - `2~15` 秒の整数値をサポート
            - 最終的な課金は実際に生成された動画の長さに基づきます
          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-text-to-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
        ```

````