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

# Mask Creator

> This endpoint helps to mask an object on a given image.

## Request

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

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

## Body

```json json theme={null}
{    
  "key": "your_api_key",    
  "init_image": "https://i.ibb.co/kMRK2mg/image2.jpg",    
  "specific_object": "the ball",    
  "track_id":null,    
  "webhook":null
}
```


## OpenAPI

````yaml POST /image_editing/mask_creator
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/mask_creator:
    post:
      summary: Mask creator
      description: This endpoint helps to mask an object on a given image
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MaskCreatorRequest'
      responses:
        '200':
          description: Mask creator response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ImageEditingSuccessResponse'
                  - $ref: '#/components/schemas/ImageEditingProcessingResponse'
                  - $ref: '#/components/schemas/ImageEditingErrorResponse'
components:
  schemas:
    MaskCreatorRequest:
      type: object
      required:
        - key
        - specific_object
      properties:
        key:
          type: string
          description: Your API Key used for request authorization
        specific_object:
          type: string
          description: Description of the object to mask
        base64:
          type: boolean
          description: True or false for base64 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

````