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

# Q Image Edit Spicy Generation

> Edit an image based on a text prompt using the Qwen Image Edit Spicy model.

Keep the primary image in `image` and pass up to two additional images in
`reference_images`. Output composition and dimensions follow the primary image;
reference images are used in array order.

## Overview

Edit images using text prompts with the Q Image Edit Spicy model (`qwen-image-edit-spicy`). Supports adding, removing, or modifying elements, style transfer, and other image editing operations.

Keep the primary image in `image` and pass up to two additional images in `reference_images`. Output composition and dimensions follow the primary image; reference images are used in array order.

## Key Features

* Text-guided image editing
* Add, remove, or modify image elements
* Style transfer and background changes
* Up to 3 images: one primary image plus two optional reference images
* Optional random seed for reproducibility

## Multi-image Rules

* `image` is required and remains the primary image
* `reference_images` is optional and accepts up to two image URLs or base64-encoded images
* `reference_images[0]` is reference image 2; `reference_images[1]` is reference image 3
* Omit `reference_images`, use `null`, or pass `[]` for single-image editing; existing single-image calls need no change
* Unknown fields are ignored, preserving existing client behavior. Only `reference_images` supplies additional reference images.

## Example Requests

### Basic

```json theme={null}
{
  "image": "https://example.com/photo.png",
  "prompt": "Change the background to a sunny beach scene"
}
```

### With Seed

```json theme={null}
{
  "image": "https://example.com/photo.png",
  "prompt": "Add sunglasses to the person's face",
  "seed": 42
}
```

### Two Images

```json theme={null}
{
  "image": "https://example.com/main.png",
  "reference_images": [
    "https://example.com/ref2.png"
  ],
  "prompt": "Dress the person in the outfit from reference image 2"
}
```

### Three Images

```json theme={null}
{
  "image": "https://example.com/main.png",
  "reference_images": [
    "https://example.com/ref2.png",
    "https://example.com/ref3.png"
  ],
  "prompt": "Use the outfit from reference image 2 and the background from reference image 3",
  "seed": 42
}
```

## Pricing

Base price plus a surcharge for each additional reference image.

| Item | Price (USD) |
| :- | -: |
| Image editing (1 image) | \$0.04 / image |
| Image editing (2 images) | \$0.043 / image |
| Image editing (3 images) | \$0.046 / image |


## OpenAPI

````yaml api-reference/endpoint/carrothub/qwen-image-edit-spicy/qwen-image-edit-spicy.yaml POST /vendors/carrothub/v1/qwen-image-edit-spicy/generation
openapi: 3.1.0
info:
  title: Qwen Image Edit Spicy API
  description: >-
    Edit images using text prompts with the Qwen Image Edit Spicy model
    (CarrotHub / SmartStudio ecosystem).
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.mulerouter.ai/
security:
  - bearerAuth: []
paths:
  /vendors/carrothub/v1/qwen-image-edit-spicy/generation:
    post:
      summary: Create Generation Task
      description: >-
        Edit an image based on a text prompt using the Qwen Image Edit Spicy
        model.


        Keep the primary image in `image` and pass up to two additional images
        in

        `reference_images`. Output composition and dimensions follow the primary
        image;

        reference images are used in array order.
      operationId: qwen_image_edit_spicy_generation
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QwenImageEditSpicyRequest'
        required: true
      responses:
        '202':
          description: Accepted - Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreatedResponse'
components:
  schemas:
    QwenImageEditSpicyRequest:
      type: object
      additionalProperties: true
      properties:
        image:
          type: string
          minLength: 1
          description: >-
            Primary image to be edited. Supports an image URL or base64-encoded
            image data. Output composition and dimensions follow this image.
        reference_images:
          anyOf:
            - type: array
              maxItems: 2
              items:
                type: string
                minLength: 1
            - type: 'null'
          default: null
          description: >-
            Optional reference images as URLs or base64-encoded image data, up
            to two items. Items correspond to reference image 2 and reference
            image 3 in order. Omit, use null, or pass an empty array for
            single-image editing.
        prompt:
          type: string
          minLength: 1
          description: Text prompt describing the desired edit to apply to the image.
        seed:
          anyOf:
            - type: integer
            - type: 'null'
          description: Random seed. null or 0 for random generation.
          default: null
      required:
        - image
        - 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

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.