openapi: 3.0.0
servers:
  - url: https://prod.api.market/api/v1/ailabtools/skin-analyze
info:
  title: Skin Analyze
  version: 1.11.0
  description: Analyze facial skin conditions in images with our Skin Analyze API,
    detecting skin color, texture, wrinkles, acne, dark circles, and more.
paths:
  /portrait/analysis/skinanalyze:
    post:
      tags:
        - AI Portrait > Analyze
      summary: Skin Analyze
      operationId: 8960a3afaeb2f3403c5913490b49b576
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              required:
                - image
              properties:
                image:
                  description: "<li>Image format: `JPG` `JPEG`</li> <li>Image size: No more than 5
                    MB.</li> <li>Image resolution: Larger than 200x200px,
                    smaller than 4096x4096px.</li> <li>Minimum face pixel size:
                    To ensure the effect, it is recommended that the minimum
                    value of the face box (square) side length in the image is
                    not less than 200 pixels. Calibration size: minimum of 160
                    pixels. The minimum value of the face frame edge length is
                    not less than one-tenth of the shortest edge of the
                    image.</li> <li>Face quality: The higher the face quality,
                    the more accurate the skin analysis. Factors affecting face
                    quality include: occlusion of the five facial features,
                    blurred images, improper lighting (bright, dark, backlight),
                    excessive face angle (roll ≤ ±45°, yaw ≤ ±45°, pitch ≤ ±45°
                    are recommended), etc.</li>"
                  type: file
              type: object
      responses:
        "200":
          description: ""
          content:
            application/json:
              schema:
                allOf:
                  - properties:
                      warning:
                        description: "Interference factors affecting the calculation results.
                          <li>`imporper_headpose`: Improper head angle (Judgment
                          condition roll,yaw,pitch exceeds [-45,45]).</li>"
                        type: array
                        items:
                          type: string
                        enum:
                          - imporper_headpose
                      face_rectangle:
                        description: The position of the face rectangle box.
                        type: object
                      result:
                        description: Results of face skin analysis.
                        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: data
    description: Operations related to data
  - name: visual-recognition
    description: Operations related to visual-recognition
  - name: artificial-intelligence
    description: Operations related to artificial-intelligence
