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

# Image Mixer

> This endpoint generates image by mixing multiple images.

<Tip>
  Together with the image you can add your description of the desired result by passing prompt and negative prompt.
</Tip>

### Image Mixer

<img src="https://mintcdn.com/mod/i8dYICFkuz1vpdrI/images/image-editing/assets/images/Image-Mixer-d9cc7c7856e2678cf74bc7fa034e174d.jpg?fit=max&auto=format&n=i8dYICFkuz1vpdrI&q=85&s=8219d89e643fbf28e8e1825dc2dc819f" alt="Image-Mixer endpoint result" width="691" height="518" data-path="images/image-editing/assets/images/Image-Mixer-d9cc7c7856e2678cf74bc7fa034e174d.jpg" />

## Request

Make a `POST` request to below endpoint and pass the required parameters as a request body to the endpoint.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v6/image_editing/img_mixer' \
```

## Body

```json json theme={null}
{    
    "key":"",    
    "seed":12345,    
    "init_image":[        
        "https://assets.modelslab.ai/generations/063c90e1-1740-410c-be84-23d379dcfee2",        
        "https://assets.modelslab.ai/generations/8205b5be-c212-4a3e-ba74-3c824b8acc25"    
        ],    
    "prompt":"rose man",    
    "negative_prompt":"A polluted city",    
    "width":800,    
    "height":600,    
    "guidance_scale":10,    
    "steps":41,    
    "samples":1
}
```


## OpenAPI

````yaml POST /image_editing/img_mixer
openapi: 3.1.0
info:
  title: ModelsLab Image Editing API
  description: >-
    Image editing endpoints for ModelsLab API including background removal,
    super resolution, face generation, fashion try-on, and various image
    manipulation tools
  license:
    name: MIT
  version: 6.0.0
servers:
  - url: https://modelslab.com/api/v6
    description: Image Editing API v6 server
security: []
paths:
  /image_editing/img_mixer:
    post:
      summary: Image mixer
      description: This endpoint generates image by mixing multiple images
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImageMixerRequest'
      responses:
        '200':
          description: Image mixer response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageEditingSuccessResponse'
                  - $ref: '#/components/schemas/ImageEditingProcessingResponse'
                  - $ref: '#/components/schemas/ImageEditingErrorResponse'
components:
  schemas:
    ImageMixerRequest:
      type: object
      required:
        - key
        - prompt
        - init_image
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        prompt:
          type: string
          description: Text prompt with description of the things you want in the image
        negative_prompt:
          type: string
          description: Items you don't want in the image
        init_image:
          type: array
          items:
            type: string
            format: uri
          maxItems: 4
          description: An array of image URLs to mix
        width:
          type: integer
          maximum: 1024
          description: >-
            The width of the generated images, If not provided, the width of
            init_image is used
        height:
          type: integer
          maximum: 1024
          description: >-
            The height of the generated images, If not provided, the height of
            init_image is used
        steps:
          type: integer
          minimum: 1
          maximum: 50
          description: Number of denoising steps
        guidance_scale:
          type: number
          minimum: 1
          maximum: 20
          description: Scale for classifier-free guidance
        seed:
          type: integer
          description: Seed used to reproduce results
        samples:
          type: integer
          maximum: 1
          description: Number of images to be returned in response
        webhook:
          type: string
          format: uri
          description: URL to receive POST API call when complete
        track_id:
          type: integer
          description: ID for webhook identification
    ImageEditingSuccessResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - success
        generationTime:
          type: number
          description: Time taken to generate the image in seconds
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
            format: uri
          description: Array of generated image URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs
        meta:
          type: object
          description: Metadata about the generation process
          additionalProperties: true
    ImageEditingProcessingResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - processing
        tip:
          type: string
          description: Information about the processing status
        eta:
          type: integer
          description: Estimated time remaining in seconds
        message:
          type: string
          description: Processing status message
        fetch_result:
          type: string
          format: uri
          description: URL to fetch the result when ready
        id:
          type: integer
          description: Unique identifier for the generation request
        output:
          type: array
          items:
            type: string
          description: Empty array during processing
        future_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of future image URLs
        proxy_links:
          type: array
          items:
            type: string
            format: uri
          description: Array of proxy image URLs
        meta:
          type: object
          description: Metadata about the generation process
          additionalProperties: true
    ImageEditingErrorResponse:
      type: object
      properties:
        status:
          type: string
          enum:
            - error
        message:
          type: string
          description: Error message describing what went wrong

````