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

# Qwen Image Edit Max Generation

> Edit images using the qwen-image-edit-max model.

This model supports multi-image input and output. It can:
- Accurately modify text in images
- Add, delete, or move objects
- Change the action of a subject
- Transfer image styles
- Enhance image details
- Multi-image fusion (combine elements from up to 3 images)

Key features:
- Supports 1-3 input images
- Can generate 1-6 output images
- Supports custom output resolutions
- Supports intelligent prompt optimization

<Note>
  This is the premium tier of Qwen Image Edit model with enhanced quality and capabilities. For more details, refer to the official documentation.
</Note>

## Overview

Edit and enhance images using the qwen-image-edit-max model. This premium image editing model supports multi-image input and output with powerful editing capabilities at a higher quality tier.

## Key Features

* **Multi-image support**: Input 1-3 images for complex editing tasks
* **Precise text editing**: Accurately modify text content in images
* **Object manipulation**: Add, delete, or move objects within images
* **Action modification**: Change the action or pose of subjects
* **Style transfer**: Apply different artistic styles to images
* **Detail enhancement**: Improve image clarity and details
* **Image fusion**: Combine elements from multiple images (up to 3)
* **Flexible output**: Generate 1-6 images per request
* **Premium Quality**: Enhanced results compared to the Plus tier

## Pricing

**\$0.075 per image** - Premium tier with enhanced quality

Compare with Qwen Image Edit Plus: \$0.03 per image

## Image Requirements

| Property        | Requirement                                             |
| --------------- | ------------------------------------------------------- |
| **Formats**     | JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF (first frame only) |
| **Resolution**  | Width and height: 384-3072 pixels                       |
| **File Size**   | Max 10MB per image                                      |
| **Input Count** | 1-3 images                                              |
| **Input Type**  | Public URL or Base64-encoded data                       |

## Resolution Guidelines

* **Default**: Maintains aspect ratio similar to input with resolution close to 1024\*1024
* **Custom**: Specify width\*height with both dimensions in range \[512, 2048] pixels
* **Aspect Ratio**: Determined by the last input image

## Example Requests

### Basic Single Image Edit

```json theme={null}
{
  "images": ["https://example.com/photo.jpg"],
  "prompt": "Change the person's shirt to red"
}
```

### Text Modification

```json theme={null}
{
  "images": ["https://example.com/sign.jpg"],
  "prompt": "Change the text on the sign from 'OPEN' to 'CLOSED'",
  "n": 1,
  "size": "1024*768"
}
```

### Multi-image Fusion

```json theme={null}
{
  "images": [
    "https://example.com/person.jpg",
    "https://example.com/background.jpg",
    "https://example.com/object.jpg"
  ],
  "prompt": "Place the person from Image 1 in the background from Image 2, holding the object from Image 3",
  "n": 4,
  "prompt_extend": true
}
```

### Style Transfer with Negative Prompt

```json theme={null}
{
  "images": ["https://example.com/portrait.jpg"],
  "prompt": "Transform this portrait into a watercolor painting style",
  "negative_prompt": "low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions",
  "size": "1024*1024",
  "n": 2,
  "seed": 42
}
```

### Object Addition

```json theme={null}
{
  "images": ["https://example.com/room.jpg"],
  "prompt": "Add a modern floor lamp in the left corner of the room",
  "n": 3,
  "prompt_extend": true
}
```

## Parameters

### images (Required)

* **Type**: Array of strings
* **Count**: 1-3 images
* **Format**: URL or Base64-encoded image data
* **Note**: For multi-image input, reference them as "Image 1", "Image 2", "Image 3" in the prompt
* **Aspect Ratio**: Output aspect ratio is determined by the last image in the array

### prompt (Required)

* **Type**: String
* **Max Length**: 800 characters
* **Languages**: Chinese and English supported
* **Description**: Clear instructions for what you want to change or add to the image(s)

### negative\_prompt

* **Type**: String or null
* **Max Length**: 500 characters
* **Default**: null
* **Purpose**: Describe elements you want to avoid in the output
* **Example**: "low resolution, error, worst quality, low quality, disfigured"

### size

* **Type**: String
* **Format**: "width\*height" (e.g., "1024\*768")
* **Range**: Both width and height must be \[512, 2048] pixels
* **Default**: Auto-adjusted to maintain input aspect ratio near 1024\*1024

### n (Number of Images)

* **Range**: 1-6
* **Default**: 1
* **Note**: Each image incurs the per-image cost

### prompt\_extend (Prompt Rewriting)

* **Type**: Boolean
* **Default**: true
* **Effect**: Uses AI to enhance and optimize prompts for better results
* **Recommendation**: Especially useful for short or simple prompts

### seed (Random Seed)

* **Range**: 0 to 2,147,483,647
* **Purpose**: Helps ensure consistency across generations
* **Note**: Same seed doesn't guarantee identical results but improves reproducibility

