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

# Qwen Image 2.0

> Qwen Image 2.0 accelerated model, supports text-to-image and image editing with flexible resolution and multi-image output (1-6 images).

Generate images using [Alibaba Cloud](https://www.alibabacloud.com)'s Qwen Image 2.0 accelerated model.

**Key Features:**

* **Free Resolution** - Supports flexible width and height, total pixels between 512x512 and 2048x2048
* **Multi-Image Output** - Generate 1-6 images per request
* **Text-to-Image & Image Editing** - Supports both text-to-image generation and image editing modes


## OpenAPI

````yaml /en/openapi.yaml POST /generate/bailian/qwen-image-2.0
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/qwen-image-2.0:
    post:
      tags:
        - public
      summary: Qwen Image 2.0 Generation
      description: >-
        Qwen Image 2.0 accelerated model, supports text-to-image and image
        editing with flexible resolution and multi-image output (1-6 images).
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/bailian.CreateQwenImage20TaskRequest'
        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.CreateQwenImage20TaskRequest:
      properties:
        images:
          description: |-
            Input image list (optional, 0-3 images, for image editing mode)
            Omit for text-to-image mode, provide for image editing mode
          items:
            type: string
          maxItems: 3
          type: array
        'n':
          description: Number of output images (optional, 1-6, default 1)
          maximum: 6
          minimum: 1
          type: integer
        negative_prompt:
          description: Negative prompt (optional, max 500 characters)
          maxLength: 500
          type: string
        prompt:
          description: Prompt (required, max 800 characters)
          maxLength: 800
          minLength: 1
          type: string
        prompt_extend:
          description: Enable smart prompt rewriting (optional, default true)
          type: boolean
        seed:
          description: Random seed (optional, range 0-2147483647)
          maximum: 2147483647
          minimum: 0
          type: integer
        size:
          description: >-
            Image size (optional, default 2048*2048)

            qwen-image-2.0 supports flexible dimensions, total pixels between
            512*512 and 2048*2048

            Recommended resolutions: 2688*1536(16:9) 1536*2688(9:16)
            2048*2048(1:1) 2368*1728(4:3) 1728*2368(3:4)
          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

````