openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/ailabtools/remove-objects-advanced
info:
  title: Remove Objects Advanced
  version: 1.12.0
  description: Our AI-powered API removes text, people, and objects with precision
    using a mask image, enabling fast edits while preserving the rest of your
    image.
paths:
  /image/editing/remove-objects-advanced:
    post:
      tags:
        - AI IMAGE > Image Editing
      summary: Remove Objects Advanced
      operationId: 52a374c148b593b8bdbb838e7222131c
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              required:
                - image
                - mask
              properties:
                image:
                  description: "Original image. <li>Image format: `JPEG` `JPG` `PNG`</li>
                    <li>Image size: No more than 5 MB.</li> <li>Image
                    resolution: Larger than 64x64px, smaller than
                    4096x4096px.</li>"
                  type: file
                mask:
                  description: "Mask image. <li>Image format: `JPEG` `JPG` `PNG`</li> <li>Image
                    size: No more than 5 MB.</li> <li>Image resolution: Larger
                    than 64x64px, smaller than 4096x4096px.</li>
                    <li>Single-channel grayscale image (0-255).</li>
                    <li>Three-channel image, with equal RGB values.</li>
                    <li>RGBA four-channel image, with equal RGB values and the A
                    channel all set to 255.</li> <li>File format: 8-bit PNG
                    encoding, do not embed 'ICC Profile'.</li>"
                  type: file
                steps:
                  description: Sampling steps determine the level of detail in the generated
                    image. A higher value may result in better quality, but it
                    will significantly increase the processing time.
                  type: integer
                  default: 30
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 17
                    - 18
                    - 19
                    - 20
                    - 21
                    - 22
                    - 23
                    - 24
                    - 25
                    - 26
                    - 27
                    - 28
                    - 29
                    - 30
                    - 31
                    - 32
                    - 33
                    - 34
                    - 35
                    - 36
                    - 37
                    - 38
                    - 39
                    - 40
                    - 41
                    - 42
                    - 43
                    - 44
                    - 45
                    - 46
                    - 47
                    - 48
                    - 49
                    - 50
                    - 51
                    - 52
                    - 53
                    - 54
                    - 55
                    - 56
                    - 57
                    - 58
                    - 59
                    - 60
                    - 61
                    - 62
                    - 63
                    - 64
                    - 65
                    - 66
                    - 67
                    - 68
                    - 69
                    - 70
                    - 71
                    - 72
                    - 73
                    - 74
                    - 75
                    - 76
                    - 77
                    - 78
                    - 79
                    - 80
                    - 81
                    - 82
                    - 83
                    - 84
                    - 85
                    - 86
                    - 87
                    - 88
                    - 89
                    - 90
                    - 91
                    - 92
                    - 93
                    - 94
                    - 95
                    - 96
                    - 97
                    - 98
                    - 99
                    - 100
                strength:
                  description: The smaller the value, the closer it is to the original image.
                  type: number
                  format: float
                  default: 0.8
                  enum:
                    - 0.1
                    - 0.2
                    - 0.3
                    - 0.4
                    - 0.5
                    - 0.6
                    - 0.7
                    - 0.8
                    - 0.9
                    - 1
                scale:
                  description: The degree to which the text description influences the output.
                  type: number
                  format: float
                  default: 7
                  enum:
                    - 1
                    - 2
                    - 3
                    - 4
                    - 5
                    - 6
                    - 7
                    - 8
                    - 9
                    - 10
                    - 11
                    - 12
                    - 13
                    - 14
                    - 15
                    - 16
                    - 17
                    - 18
                    - 19
                    - 20
                seed:
                  description: Random seed, used as the basis for determining the initial state of
                    the diffusion process. It must be a non-negative number
                    (`-1` represents a random seed). If the random seed is the
                    same positive integer and all other parameters are
                    identical, the generated image will most likely be
                    consistent.
                  type: integer
                  default: 0
              type: object
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                allOf:
                  - properties:
                      data:
                        type: object
                        allOf:
                          - properties:
                              binary_data_base64:
                                description: Output the processed image as a Base64 array (single image).
                                type: array
                                items:
                                  type: string
                            type: object
                    type: object
                  - $ref: "#components/schemas/commonResponses"
        "400":
          description: Bad Request
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "404":
          description: Not Found
        "405":
          description: Method Not Allowed
        "409":
          description: Conflict
        "410":
          description: Gone
        "413":
          description: Payload Too Large
        "415":
          description: Unsupported Media Type
        "422":
          description: Unprocessable Entity
        "429":
          description: Too Many Requests
        "500":
          description: Internal Server Error
        "502":
          description: Bad Gateway
        "503":
          description: Service Unavailable
        "504":
          description: Gateway Timeout
    parameters:
      - description: API.market API Key
        in: header
        name: x-api-market-key
        value: Please Login/Signup to get an API Key
        required: true
        schema:
          type: string
components:
  schemas:
    commonResponses:
      properties:
        request_id:
          description: Request ID. <li>If there is a problem that cannot be located, this
            field can be sent to technology for problem location.</li>
          type: string
        log_id:
          description: Log ID. <li>If there is a problem that cannot be located, this
            field can be sent to technology for problem location.</li>
          type: string
        error_code:
          description: "Status code. <li>When HTTP Status is 200: error_code=0; otherwise
            exactly the same as HTTP Status.</li>"
          type: integer
        error_detail:
          type: object
          allOf:
            - properties:
                status_code:
                  description: Status Code.
                  type: integer
                code:
                  description: Error Code.
                  type: string
                code_message:
                  description: The information represented by the Error Code(`code`).
                  type: string
                message:
                  description: Supplementary information for the `code_message` field.
                  type: string
              type: object
        error_msg:
          description: Error message.
          type: string
      type: object
security: {}
tags:
  - name: tools
    description: Operations related to tools
  - name: visual-recognition
    description: Operations related to visual-recognition
  - name: artificial-intelligence
    description: Operations related to artificial-intelligence
