# 執行臉部特徵分析任務。

這個端點啟動臉部特徵分析流程。您必須提供來源檔案（透過網址或檔案 ID），並指定要分析哪些項目。任務會以非同步方式處理，您可以使用這個回應回傳的 task_id 查詢其狀態。

Endpoint: POST /s2s/v2.0/task/face-attr-analysis
Security: BearerAuthenticationV2

## Security:

  - `BearerAuthenticationV2` (unknown)
    http bearer

## Request fields (application/json):

  - `face_angle_strictness_level` (string)
    臉部角度偵測的嚴格程度（pitch、yaw、roll）。
較嚴格的程度可確保更準確的臉部特徵結果。
預設為 'high'。
選項：
- strict：pitch <= 4 度、yaw <= 6 度、roll <= 4 度
- high：pitch、yaw、roll <= 10 度
- medium：pitch、yaw、roll <= 15 度
- low：pitch、yaw、roll <= 20 度
- flexible：pitch、yaw、roll <= 30 度
    Enum: "strict", "high", "medium", "low", "flexible"

  - `features` (array, required)
    AI 臉部分析類別
* 臉部分析
  - FACE（臉）：faceShape
  - EYES（眼睛）：eyeShape eyeSize eyeAngle eyeDistance eyelid
  - BROWS（眉毛）：eyebrowShape eyebrowThickness eyebrowDistance eyebrowShortness
  - LIPS（嘴唇）：lipShape
  - NOSE（鼻子）：noseWidth noseLength
  - CHEEKBONES（顴骨）：cheekbones
  - AGE & GENDER（年齡與性別）：age gender
  - COLORS（顏色）：eyeColor hairColor eyebrowColor lipColor
* 臉部比例
  - horizontalThird
  - verticalFifth
  - faceAspectRatio
  - eyeAspectRatio
  - eyebrowPosition
  - eyebrowArch
  - eyeHeightToEyebrowDistance
  - noseAspectRatio
  - noseWidthToMouthWidth
  - noseToLipToChin
  - upperLipToLowerLip

  - `src_file_url` (string, required)
    要執行任務的檔案網址。該網址應可公開存取。
    Example: https://example.com/selfie.jpg

  - `src_file_id` (string, required)
    要執行任務的檔案 ID。檔案 ID 來自上傳檔案 API。
    Example: pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE=

## Response 200:

  - `200` (unknown)
    任務執行成功

## Response 200 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 200

  - `data` (object)

  - `data.task_id` (string)
    這個任務的 ID。任務結果可以此 ID 查詢，有效期限 24 小時。
    Example: grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe

## Response 400:

  - `400` (unknown)
    任務執行失敗

## Response 400 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 400

  - `error` (string)
    錯誤訊息
    Example: The operation could not be completed

  - `error_code` (string)
    錯誤代碼：
* InvalidParameters - 請求參數無效
* CreditInsufficiency - 點數不足，無法執行
* BadRequest - 非預期的請求參數
* InvalidStyleGroup - 風格群組 id 無效
* InvalidStyle - 風格 id 無效
    Enum: "InvalidParameters", "CreditInsufficiency", "InvalidStyleGroup", "InvalidStyle", "BadRequest"

## Response 401:

  - `401` (unknown)
    API 金鑰無效或缺失

## Response 401 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 401

  - `error` (string)
    Example: Invalid API key

## Response 429:

  - `429` (unknown)
    請求過多

## Response 429 fields (application/json):

  - `status` (integer)
    回應狀態
    Example: 429

  - `error` (string)
    Example: Too many requests

