openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/ailabtools/face-beauty
info:
  title: Face Beauty
  version: 1.11.1
  description: Enhance facial beauty in images with our Face Beauty API, offering
    customizable adjustments for skin smoothing, whitening, sharpening, and
    more.
paths:
  /portrait/effects/face-beauty:
    post:
      tags:
        - AI Portrait > Portrait effects
      summary: Face Beauty
      operationId: 84f3f831640dc57b2668abd99d980ef9
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              required:
                - image
              properties:
                image:
                  description: "<li>Image format: `JPEG` `JPG` `PNG` `BMP`</li> <li>Image size: No
                    more than 3 MB.</li> <li>Image resolution: Larger than
                    10x10px, smaller than 2000x2000px.</li> <li>Image quality
                    recommendation: Suitable for portrait images of most skin
                    types, with average results for images containing scenes
                    with more severe discoloration, acne, or low exposure.</li>"
                  type: file
                sharp:
                  description: Sharpness level. A higher value indicates a greater degree of
                    sharpness.
                  type: number
                  format: float
                  default: 1
                  enum:
                    - 0
                    - 0.1
                    - 0.2
                    - 0.3
                    - 0.4
                    - 0.5
                    - 0.6
                    - 0.7
                    - 0.8
                    - 0.9
                    - 1
                smooth:
                  description: Smoothness level. A higher value results in a smoother appearance.
                  type: number
                  format: float
                  default: 1
                  enum:
                    - 0
                    - 0.1
                    - 0.2
                    - 0.3
                    - 0.4
                    - 0.5
                    - 0.6
                    - 0.7
                    - 0.8
                    - 0.9
                    - 1
                white:
                  description: Whitening level. A higher value leads to lighter skin.
                  type: number
                  format: float
                  default: 1
                  enum:
                    - 0
                    - 0.1
                    - 0.2
                    - 0.3
                    - 0.4
                    - 0.5
                    - 0.6
                    - 0.7
                    - 0.8
                    - 0.9
                    - 1
              type: object
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                allOf:
                  - properties:
                      data:
                        type: object
                        allOf:
                          - properties:
                              image_url:
                                description: "Resulting image URL address. `Expiration: 24 hours.`"
                                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. If there is a problem that cannot be located, this
            field can be sent to technology for problem location.
          type: string
        log_id:
          description: Log ID. If there is a problem that cannot be located, this field
            can be sent to technology for problem location.
          type: string
        error_code:
          description: "Status code. When HTTP Status is 200: `error_code`=0; otherwise
            exactly the same as HTTP Status."
          type: integer
        error_code_str:
          description: Error Code.
          type: string
        error_msg:
          description: Error message.
          type: string
        error_detail:
          type: object
          allOf:
            - properties:
                status_code:
                  description: Status Code.
                  type: integer
                code:
                  description: "Error Code. Compared to the `error_code_str` field: The code field
                    is more precise."
                  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
      type: object
security: {}
tags:
  - name: face-tools
    description: Operations related to face-tools
  - name: background-removal
    description: Operations related to background-removal
  - name: image-upscaling
    description: Operations related to image-upscaling
