> ## 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 Image-to-Image

> Use Tongyi Wanxiang Wan2 image-to-image model (wan2.5-i2i-preview) for image editing and multi-image fusion

Edit and fuse images using [Alibaba Cloud](https://tongyi.aliyun.com/wan)'s Tongyi Wanxiang Wan2.5 model.

**Key Features:**

* **Subject Consistency** - Image editing based on subject consistency
* **Multi-Image Fusion** - Support multiple image inputs for creative fusion
* **One-Sentence Editing** - Complete complex edits through simple text instructions
* **Native Chinese** - Describe editing requirements directly in Chinese


## OpenAPI

````yaml /en/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 Model Task Scheduling Platform 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: Production server
security: []
paths:
  /generate/bailian/wan2-image-to-image:
    post:
      tags:
        - public
      summary: Tongyi Wanxiang Wan2 Image-to-Image
      description: >-
        Use Tongyi Wanxiang Wan2 image-to-image model (wan2.5-i2i-preview) for
        image editing and multi-image fusion
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bailian.CreateWan2ImageToImageTaskRequest'
        description: Task parameters
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/dto.CreateTaskResponse'
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '404':
          description: Model not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    bailian.CreateWan2ImageToImageTaskRequest:
      properties:
        images:
          description: |-
            Input image URL list (required, 1-3 images)
            Supports public URLs (HTTP/HTTPS) or Base64 encoding
          items:
            type: string
          maxItems: 3
          minItems: 1
          type: array
        negative_prompt:
          description: Negative prompt (optional, max 500 characters)
          maxLength: 500
          type: string
        prompt:
          description: Positive prompt (required, max 2000 characters)
          maxLength: 2000
          minLength: 1
          type: string
        seed:
          description: Random seed (optional, range 0-2147483647)
          maximum: 2147483647
          minimum: 0
          type: integer
        size:
          description: |-
            Output resolution (optional, default 1280*1280)
            Total pixels [768*768, 1280*1280], aspect ratio [1:4, 4:1]
          type: string
      required:
        - images
        - prompt
      type: object
    dto.CreateTaskResponse:
      properties:
        task_id:
          description: Task ID
          example: 01234567-89ab-cdef-0123-456789abcdef
          type: string
      required:
        - task_id
      type: object
    apierror.ErrorResponse:
      properties:
        error_code:
          description: Machine-readable error code (e.g., TASK.INVALID_PARAMS)
          type: string
        message:
          description: User-friendly error message
          type: string
      type: object
  securitySchemes:
    AccessToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Please use your API Token for authentication

````