## Use Cases

1. **E-commerce**: Change product colors, add accessories, or modify backgrounds
2. **Marketing**: Update text in promotional images, swap logos, or adjust layouts
3. **Photo Editing**: Remove unwanted objects, change clothing, or enhance details
4. **Creative Design**: Combine elements from multiple images, apply artistic styles
5. **Content Creation**: Generate variations with different actions or compositions

## Tips for Best Results

* Be specific and descriptive in your prompts
* Use "Image 1", "Image 2", "Image 3" when working with multiple images
* Enable `prompt_extend` for more polished results
* Use negative prompts to avoid common quality issues
* Request multiple outputs (n > 1) to explore variations
* Specify custom size when aspect ratio control is important


## OpenAPI

````yaml api-reference/endpoint/alibaba/qwen-image-edit-max/qwen-image-edit-max.yaml POST /vendors/alibaba/v1/qwen-image-edit-max/generation
openapi: 3.1.0
info:
  title: Qwen-Image-Edit-Max API
  description: Qwen-Image-Edit-Max Image Editing Model API
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.mulerouter.ai/
security:
  - bearerAuth: []
paths:
  /vendors/alibaba/v1/qwen-image-edit-max/generation:
    post:
      summary: Create Generation Task
      description: |-
        Edit images using the qwen-image-edit-max model.

        This model supports multi-image input and output. It can:
        - Accurately modify text in images
        - Add, delete, or move objects
        - Change the action of a subject
        - Transfer image styles
        - Enhance image details
        - Multi-image fusion (combine elements from up to 3 images)

        Key features:
        - Supports 1-3 input images
        - Can generate 1-6 output images
        - Supports custom output resolutions
        - Supports intelligent prompt optimization
      operationId: qwen_image_edit_max_generation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QwenImageEditMaxRequest'
        required: true
      responses:
        '202':
          description: Accepted - Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreatedResponse'
components:
  schemas:
    QwenImageEditMaxRequest:
      type: object
      additionalProperties: false
      properties:
        images:
          type: array
          description: >-
            Array of input image URLs or Base64-encoded images.

            Supports 1-3 images.

            For multi-image input, the order defines their sequence.

            The aspect ratio of the output image is determined by the last
            image.


            Image requirements:

            - Formats: JPG, JPEG, PNG, BMP, TIFF, WEBP, GIF (first frame only)

            - Resolution: Width and height should be between 384 and 3072 pixels

            - Size: No larger than 10 MB
          items:
            type: string
            description: Image URL or Base64-encoded image data
          minItems: 1
          maxItems: 3
        prompt:
          type: string
          description: >-
            Image editing instruction (max 800 characters).

            Describes the elements and visual features you want in the generated
            image.

            When editing multiple images, use "Image 1", "Image 2", "Image 3" to
            refer to corresponding images.

            Supports both Chinese and English.
          maxLength: 800
        negative_prompt:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Negative prompt describing unwanted content (max 500 characters).

            Used to constrain the image generation.

            Example: low resolution, error, worst quality, low quality,
            disfigured, extra fingers, bad proportions.
          maxLength: 500
        size:
          type: string
          description: >-
            Output image resolution in format "width*height" (e.g.,
            "1024*1024").

            Width and height must be in range [512, 2048] pixels.

            Example: "1024*1024", "768*1024", "512*512"


            Leave empty to maintain aspect ratio similar to input image with
            resolution close to 1024*1024.
        'n':
          type: integer
          description: Number of images to generate (1-6).
          minimum: 1
          maximum: 6
          default: 1
        prompt_extend:
          type: boolean
          description: >-
            Enable intelligent prompt rewriting.

            When enabled, a large language model optimizes the positive prompt.

            Significantly improves results for simple or less descriptive
            prompts.
          default: true
        seed:
          type: integer
          description: >-
            Random seed for reproducibility [0, 2147483647].

            Using the same seed helps ensure consistency of generated content.

            Note: Results are not guaranteed to be identical for every call even
            with the same seed.
          minimum: 0
          maximum: 2147483647
        safety_filter:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Enable content safety filter. Defaults to true. Set to false to
            disable content safety inspection.
          default: true
      required:
        - images
        - prompt
    TaskCreatedResponse:
      type: object
      additionalProperties: true
      properties:
        task_info:
          $ref: '#/components/schemas/TaskInfoCreated'
    TaskInfoCreated:
      type: object
      additionalProperties: true
      properties:
        id:
          type: string
          description: UUID of the task
          format: uuid
        status:
          type: string
          description: Task status (pending when created)
          enum:
            - pending
        created_at:
          type: string
          description: Task creation timestamp (ISO 8601)
          format: date-time
        updated_at:
          type: string
          description: Task last update timestamp (ISO 8601)
          format: date-time
      required:
        - id
        - status
        - created_at
        - updated_at
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````