> ## 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.

# Wan 2.7 Image

> Wanx 2.7 image generation and editing model, supports text-to-image and image editing. Omit images for text-to-image mode, provide images (up to 9) for image editing mode.

Generate and edit images using [Alibaba Cloud](https://www.alibabacloud.com)'s Wanxiang 2.7 image model.

**Key Features:**

* **Text-to-Image & Image Editing** - Supports both text-to-image generation and image editing (up to 9 reference images)
* **High Resolution** - Supports 1K and 2K output resolution
* **Long Prompts** - Supports prompts up to 5000 characters


## OpenAPI

````yaml /en/openapi.yaml POST /generate/bailian/wan27-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/wan27-image:
    post:
      tags:
        - public
      summary: Wanx 2.7 Image Generation
      description: >-
        Wanx 2.7 image generation and editing model, supports text-to-image and
        image editing. Omit images for text-to-image mode, provide images (up to
        9) for image editing mode.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bailian.CreateWan27ImageTaskRequest'
        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'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/apierror.ErrorResponse'
      security:
        - AccessToken: []
components:
  schemas:
    bailian.CreateWan27ImageTaskRequest:
      properties:
        images:
          description: |-
            Input image URL list (optional, 0-9 images, for image editing mode)
            Omit for text-to-image mode, provide for image editing mode
          items:
            type: string
          maxItems: 9
          type: array
        prompt:
          description: Prompt (required, max 5000 characters)
          maxLength: 5000
          minLength: 1
          type: string
        seed:
          description: Random seed (optional, range 0-2147483647)
          maximum: 2147483647
          minimum: 0
          type: integer
        size:
          description: |-
            Output resolution (optional, default 2K)
            wan2.7-image supports 1K, 2K
          enum:
            - 1K
            - 2K
          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

````