openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/ailabtools/smart-beauty
info:
  title: Smart Beauty
  version: 1.12.0
  description: Enhance facial beauty in images using our GAN-powered Smart Beauty
    API, supporting up to 18 faces per photo.
paths:
  /portrait/enhance/facepretty:
    post:
      tags:
        - AI PORTRAIT > Portrait Enhance
      summary: Smart Beauty
      operationId: 9e7621a0b3da1c32d45181ad00b7e037
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              required:
                - image_target
              properties:
                image_target:
                  description: "<li>Image format: `JPEG` `JPG` `BMP` `PNG`</li> <li>Image size: No
                    more than 5 MB.</li> <li>Image resolution: Less than
                    4096x4096px.</li>"
                  type: file
                multi_face:
                  description: Multiple-face beauty strategy. When set to 1, beauty enhancement is
                    applied to all faces (it is recommended that the number of
                    faces in the image be less than 18, as too many faces may
                    lead to instability). When set to any other value or not
                    specified, only the largest face is processed.
                  type: string
                  enum:
                    - ""
                    - "1"
                beauty_level:
                  description: Beauty level.
                  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:
                                description: The result image, returning the Base64 encoding of the image.
                                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: artificial-intelligence
    description: Operations related to artificial-intelligence
  - name: visual-recognition
    description: Operations related to visual-recognition
