{
  "openapi": "3.0.0",
  "info": {
    "title": "面部属性与比例分析",
    "description": "# 概览\nAI 面部属性与比例分析会检视脸部结构，识别脸型、眼型、眉型、唇型、鼻型、颧骨等特征，用来提供量身定制的建议。\n\n## 接入指南\n* AI 面部属性与比例分析怎么拍照\n\n* 正脸自拍一张\n  - 拍一张清楚的照片即可，正对镜头。头发最好自然放下，整张脸都要露出来、不要有遮挡。把头发往后梳、露出额头，视线直视前方，拍出标准的正脸角度。\n  - 也可以用 JS Camera Kit 拍照。跟着自动脸部对齐、光线引导和脸部大小检测走，保证照片符合处理要求。\n\n* 如何用 AI 检测肌肤问题\n\n1. **调整源图尺寸**</br>\n  把图片缩放到支持的尺寸范围，详见 **[文件规格与错误码](#section/overview/File-Specs-and-Errors)**\n\n2. **用 File 接口上传文件**</br>\n  通过 ***/s2s/v2.0/file*** 接口上传目标用户图片。\n    - 图片要求\n      - 详见 **[文件规格与错误码](#section/overview/File-Specs-and-Errors)**。\n    - ***重要***：只调用 File 接口并不等于上传了文件。您必须**手动把文件上传到 File 接口响应中给出的那个 URL**，那个 URL 就是您的上传目标，务必确认文件已成功传过去，再继续往下做。<br>\n    调用 AI 接口之前，请确认文件已上传成功。先用 File 接口取到一个上传 URL，把文件上传到该位置。上传完成后，您会在响应中收到一个 ***file_id***，调用与该文件相关的 AI 功能时就用它。\n\n      > **警告：** 请注意，若未把文件上传到 File 接口响应中给出的 URL，调用 AI 接口时会得到 500 Server Error / unknown_internal_error 或 404 Not Found 错误。\n\n3. **执行 AI 面部属性与比例分析任务**</br>\n  上传完成后，就可以用文件 ID 选择要分析的多项脸部特征，详见 **[输入与输出](#section/overview/Inputs-and-Outputs)**。</br>\n  随后用文件 ID 调用 POST 'task/face-attr-analysis' 执行任务，\n  并取得 ***task_id***。\n\n4. **轮询任务状态，直到成功或报错**</BR>\n用这个 ***task_id*** 轮询 GET 'task/face-attr-analysis' 监控任务状态，取得引擎当前的处理进度。引擎完成任务之前，状态会一直是 'running'，这一阶段不消耗点数。\n\n    **警告：** 请注意，**轮询**任务状态必须按任务保留期来执行，是强制要求。保留期内没有任何轮询请求，任务就会超时，即使任务已处理成功也一样（您的点数照样会被消耗）。\n\n    > **警告：** 若去查询已超时任务的状态，会收到 ***InvalidTaskId*** 错误。因此，执行 AI 任务之后，必须在保留期内持续**轮询**，直到状态变为 *success* 或 *error*。\n\n5. **任务成功后取回结果**</BR>\n引擎成功处理您的输入文件、生成出图后，任务状态会变为 'success'。您会得到处理后图片的 URL 以及一个 dst_id，可直接串联下一个 AI 任务，不必把结果图重新上传。\n只有这种情况才会消耗点数。若引擎处理失败，任务状态会变为 'error'，不消耗点数。</BR>\n扣除点数时，系统优先扣除临近到期的点数；到期日相同时，优先扣除最早取得的点数。\n\n* 实际案例：\n![](https://plugins-media.makeupar.com/smb/blog/post/2025-01-15/10a4b980-f571-4d08-8f5d-e3ed48db77aa.jpg)\n\n## 输入与输出\n* 脸部特征：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/img_Face_Ratio_sec_01_01_enu_79380baa14.jpg)\n\n| **类别**     | **子类别**   | **请求参数** | **结果参数** | **结果类型** |\n| --- | --- | --- |  --- | --- |\n| **脸型 FACE** | 脸型 | `faceShape` | `faceshape` | Triangle、Diamond、Heart、InvTriangle、Oblong、Oval、Round、Square、Unknown |\n| **年龄与性别 AGE & GENDER** | 年龄 | `age` | `agegender.age` | 整数 |\n| | 性别 | `gender` | `agegender.gender` | female、male、unknown |\n| **眼睛 EYES** | 眼型 | `eyeShape` | `eyelid.left_shape`、`eyelid.right_shape` | Narrow、Round、Almond |\n| | 眼睛大小 | `eyeSize` | `eyelid.size` | Big、Small、Average |\n| | 眼型角度 | `eyeAngle` | `eyelid.left_angle`、`eyelid.right_angle` | Downturned、Upturned、Average |\n| | 眼距 | `eyeDistance` | `eyelid.setting` | Close-set、Wide-Set、Average |\n| | 眼皮 | `eyelid` | `eyelid.left_eyelid`、`eyelid.right_eyelid` | Hooded-lid、Single-lid、Double-lid、Deep-Set |\n| **眉毛 BROWS** | 眉型 | `eyebrowShape` | `eyebrow.left_shape`、`eyebrow.right_shape` | Hard Angled、Soft Angled、Straight、Rounded、Obscured |\n| | 眉毛粗细 | `eyebrowThickness` | `eyebrow.left_body_thickness`、`eyebrow.right_body_thickness` | Dense、Sparse、Average、Unknown |\n| | 眉距 | `eyebrowDistance` | `eyebrow.gap` | Far-Apart、Close、Average |\n| | 眉毛长短 | `eyebrowShortness` | `eyebrow.left_shortness`、`eyebrow.right_shortness` | Short、Normal |\n| **嘴唇 LIPS** | 唇型 | `lipShape` | `lipshape[]` | Bow、Downturned、Full、Heavy Lower Lip、Heavy Upper Lip、Narrow、Round、Thin、Wide、Average |\n| **鼻子 NOSE** | 鼻子宽窄 | `noseWidth` | `nose.width` | Narrow、Broad、Average |\n| | 鼻子长短 | `noseLength` | `nose.length` | Long、Short、Average |\n| **颧骨 CHEEKBONES**   | 颧骨 | `cheekbones` | `cheekbone.left`、`cheekbone.right`、`cheekbone.overall` | Flat Cheekbone、High Cheekbone、Low Cheekbone、Round Cheeks |\n\n\n---\n\n* 脸部比例：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/img_Face_Ratio_sec_01_03_2fe8f06b92.jpg)\n\n| **子类别** | **请求参数** | **结果参数** | **结果类型** | **说明** |\n| --- | --- | --- | --- | --- |\n| 横向三分比例 | `horizontalThird` | `horizontal_third` | 三段百分比；判读：Short / Balanced / Long；黄金比例：33% : 33% : 33% | 脸部横向比例把脸分成均等的三段：发际线到眉毛下缘、眉毛下缘到鼻底、鼻底到下巴尖。三段的理想比例（黄金比例）为 1:1:1。|\n| 纵向五等分比例 | `verticalFifth` | `vertical_fifth` | 五段百分比；判读（眼距与眼宽）：Narrow / Balanced / Wide；黄金比例：20% : 20% : 20% : 20% : 20% | 脸部纵向比例把脸分成五段：一只眼睛的宽度、两眼之间的距离，以及眼外角到脸部两侧边缘的间距。这五段的黄金比例为 1:1:1:1:1。 |\n| 脸部长宽比 | `faceAspectRatio` | `face_aspect_ratio` | `[1, r]`；判读：Short / Balanced / Long；黄金比例：1 : 1.46 | 脸部长宽比是脸部宽度与高度的关系，理想值为黄金比例 1:1.46，观感均衡好看。 |\n| 眼睛长宽比 | `eyeAspectRatio` | `left_eye_aspect_ratio` `right_eye_aspect_ratio` | `[1, r]`；判读：Round / Balanced / Flat；黄金比例：1 : 3 | 眼睛长宽比是眼睛高度与宽度的关系，理想值为黄金比例 1:3，视觉上最协调。\n |\n| 眉弓比例 | `eyebrowArch` | `left_eyebrow_arch_to_eyebrow_width` `right_eyebrow_arch_to_eyebrow_width` | `[1, r]`；判读：Short Arch / Balanced / Long Arch；黄金比例：1 : 1.618 | 理想眉弓比例取决于眉毛本身的形状，最高点（眉弓）落在黄金比例上，看起来最协调。 |\n| 眼高与眉距 | `eyeHeightToEyebrowDistance` | `left_eye_height_to_eyebrow_distance` `right_eye_height_to_eyebrow_distance` `overall_eye_height_to_eyebrow_distance` | `[1, r]`；判读：Short / Balanced / Long；黄金比例：1 : 1.618 | 眼与眉的距离指上眼皮最高点到眉毛最高点的垂直距离。理想状态下，它与眼高的比为黄金比例 1.618:1，眼与眉的呼应最协调。 |\n| 鼻子长宽比 | `noseAspectRatio` | `nose_aspect_ratio` | `[1, r]`；判读：Wide / Balanced / Narrow；黄金比例：1 : 1.618 | 鼻子长宽比是鼻子宽度与高度的关系，理想值为黄金比例 1:1.618。 |\n| 鼻宽与嘴宽 | `noseWidthToMouthWidth` | `nose_width_to_mouth_width` | `[1, r]`；判读：Small / Balanced / Large；黄金比例：1 : 1.618 | 鼻宽与嘴宽的比例是鼻子宽度与嘴巴宽度的关系，理想值为黄金比例 1:1.618，观感均衡好看。 |\n| 鼻、唇、下巴 | `noseToLipToChin` | `nose_to_lip_to_chin` | `[1, r]`；判读：Short / Balanced / Long（下脸长度）；黄金比例：1 : 1.618 | 鼻唇下巴比例指鼻底到唇中心的距离为 1，唇中心到下巴的理想距离为 1.618。这个黄金比例让下半张脸均衡协调，符合脸部对称的原则。 |\n| 上唇与下唇 | `upperLipToLowerLip` | `upper_lip_to_lower_lip` | `[1, r]`；判读：Full Upper / Balanced / Full Lower；黄金比例：1 : 1.618 | 上唇与下唇的黄金比例建议下唇厚度为上唇的 1.618 倍。这个比例观感均衡好看，下唇比上唇略丰润。 |\n\n----\n\n* 拍摄建议：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/AI_Face_Analysis_how_to_shoot_35ca9af08e.png)\n\n> **警告：** 脸部宽度需大于图片宽度的 60%。\n\n## 文件规格与错误码\n* 支持的格式与尺寸\n\n|AI 功能|支持尺寸|支持文件大小|支持格式|\n|  ----  | ----  | ----  | ----  |\n|AI 面部属性与比例分析|长边 <= 4096，仅支持单人。任一维度超过 1080 像素的图片会自动缩放后进行分析。|< 10MB|jpg/jpeg/png|\n\n* 错误码\n\n|错误码|说明|\n|  ----  | ----  |\n| error_below_min_image_size | 原图尺寸不得低于 320 像素。 |\n| error_face_position_invalid | 人脸须完整可见、正对镜头，并位于画面中央。 |\n| error_face_position_too_small | 检测到的人脸太小，无法分析。 |\n| error_face_position_out_of_boundary | 人脸超出了画面边界。 |\n| error_face_not_forward_facing | 人脸必须正对镜头。 |\n| error_face_angle_upward | 脸部过度朝上——请把头略微低一点。 |\n| error_face_angle_downward | 脸部过度朝下——请把头略微抬一点。 |\n| error_face_angle_leftward | 脸部过度朝左——请把头略微向右转。 |\n| error_face_angle_rightward | 脸部过度朝右——请把头略微向左转。 |\n| error_face_angle_left_tilt | 脸部向左侧倾斜过多——请把头轻轻向右扶正。 |\n| error_face_angle_right_tilt | 脸部向右侧倾斜过多——请把头轻轻向左扶正。 |\n\n* 运行环境与依赖\n\n| 示例代码语言 / 工具 | 建议运行时版本 |\n|---|---|\n| cURL | - bash >= 3.2</br>   - curl >= 7.58 (modern TLS/HTTP support)</br>   - jq >= 1.6 (robust JSON parsing) |\n| Node.js (JavaScript) | Node >= 18 (for global fetch) |\n| JavaScript | - Chrome / Edge >= 80</br>   - Firefox >= 74</br>   - Safari >= 13.1 |\n| PHP | PHP >= 7.4 (for modern TLS/compat), ext-curl (recommended) or allow_url_fopen=On + ext-openssl, ext-json |\n| Python | Python >= 3.10 (for f-strings), requests >= 2.20.0 |\n| Java | Java 11+ (for HttpClient), Jackson Databind >= 2.12.0 |\n\n---\n\n## JS Camera Kit\n{% partial file=\"/_partials/js-camera-kit.md\" /%}\n\n---\n\n## 点数消耗\n\n* 面部属性与比例分析\n\n| AI 功能 | 消耗点数 |\n|---|---|\n| 1~5 项脸部结构特征 | 10 |\n| 6~14 项脸部结构特征 | 20 |\n| 15~28 项脸部结构特征 | 30 |\n\n---\n",
    "version": "",
    "termsOfService": "https://www.makeupar.com/perfectbeauty/youcam/terms-of-service-api",
    "contact": {
      "email": "YouCamOnlineEditor_API@perfectcorp.com"
    },
    "license": {
      "name": "Privacy policy",
      "url": "https://www.makeupar.com/perfectbeauty/youcam/privacy-policy-api"
    }
  },
  "servers": [
    {
      "url": "https://yce-api-01.makeupar.com"
    }
  ],
  "paths": {
    "/s2s/v2.0/task/face-attr-analysis": {
      "post": {
        "summary": "执行 面部属性与比例分析 任务。",
        "description": "本接口用于发起面部五官分析流程。您需要提供源文件（URL 或文件 ID），并指定要分析的项目。任务会异步处理，您可以使用本响应返回的 task_id 查询其状态。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "face_angle_strictness_level": {
                        "$ref": "#/components/schemas/BasicFaceAttrReqFaceAngleStrictnessLevel"
                      },
                      "features": {
                        "$ref": "#/components/schemas/BasicFaceAttrReqFeatures"
                      }
                    },
                    "required": [
                      "features"
                    ]
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务执行成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasicRunTaskResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "任务执行失败",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RunError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/s2s/v2.0/task/face-attr-analysis/{task_id}": {
      "get": {
        "summary": "查询 面部属性与比例分析 任务的状态。",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
            },
            "description": "要查询的任务 ID"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "description": "响应状态",
                      "example": 200
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "task_status": {
                          "type": "string",
                          "enum": [
                            "running",
                            "success",
                            "error"
                          ],
                          "description": "任务状态"
                        },
                        "error": {
                          "$ref": "#/components/schemas/EngineErrorCode"
                        },
                        "error_message": {
                          "type": "string",
                          "description": "错误的详细说明"
                        },
                        "results": {
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "face_quality": {
                                  "$ref": "#/components/schemas/BasicFaceAttrRespFaceQuality"
                                },
                                "facialratio": {
                                  "$ref": "#/components/schemas/BasicFaceAttrRespFacialRatio"
                                },
                                "cheekbone": {
                                  "type": "object",
                                  "properties": {
                                    "left": {
                                      "type": "string",
                                      "enum": [
                                        "Flat Cheekbone",
                                        "High Cheekbone",
                                        "Low Cheekbone",
                                        "Round Cheeks"
                                      ]
                                    },
                                    "right": {
                                      "type": "string",
                                      "enum": [
                                        "Flat Cheekbone",
                                        "High Cheekbone",
                                        "Low Cheekbone",
                                        "Round Cheeks"
                                      ]
                                    },
                                    "overall": {
                                      "type": "string",
                                      "enum": [
                                        "Flat Cheekbone",
                                        "High Cheekbone",
                                        "Low Cheekbone",
                                        "Round Cheeks"
                                      ]
                                    }
                                  }
                                },
                                "eyelid": {
                                  "type": "object",
                                  "properties": {
                                    "left_eyelid": {
                                      "type": "string",
                                      "enum": [
                                        "Hooded-lid",
                                        "Single-lid",
                                        "Double-lid",
                                        "Deep-Set"
                                      ]
                                    },
                                    "left_angle": {
                                      "type": "string",
                                      "enum": [
                                        "Downturned",
                                        "Upturned",
                                        "Average"
                                      ]
                                    },
                                    "left_shape": {
                                      "type": "string",
                                      "enum": [
                                        "Narrow",
                                        "Round",
                                        "Almond"
                                      ]
                                    },
                                    "right_eyelid": {
                                      "type": "string",
                                      "enum": [
                                        "Hooded-lid",
                                        "Single-lid",
                                        "Double-lid",
                                        "Deep-Set"
                                      ]
                                    },
                                    "right_angle": {
                                      "type": "string",
                                      "enum": [
                                        "Downturned",
                                        "Upturned",
                                        "Average"
                                      ]
                                    },
                                    "right_shape": {
                                      "type": "string",
                                      "enum": [
                                        "Narrow",
                                        "Round",
                                        "Almond"
                                      ]
                                    },
                                    "setting": {
                                      "type": "string",
                                      "enum": [
                                        "Close-set",
                                        "Wide-Set",
                                        "Average"
                                      ]
                                    },
                                    "size": {
                                      "type": "string",
                                      "description": "可选值：Big（大）、Small（小）、Average（中等）",
                                      "enum": [
                                        "Big",
                                        "Small",
                                        "Average"
                                      ]
                                    }
                                  }
                                },
                                "eyebrow": {
                                  "type": "object",
                                  "properties": {
                                    "gap": {
                                      "type": "string",
                                      "enum": [
                                        "Far-Apart",
                                        "Close",
                                        "Average"
                                      ]
                                    },
                                    "left_shape": {
                                      "type": "string",
                                      "enum": [
                                        "Hard Angled",
                                        "Soft Angled",
                                        "Straight",
                                        "Rounded",
                                        "Obscured"
                                      ]
                                    },
                                    "left_body_thickness": {
                                      "type": "string",
                                      "enum": [
                                        "Dense",
                                        "Sparse",
                                        "Average",
                                        "Unknown"
                                      ]
                                    },
                                    "left_tail_thickness": {
                                      "type": "string",
                                      "enum": [
                                        "Dense",
                                        "Sparse",
                                        "Average",
                                        "Unknown"
                                      ]
                                    },
                                    "left_thinness": {
                                      "type": "string",
                                      "enum": [
                                        "Thin",
                                        "Normal"
                                      ]
                                    },
                                    "left_shortness": {
                                      "type": "string",
                                      "enum": [
                                        "Short",
                                        "Normal"
                                      ]
                                    },
                                    "right_shape": {
                                      "type": "string",
                                      "enum": [
                                        "Hard Angled",
                                        "Soft Angled",
                                        "Straight",
                                        "Rounded",
                                        "Obscured"
                                      ]
                                    },
                                    "right_body_thickness": {
                                      "type": "string",
                                      "enum": [
                                        "Dense",
                                        "Sparse",
                                        "Average",
                                        "Unknown"
                                      ]
                                    },
                                    "right_tail_thickness": {
                                      "type": "string",
                                      "enum": [
                                        "Dense",
                                        "Sparse",
                                        "Average",
                                        "Unknown"
                                      ]
                                    },
                                    "right_thinness": {
                                      "type": "string",
                                      "enum": [
                                        "Thin",
                                        "Normal"
                                      ]
                                    },
                                    "right_shortness": {
                                      "type": "string",
                                      "enum": [
                                        "Short",
                                        "Normal"
                                      ]
                                    }
                                  }
                                },
                                "faceshape": {
                                  "type": "string",
                                  "enum": [
                                    "Triangle",
                                    "Diamond",
                                    "Heart",
                                    "InvTriangle",
                                    "Oblong",
                                    "Oval",
                                    "Round",
                                    "Square",
                                    "Unknown"
                                  ]
                                },
                                "lipshape": {
                                  "type": "array",
                                  "items": {
                                    "type": "string",
                                    "enum": [
                                      "Bow",
                                      "Downturned",
                                      "Full",
                                      "Heavy Lower Lip",
                                      "Heavy Upper Lip",
                                      "Narrow",
                                      "Round",
                                      "Thin",
                                      "Wide",
                                      "Average"
                                    ]
                                  }
                                },
                                "nose": {
                                  "type": "object",
                                  "properties": {
                                    "width": {
                                      "type": "string",
                                      "enum": [
                                        "Narrow",
                                        "Broad",
                                        "Average"
                                      ]
                                    },
                                    "length": {
                                      "type": "string",
                                      "enum": [
                                        "Long",
                                        "Short",
                                        "Average"
                                      ]
                                    }
                                  }
                                },
                                "color": {
                                  "type": "object",
                                  "properties": {
                                    "eye_color": {
                                      "type": "string",
                                      "description": "瞳色的十六进制值"
                                    },
                                    "eye_color_name": {
                                      "type": "string",
                                      "enum": [
                                        "Amber",
                                        "Brown",
                                        "Green",
                                        "Blue",
                                        "Gray",
                                        "Other"
                                      ]
                                    },
                                    "lip_color": {
                                      "type": "string",
                                      "description": "唇色的十六进制值"
                                    },
                                    "eyebrow_color": {
                                      "type": "string",
                                      "description": "眉色的十六进制值"
                                    },
                                    "hair_color": {
                                      "type": "string",
                                      "format": "color",
                                      "enum": [
                                        "#a0a0a0",
                                        "#722626",
                                        "#000000",
                                        "#FAF0BE",
                                        "#42280E",
                                        "#808080",
                                        "#B56637"
                                      ]
                                    },
                                    "hair_color_name": {
                                      "type": "string",
                                      "enum": [
                                        "Auburn",
                                        "Black",
                                        "Blonde",
                                        "Brown",
                                        "Grey/White",
                                        "Red"
                                      ]
                                    }
                                  }
                                },
                                "agegender": {
                                  "type": "object",
                                  "properties": {
                                    "age": {
                                      "type": "integer"
                                    },
                                    "gender": {
                                      "type": "string",
                                      "enum": [
                                        "female",
                                        "male",
                                        "unknown"
                                      ]
                                    }
                                  }
                                }
                              }
                            }
                          ]
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidTaskId"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "500": {
            "$ref": "#/components/responses/TaskTimeout"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuthenticationV2": {
        "type": "http",
        "scheme": "bearer",
        "description": "使用标准的 Bearer 鉴权。把您的 API 密钥放进请求头： `Authorization:Bearer YOUR_API_KEY`。请注意 'Bearer' 与 'YOUR_API_KEY' 之间有一个空格。"
      }
    },
    "schemas": {
      "BasicFaceAttrReqFaceAngleStrictnessLevel": {
        "type": "string",
        "description": "脸部角度检测的严格程度（俯仰角 pitch、偏航角 yaw、翻滚角 roll）。\n要求越严格，五官分析结果越准确。\n默认为 'high'。\n可选值：\n  - strict：pitch <= 4 度，yaw <= 6 度，roll <= 4 度\n  - high：pitch、yaw、roll <= 10 度\n  - medium：pitch、yaw、roll <= 15 度\n  - low：pitch、yaw、roll <= 20 度\n  - flexible：pitch、yaw、roll <= 30 度\n",
        "enum": [
          "strict",
          "high",
          "medium",
          "low",
          "flexible"
        ],
        "example": "high"
      },
      "BasicFaceAttrReqFeatures": {
        "description": "面部分析类别\n\n* 面部分析\n  - FACE（脸）：faceShape\n  - EYES（眼）：eyeShape eyeSize eyeAngle eyeDistance eyelid\n  - BROWS（眉）：eyebrowShape eyebrowThickness eyebrowDistance eyebrowShortness\n  - LIPS（唇）：lipShape\n  - NOSE（鼻）：noseWidth noseLength\n  - CHEEKBONES（颧骨）：cheekbones\n  - AGE & GENDER（年龄与性别）：age gender\n  - COLORS（色彩）：eyeColor hairColor eyebrowColor lipColor\n\n* 面部比例\n  - horizontalThird\n  - verticalFifth\n  - faceAspectRatio\n  - eyeAspectRatio\n  - eyebrowPosition\n  - eyebrowArch\n  - eyeHeightToEyebrowDistance\n  - noseAspectRatio\n  - noseWidthToMouthWidth\n  - noseToLipToChin\n  - upperLipToLowerLip\n",
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "eyeShape",
            "eyeSize",
            "eyeAngle",
            "eyeDistance",
            "eyelid",
            "eyebrowShape",
            "eyebrowThickness",
            "eyebrowDistance",
            "eyebrowShortness",
            "cheekbones",
            "faceShape",
            "lipShape",
            "noseWidth",
            "noseLength",
            "age",
            "gender",
            "eyeColor",
            "lipColor",
            "eyebrowColor",
            "hairColor",
            "horizontalThird",
            "verticalFifth",
            "faceAspectRatio",
            "eyeAspectRatio",
            "eyebrowPosition",
            "eyebrowArch",
            "eyeHeightToEyebrowDistance",
            "noseAspectRatio",
            "noseWidthToMouthWidth",
            "noseToLipToChin",
            "upperLipToLowerLip"
          ]
        }
      },
      "BasicFaceAttrRespFaceQuality": {
        "type": "object",
        "properties": {
          "has_face": {
            "type": "boolean",
            "example": true
          },
          "area": {
            "type": "string",
            "example": "good"
          },
          "frontal": {
            "type": "string",
            "example": "good"
          },
          "lighting": {
            "type": "string",
            "example": "good"
          },
          "faceangle": {
            "type": "string",
            "example": "good"
          }
        }
      },
      "BasicFaceAttrRespFacialRatio": {
        "type": "object",
        "properties": {
          "horizontal_third": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "example": [
              33,
              33,
              33
            ]
          },
          "vertical_fifth": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "example": [
              20,
              20,
              20,
              20,
              20
            ]
          },
          "face_aspect_ratio": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "面部宽度与高度之比",
            "example": [
              1,
              1.46
            ]
          },
          "left_eye_aspect_ratio": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "眼睛高度与宽度之比",
            "example": [
              1,
              3
            ]
          },
          "right_eye_aspect_ratio": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "眼睛高度与宽度之比",
            "example": [
              1,
              3
            ]
          },
          "left_eyebrow_arch_to_eyebrow_width": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "眉前段宽度（从眉头到眉峰）与整条眉毛宽度 （从眉头到眉尾）之比",
            "example": [
              1,
              1.476
            ]
          },
          "right_eyebrow_arch_to_eyebrow_width": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "眉前段宽度（从眉头到眉峰）与整条眉毛宽度 （从眉头到眉尾）之比",
            "example": [
              1,
              1.523
            ]
          },
          "left_eye_height_to_eyebrow_distance": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "眼睛高度与「眉顶到眼下缘」这一垂直距离之比",
            "example": [
              1,
              2.69
            ]
          },
          "right_eye_height_to_eyebrow_distance": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "眼睛高度与「眉顶到眼下缘」这一垂直距离之比",
            "example": [
              1,
              2.775
            ]
          },
          "overall_eye_height_to_eyebrow_distance": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "example": [
              1,
              2.733
            ]
          },
          "nose_aspect_ratio": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "鼻子宽度与高度之比",
            "example": [
              1,
              1.172
            ]
          },
          "nose_width_to_mouth_width": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "鼻子宽度与嘴部宽度之比",
            "example": [
              1,
              1.475
            ]
          },
          "nose_to_lip_to_chin": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "鼻尖到嘴唇中点的垂直距离，与嘴唇中点到下巴的垂直距离之比",
            "example": [
              1,
              2.098
            ]
          },
          "upper_lip_to_lower_lip": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "上唇高度与下唇高度之比",
            "example": [
              1,
              1.099
            ]
          }
        }
      },
      "BasicRunTaskV2SrcFileUrl": {
        "type": "object",
        "required": [
          "src_file_url"
        ],
        "properties": {
          "src_file_url": {
            "type": "string",
            "description": "用于运行任务的文件 URL，该 URL 需可公开访问。",
            "example": "https://example.com/selfie.jpg"
          }
        }
      },
      "BasicRunTaskV2SrcFileId": {
        "type": "object",
        "required": [
          "src_file_id"
        ],
        "properties": {
          "src_file_id": {
            "type": "string",
            "description": "用于运行任务的文件 ID，取自上传文件接口返回的 file_id。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "BasicRunTaskV2": {
        "title": "BasicRunTaskV2",
        "anyOf": [
          {
            "title": "用源文件 URL 运行任务",
            "allOf": [
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
              }
            ]
          },
          {
            "title": "用源文件 ID 运行任务",
            "allOf": [
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
              }
            ]
          }
        ]
      },
      "BasicRunTaskResponseV2": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "响应状态",
            "example": 200
          },
          "data": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string",
                "description": "该任务的 ID。凭这个 ID 可在 24 小时内查询任务结果。",
                "example": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
              }
            }
          }
        }
      },
      "RunError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "响应状态",
            "example": 400
          },
          "error": {
            "type": "string",
            "description": "错误信息",
            "example": "The operation could not be completed"
          },
          "error_code": {
            "type": "string",
            "enum": [
              "InvalidParameters",
              "CreditInsufficiency",
              "InvalidStyleGroup",
              "InvalidStyle",
              "BadRequest"
            ],
            "description": "错误码：\n  * InvalidParameters - 请求参数无效\n  * CreditInsufficiency - 点数不足，无法运行\n  * BadRequest - 请求参数不符合预期\n  * InvalidStyleGroup - 风格分组 ID 无效\n  * InvalidStyle - 风格 ID 无效\n"
          }
        }
      },
      "EngineErrorCode": {
        "type": "string",
        "nullable": true,
        "enum": [
          "error_exceed_max_image_size",
          "exceed_max_filesize",
          "invalid_parameter",
          "error_download_image",
          "error_download_mask",
          "error_decode_image",
          "error_decode_mask",
          "error_nsfw_content_detected",
          "error_no_face",
          "error_pose",
          "error_face_parsing",
          "error_inference",
          "exceed_nsfw_retry_limits",
          "error_upload",
          "unknown_internal_error"
        ],
        "description": "错误码：\n- \\`error_exceed_max_image_size\\`  - 输入图片尺寸超出上限\n- \\`exceed_max_filesize\\` - 输入文件大小超出上限\n- \\`invalid_parameter\\` - 参数取值无效\n- \\`error_download_image\\` - 下载原图出错\n- \\`error_download_mask\\` - 下载蒙版图片出错\n- \\`error_decode_image\\` - 解码原图出错\n- \\`error_decode_mask\\` - 解码蒙版图片出错\n- \\`error_nsfw_content_detected\\` - 在原图中检测到不适宜内容（NSFW）\n- \\`error_no_face\\` - 原图中没有检测到人脸\n- \\`error_pose\\` - 原图的姿态检测失败\n- \\`error_face_parsing\\` - 原图的人脸分割失败\n- \\`error_inference\\` - 推理流程中出现错误\n- \\`exceed_nsfw_retry_limits\\` - 为避免生成不适宜内容， 重试次数已用尽\n- \\`error_upload\\` - 上传结果图片出错\n- \\`unknown_internal_error\\` - 其他错误\n"
      }
    },
    "responses": {
      "InvalidApiKey": {
        "description": "API 密钥无效或缺失",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 401,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Invalid API key"
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "请求过多",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 429,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Too many requests"
                }
              }
            }
          }
        }
      },
      "InvalidTaskId": {
        "description": "任务 ID 无效",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 400,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Invalid task ID"
                }
              }
            }
          }
        }
      },
      "TaskTimeout": {
        "description": "任务执行超时",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 500,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Task execution timed out"
                }
              }
            }
          }
        }
      }
    }
  }
}