> ## 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 画像生成モデル（wan2.5-i2i-preview）を使用した画像編集および複数画像の融合

[アリババクラウド](https://tongyi.aliyun.com/wan) Tongyi Wanxiang Wan2.5 モデルを使用して画像編集と複数画像の融合を行います。

**モデルの特徴:**

* **主体一貫性** - 主体一貫性に基づく画像編集能力
* **複数画像融合** - 複数画像入力によるクリエイティブな融合をサポート
* **ワンフレーズ編集** - シンプルなテキスト指示で複雑な編集を完了
* **中国語ネイティブ** - 中国語で直接編集要件を記述可能


## OpenAPI

````yaml /ja/openapi.yaml POST /generate/bailian/wan2-image-to-image
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-image:
    post:
      tags:
        - public
      summary: 通義萬相 Wan2 画像から画像生成
      description: 通義萬相 Wan2 画像生成モデル（wan2.5-i2i-preview）を使用した画像編集および複数画像の融合
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bailian.CreateWan2ImageToImageTaskRequest'
        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.CreateWan2ImageToImageTaskRequest:
      properties:
        images:
          description: |-
            入力画像 URL リスト（必須、1-3枚）
            公衆インターネット URL（HTTP/HTTPS）または Base64 エンコードをサポート
          items:
            type: string
          maxItems: 3
          minItems: 1
          type: array
        negative_prompt:
          description: ネガティブプロンプト（オプション、最大 500 文字）
          maxLength: 500
          type: string
        prompt:
          description: ポジティブプロンプト（必須、最大 2000 文字）
          maxLength: 2000
          minLength: 1
          type: string
        seed:
          description: ランダムシード（オプション、範囲 0-2147483647）
          maximum: 2147483647
          minimum: 0
          type: integer
        size:
          description: |-
            出力解像度（オプション、デフォルト 1280*1280）
            総ピクセル数 [768*768, 1280*1280]、アスペクト比 [1:4, 4:1]
          type: string
      required:
        - images
        - prompt
      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を使用して認証を行ってください

````