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

# Wan2 画像から動画

> 通義萬相 Wan2.6 画像から動画生成モデル（wan2.6-i2v）を使用して、先頭フレーム画像とテキストプロンプトから滑らかな動画を生成します。自動音声合成、カスタムオーディオ、マルチショットナラティブをサポート

[アリババクラウド](https://tongyi.aliyun.com/wan) Tongyi Wanxiang Wan2.6 モデルを使用して、最初のフレーム画像から滑らかな動画を生成します。

**モデルの特徴:**

* **最初のフレーム駆動** - 最初のフレーム画像から一貫性のあるダイナミック動画を生成
* **スマートオーディオ** - 自動音声生成またはカスタムオーディオ同期をサポート
* **マルチ解像度** - 720P、1080P HD出力をサポート
* **柔軟な長さ** - 5/10/15秒の動画生成をサポート
* **マルチショットモード** - 主体一貫性を保ちながらシングルショットとマルチショットモードをサポート


## OpenAPI

````yaml /ja/openapi.yaml POST /generate/bailian/wan2-image-to-video
openapi: 3.0.0
info:
  contact:
    email: support@sinancode.com
    name: API Support
    url: https://sinancode.com/support
  description: AIモデルタスクスケジューリングプラットフォーム API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://sinancode.com/terms-of-service
  title: TikTomato API
  version: '1.0'
servers:
  - url: https://api.sinancode.com/v1
    description: 本番サーバー
security: []
paths:
  /generate/bailian/wan2-image-to-video:
    post:
      tags:
        - public
      summary: 通義萬相 Wan2 画像から動画生成
      description: >-
        通義萬相 Wan2.6
        画像から動画生成モデル（wan2.6-i2v）を使用して、先頭フレーム画像とテキストプロンプトから滑らかな動画を生成します。自動音声合成、カスタムオーディオ、マルチショットナラティブをサポート
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bailian.CreateWan2ImageToVideoTaskRequest'
        description: タスクパラメータ
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: パラメータエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: 未認証
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '404':
          description: モデルが存在しません
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: サーバーエラー
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    bailian.CreateWan2ImageToVideoTaskRequest:
      properties:
        audio:
          description: |-
            オーディオを追加するかどうか（オプション、デフォルト true）
            audio_url が空の場合に有効
            true：ビデオに自動でオーディオを追加
            false：オーディオを追加せず、無音ビデオを出力
          type: boolean
        audio_url:
          description: |-
            オーディオファイル URL（オプション、wan2.5-i2v-preview のみサポート）
            モデルはこのオーディオを使用してビデオを生成し、音と映像を同期させます
            形式：wav、mp3、長さ：3～30秒、ファイルサイズ：15MB以下
          type: string
        duration:
          description: |-
            ビデオの長さ（オプション、デフォルト 5 秒）
            wan2.6-i2v：選択可能な値は 5、10、15
          enum:
            - 5
            - 10
            - 15
          type: integer
        image_url:
          description: |-
            先頭フレーム画像 URL（必須）
            公衆インターネット URL（HTTP/HTTPS）または Base64 エンコードをサポート
            画像形式：JPEG、JPG、PNG（透明チャンネル非対応）、BMP、WEBP
            画像解像度：幅と高さの範囲は[360, 2000]ピクセル
            ファイルサイズ：10MB以下
          example: >-
            https://media.sinancode.com/uploads/20251217/a6aa177e82d58f6738109807a0548605.webp
          type: string
        model:
          description: |-
            モデル名（オプション、空欄推奨）
            空欄の場合は最新バージョンのモデルを使用し、今後のモデルアップグレードは自動的に適用されます
            現在のデフォルト：wan2.6-i2v
          enum:
            - wan2.6-i2v
          type: string
        negative_prompt:
          description: |-
            ネガティブプロンプト（オプション、最大 500 文字）
            ビデオ映像に含めてほしくない内容を記述するために使用します
          maxLength: 500
          type: string
        prompt:
          description: |-
            テキストプロンプト（オプション、最大 2000 文字）
            生成される画像に含めてほしい要素や視覚的特徴を記述するために使用します
            ビデオエフェクトパラメータ（template）を使用する場合、promptパラメータは無効です
          maxLength: 2000
          type: string
        prompt_extend:
          description: |-
            プロンプトのインテリジェントリライトを有効化するかどうか（オプション、デフォルト true）
            有効にすると、大規模言語モデルを使用して入力プロンプトをインテリジェントにリライトします
          type: boolean
        resolution:
          description: |-
            解像度レベル（オプション、デフォルト 1080P）
            wan2.6-i2v：選択可能な値 720P、1080P（480Pは非対応）
          enum:
            - 720P
            - 1080P
          type: string
        seed:
          description: ランダムシード（オプション、範囲 0-2147483647）
          maximum: 2147483647
          minimum: 0
          type: integer
        shot_type:
          description: |-
            ショットタイプ（オプション、デフォルト single、wan2.6-i2v のみサポート）
            prompt_extend=true の場合のみ有効
            single：シングルショットビデオ
            multi：マルチショットビデオ（複数のショット切り替えをサポートし、被写体の一貫性を維持）
          enum:
            - single
            - multi
          type: string
        template:
          description: |-
            ビデオエフェクトテンプレート名（オプション）
            エフェクトを使用する場合、prompt パラメータは無効です
            モデルによってサポートするエフェクトテンプレートが異なります
          type: string
        watermark:
          description: |-
            ウォーターマークを追加するかどうか（オプション、デフォルト false）
            ウォーターマークはビデオの右下に表示され、テキストは固定で「AI生成」です
          type: boolean
      required:
        - image_url
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: タスクID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: '機械可読なエラーコード（例: TASK.INVALID_PARAMS）'
          type: string
        message:
          description: ユーザーフレンドリーなエラーメッセージ
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: API Tokenを使用して認証を行ってください

````