> ## 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-text-to-video）モデルはテキストから動画への生成をサポートしています
- 非同期処理モード、返されたタスクIDを使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)してください
- 生成された動画リンクは24時間有効です。速やかに保存してください



## OpenAPI

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

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

        - 生成された動画リンクは24時間有効です。速やかに保存してください
      operationId: createWan26TextToVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Wan26TextToVideoRequest'
            examples:
              text_to_video:
                summary: テキストから動画
                value:
                  model: wan2.6-text-to-video
                  prompt: A cat playing piano
      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-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:
    Wan26TextToVideoRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: モデル名
          enum:
            - wan2.6-text-to-video
          default: wan2.6-text-to-video
          example: wan2.6-text-to-video
        prompt:
          type: string
          description: 生成したい動画を説明するプロンプト、1500文字まで
          example: A cat playing piano
          maxLength: 1500
        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~15`秒の任意の整数値をサポート
            - 各リクエストは`duration`値に基づいて事前請求され、実際の請求は生成された動画の秒数に基づきます
          example: 5
          minimum: 2
          maximum: 15
        prompt_extend:
          type: boolean
          description: >-
            インテリジェントプロンプト書き換えを有効にするかどうか。有効にすると、大規模モデルがプロンプトを最適化し、シンプルまたは説明が不十分なプロンプトの結果を大幅に改善します。デフォルトは
            `true`
          example: true
        model_params:
          type: object
          description: モデルパラメータ設定
          properties:
            shot_type:
              type: string
              description: >-
                生成される動画のショットタイプを指定します。つまり、動画が単一の連続ショットで構成されるか、複数の切り替えショットで構成されるかを指定します


                **有効条件:**

                - `prompt_extend` が `true` の場合のみ有効


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

                - `shot_type` > `prompt`

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


                **オプション:**

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

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


                **注意:**

                - 動画のナラティブ構造を厳密に制御したい場合にこのパラメータを使用してください（例:
                商品紹介にはシングルショット、ショートストーリーにはマルチショット）
              enum:
                - single
                - multi
              example: single
        audio_url:
          type: string
          description: >-
            音声ファイルURL。モデルはこの音声を使用して動画を生成します。


            **形式要件:**

            - サポートされる形式: `mp3`

            - 長さ: `3〜30` 秒

            - ファイルサイズ: 最大 `15MB`


            **オーバーフロー処理:**

            - 音声の長さが `duration`
            の値（5秒または10秒）を超える場合、最初の5秒または10秒が自動的に抽出され、残りは破棄されます

            -
            音声の長さが動画の長さより短い場合、音声の長さを超える部分は無音になります。例えば、音声が3秒で動画の長さが5秒の場合、出力動画は最初の3秒に音声があり、最後の2秒は無音になります
          format: uri
          example: >-
            https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/xxx.mp3
        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-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キーの取得：**

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

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

````