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

# Fashion

> This endpoint allows you to wear a cloth image sample on an existing model body

### Fashion

<img src="https://mintcdn.com/mod/i8dYICFkuz1vpdrI/images/image-editing/assets/images/Fashion-ae35005b2e022cc90044d7760c301db9.jpg?fit=max&auto=format&n=i8dYICFkuz1vpdrI&q=85&s=96c60841071c3ee0075dc8103ad3a94e" alt="Fashion endpoint result" width="691" height="518" data-path="images/image-editing/assets/images/Fashion-ae35005b2e022cc90044d7760c301db9.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/fashion' \
```

## Body

```json json theme={null}
{   
       "key": "your_api_key",   
       "prompt": ":A realistic photo of a model wearing a beautiful t-shirt",   
       "negative_prompt": "Low quality, unrealistic, bad cloth, warped cloth",   
       "init_image": "https://assets.modelslab.ai/generations/9f8b17c2-5b41-42da-8bcb-290710eb53bd.png",   
       "cloth_image": "https://assets.modelslab.ai/generations/8e7ff52e-124b-4f6a-a04a-3340f41a1bc0.png",   
       "cloth_type": "upper_body",   
       "guidance_scale": 7.5,   
       "num_inference_steps": 21,   
       "seed": null,   
       "temp": "no",   
       "webhook": null,   
       "track_id": null 
}
```


## OpenAPI

````yaml POST /image_editing/fashion
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/fashion:
    post:
      summary: Fashion try-on
      description: >-
        This endpoint allows you to wear a cloth image sample on an existing
        model body
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FashionRequest'
      responses:
        '200':
          description: Fashion try-on response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageEditingSuccessResponse'
                  - $ref: '#/components/schemas/ImageEditingProcessingResponse'
                  - $ref: '#/components/schemas/ImageEditingErrorResponse'
components:
  schemas:
    FashionRequest:
      type: object
      required:
        - key
        - init_image
        - cloth_image
        - cloth_type
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        init_image:
          type: string
          format: uri
          description: The URL of the image of the model to try the dress on
        cloth_image:
          type: string
          format: uri
          description: The URL of the cloth/dress to try on
        cloth_type:
          type: string
          enum:
            - upper_body
            - lower_body
            - dresses
          description: Type of garment
        prompt:
          type: string
          description: The text prompt describing the things you want in the image
        negative_prompt:
          type: string
          description: Items you do not want in the image
        num_inference_steps:
          type: integer
          enum:
            - 21
            - 31
            - 41
          description: The number of denoising steps
        temp:
          type: string
          enum:
            - 'yes'
            - 'no'
          default: 'no'
          description: Set to yes for proxy links
        guidance_scale:
          type: integer
          minimum: 1
          maximum: 20
          description: The scale for classifier-free guidance
        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

````