{"items":[{"type":"link","label":"AI 毛躁髮質分析","link":"/zh-tw/reference/ai_hair_frizziness_detection","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection","content":{"contentType":"overview","meta":{"name":"AI 毛躁髮質分析"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"ai_hair_frizziness_detection.json","url":"/_bundle/@l10n/zh-TW/reference/ai_hair_frizziness_detection.json?download"},{"kind":"download","label":"ai_hair_frizziness_detection.yaml","url":"/_bundle/@l10n/zh-TW/reference/ai_hair_frizziness_detection.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"email","title":"E-mail","titleTranslationKey":"info.contact.name","email":"YouCamOnlineEditor_API@perfectcorp.com","label":"YouCamOnlineEditor_API@perfectcorp.com","withCopyButton":true,"copyContent":"YouCamOnlineEditor_API@perfectcorp.com"},{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Privacy policy","url":"https://www.makeupar.com/perfectbeauty/youcam/privacy-policy-api"},{"kind":"externallink","label":"Terms of Service","labelTranslationKey":"info.termsOfService","url":"https://www.makeupar.com/perfectbeauty/youcam/terms-of-service-api"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"https://yce-api-01.makeupar.com"}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"AI 毛躁髮質分析","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[]}],"sectionId":"/"}],"sectionId":"/"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":1,"id":"section/概述"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"概述"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"僅用 3 張照片進行 180° 全視角髮絲毛躁度分析"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"我們的 AI 毛躁髮質分析只需上傳 3 張照片——頭髮的正面、左側與右側視角——即可在數秒內提供精準的髮絲毛躁度分析。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這高效的流程在數秒內提供準確結果，讓企業能依據髮絲毛躁度提供客製化的頭髮解決方案與抗毛躁產品，無需耗時的面對面諮詢、複雜的頭髮測驗，或專用硬體安裝。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_frizzy_S_02_enu_b80c238858.jpg"},"children":[],"type":"image"}],"type":"paragraph"}]}],"sectionId":"/section/概述"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/整合指南"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"整合指南"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":true,"marker":"."},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳自拍"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"您可以透過兩種方式之一提供來源圖片："},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用現有的公開圖片網址"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"無需上傳，您可以在啟動 AI 任務時直接提供可公開存取的圖片網址。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"透過 File API 上傳"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用端點："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"POST /s2s/v2.0/file\n"},"children":[{"$$mdtype":"Node","attributes":{"content":"POST /s2s/v2.0/file\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這會回傳用於後續任務執行的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"重要"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"：僅呼叫 File API 並不會上傳您的檔案。您必須"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"手動上傳"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案到"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"File API 回應中提供的網址"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。該網址就是您的上傳目的地，請確保檔案成功傳輸到該處後再繼續。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"在呼叫 AI API 之前，請確保您的檔案已成功上傳。使用 File API 取得上傳網址，然後將檔案上傳到該位置。上傳完成後，您會在回應中取得 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"，這個 ID 就是您用於存取該檔案相關 AI 功能的依據。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"警告："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 請注意，若您未將檔案上傳到 File API 回應中提供的網址，使用 AI API 時會得到 500 Server Error / unknown_internal_error 或 404 Not Found 錯誤。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"blockquote"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{"ordered":true,"start":2,"marker":"."},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"執行 AI 任務以取得任務 ID"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 /s2s/v2.0/task/hair-frizziness-detection 執行 AI 任務。對於目標使用者圖片，提供 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"src_file_url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"src_file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。並提供要套用的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"template_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 以取得 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輪詢以查詢任務狀態直到成功或失敗"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"，透過輪詢 GET /s2s/v2.0/task/hair-frizziness-detection 監控任務狀態，以取得目前的引擎狀態。在引擎完成任務之前，狀態會維持為 running，此階段不會消耗點數。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"您也可以實作 webhook，在 AI 任務成功或失敗時接收通知。細節請參考 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"href":"../../../../develop/webhook"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Webhook"},"children":[],"type":"text"}],"type":"link"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 章節。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"警告："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 必須在任務的保留期間內輪詢以查詢任務狀態。若在保留期間內沒有輪詢請求，任務將會逾時，即使任務已成功處理。您的點數仍會被消耗。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"blockquote"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"警告："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 若您查詢已逾時任務的狀態，會收到 InvalidTaskId 錯誤。因此，執行 AI 任務後，您必須在保留期間內輪詢以查詢狀態，直到狀態變為 success 或 error。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"blockquote"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"成功後取得 AI 任務的結果"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"引擎處理您的輸入檔案並生成結果影像後，任務狀態會變為 success。您會取得處理後圖片的網址。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"}],"type":"list"}]}],"sectionId":"/section/概述/整合指南"}],"sectionId":"/section/概述/整合指南"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/輸入與輸出"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輸入與輸出"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輸入格式"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_frizzy_step_01_ac5c651ea4.png"},"children":[],"type":"image"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳 3 張照片——頭髮的正面、左側與右側視角。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"您可以使用 JS Camera Kit 實作 JavaScript 攝影模組，拍攝 3 張合格的照片。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輸出格式"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 毛躁髮質分析評估髮質類型，並辨識 4 種不同的髮絲毛躁程度——從平滑頭髮到極度毛躁的頭髮，提供關於髮絲毛躁狀況的精準洞察。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"對應（0–3）"},"children":[],"type":"text"}],"type":"strong"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"術語"},"children":[],"type":"text"}],"type":"strong"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"說明"},"children":[],"type":"text"}],"type":"strong"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"0"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"不毛躁"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"頭髮看起來平滑，幾乎或完全沒有可見的毛躁。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"1"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輕微毛躁"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"可見輕微毛躁；表面質地有輕微的不規則。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"2"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"毛躁"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"頭髮各處有明顯毛躁；質地明顯紊亂。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"3"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"極度毛躁"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"強烈且廣泛的毛躁；頭髮質地高度不規則。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_frizzy_S_01_enu_fcd10905ff.jpg"},"children":[],"type":"image"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輸出範例"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"mapping\": 1, // number；結果對應的鍵，選項：[0, 1, 2, 3]\n  \"term\": \"Slightly Frizzy\" // string；與 \"mapping\" 一一對應，選項：[\"Not Frizzy\", \"Slightly Frizzy\", \"Frizzy\", \"Extreme Frizzy\"]\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"mapping\": 1, // number；結果對應的鍵，選項：[0, 1, 2, 3]\n  \"term\": \"Slightly Frizzy\" // string；與 \"mapping\" 一一對應，選項：[\"Not Frizzy\", \"Slightly Frizzy\", \"Frizzy\", \"Extreme Frizzy\"]\n}\n"},"children":[],"type":"text"}],"type":"fence"}]}],"sectionId":"/section/概述/輸入與輸出"}],"sectionId":"/section/概述/輸入與輸出"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/檔案規格與錯誤"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案規格與錯誤"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"支援的格式與尺寸"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"類型"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"支援的尺寸"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"支援的檔案大小"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"支援的格式"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 毛躁髮質分析"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"圖片寬與高至少 320 像素，任一維度不超過 4096 像素。若您的圖片其中一邊超過 1080 像素，會自動調整尺寸以符合該限制進行分析。"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"< 10MB"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"jpg/png"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"說明"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_mismatch_image_size"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"請確保您所有的臉部照片（正面、左側、右側）尺寸相同"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_below_min_image_size"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"若您的圖片寬或高小於 320 像素，尺寸過小無法使用"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_face_position_invalid"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"您的臉部必須在圖片中完全可見，不可有任何部分被裁切"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_face_position_too_small"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"您照片中的臉部太小，無法妥善分析"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_face_position_out_of_boundary"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"您的臉部過大，或部分超出照片邊緣"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_insufficient_lighting"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"光線過暗，導致難以分析"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_face_angle_invalid"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"您的臉部角度不太正確。正面拍攝時，請讓頭部偏離直線不超過 10 度。側面拍攝時，角度應超過 15 度"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"環境與相依性"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範例程式語言 / 工具"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"建議的執行環境版本"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"cURL"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"- bash >= 3.2"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"   - curl >= 7.58（現代 TLS/HTTP 支援）"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"   - jq >= 1.6（穩健的 JSON 解析）"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Node.js（JavaScript）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Node >= 18（支援全域 fetch）"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"JavaScript"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"- Chrome / Edge >= 80"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"   - Firefox >= 74"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"   - Safari >= 13.1"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"PHP"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"PHP >= 7.4（現代 TLS/相容性），ext-curl（建議）或 allow_url_fopen=On + ext-openssl、ext-json"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Python"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Python >= 3.10（支援 f-strings），requests >= 2.20.0"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Java"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Java 11+（支援 HttpClient），Jackson Databind >= 2.12.0"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/概述/檔案規格與錯誤"}],"sectionId":"/section/概述/檔案規格與錯誤"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/js-camera-kit"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"JS Camera Kit"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"file":"@l10n/zh-TW/_partials/js-camera-kit.md","variables":{"$$apiDocsHeadingScope":{"operationId":"section/概述"}}},"children":[],"type":"tag","tag":"partial"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/概述/js-camera-kit"}],"sectionId":"/section/概述/js-camera-kit"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/點數消耗"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"點數消耗"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 功能"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"消耗的點數"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 毛躁髮質分析 V1.0"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"2"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"sectionId":"/section/概述/點數消耗"}],"sectionId":"/section/概述/點數消耗"}]}]}},{"type":"group","label":"概述","link":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述","items":[{"type":"link","label":"整合指南","link":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/整合指南","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/整合指南","content":null},{"type":"link","label":"輸入與輸出","link":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/輸入與輸出","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/輸入與輸出","content":null},{"type":"link","label":"檔案規格與錯誤","link":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/檔案規格與錯誤","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/檔案規格與錯誤","content":null},{"type":"link","label":"JS Camera Kit","link":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/js-camera-kit","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/js-camera-kit","content":null},{"type":"link","label":"點數消耗","link":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/點數消耗","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/section/概述/點數消耗","content":null}],"content":null},{"type":"group","label":"V1.0","link":"/zh-tw/reference/ai_hair_frizziness_detection/v1.0","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/v1.0","items":[{"label":"執行髮絲毛躁度偵測任務。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hair_frizziness_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post","metadata":{"seo":{"title":"執行髮絲毛躁度偵測任務。","description":"查詢任務狀態請參考輪詢指南。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"執行髮絲毛躁度偵測任務。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"執行髮絲毛躁度偵測任務。","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"查詢任務狀態請參考輪詢指南。"},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用標準的 'Bearer authentication'。請在標頭中放入您的 'API Key'："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/BasicFaceAttrReqFaceThreeAngle"}},"schemaId":"components/schemas/BasicFaceAttrReqFaceThreeAngle","pointer":"/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/task/hair-frizziness-detection","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/BasicFaceAttrReqFaceThreeAngle"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.0/task/hair-frizziness-detection","href":"v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post","summary":"執行髮絲毛躁度偵測任務。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"components/schemas/BasicFaceAttrReqFaceThreeAngle","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/BasicFaceAttrReqFaceThreeAngle"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務執行成功"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}},"schemaId":"components/schemas/BasicRunTaskResponseV2"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務執行失敗"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_0"}},"schemaId":"schema_0"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API Key 無效、已停用或已到期"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1"},{"code":"429","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"在指定時間內請求過多"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}},"schemaId":"schema_2"}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/BasicRunTaskResponseV2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}}},{"code":"400","schemaId":"schema_0","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_0"}}},{"code":"401","schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}}},{"code":"429","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/hair-frizziness-detection"},{"label":"查詢髮絲毛躁度偵測任務的狀態。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hair_frizziness_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get","routeSlug":"/zh-tw/reference/ai_hair_frizziness_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get","metadata":{"seo":{"title":"查詢髮絲毛躁度偵測任務的狀態。","description":"查詢髮絲毛躁度偵測任務的狀態。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"查詢髮絲毛躁度偵測任務的狀態。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"查詢髮絲毛躁度偵測任務的狀態。","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用標準的 'Bearer authentication'。請在標頭中放入您的 'API Key'："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"task_id","in":"path","schemaId":"schema_3","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"要查詢的任務 ID"},"children":[],"type":"text"}],"type":"paragraph"}],"required":true}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/hair-frizziness-detection/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_3"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.0/task/hair-frizziness-detection/{task_id}","href":"v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get","summary":"查詢髮絲毛躁度偵測任務的狀態。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"成功查詢任務狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TaskStatusResponseHairFrizz"}},"schemaId":"components/schemas/TaskStatusResponseHairFrizz"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務 id 無效"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API Key 無效、已停用或已到期"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1"},{"code":"500","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務在預期時間內沒有回應"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}},"schemaId":"schema_5"}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/TaskStatusResponseHairFrizz","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TaskStatusResponseHairFrizz"}}},{"code":"400","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"401","schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}}},{"code":"500","schemaId":"schema_5","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_5"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/hair-frizziness-detection/{task_id}"}],"content":{"contentType":"group","meta":{"name":"V1.0"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"V1.0","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 毛躁髮質分析 API 可讓您使用三角度輸入（正面、右側、左側），偵測圖片中頭髮的毛躁程度。"},"children":[],"type":"text"}],"type":"paragraph"}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/s2s/v2.0/task/hair-frizziness-detection","summary":"執行髮絲毛躁度偵測任務。","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post","deprecated":false},{"title":"/s2s/v2.0/task/hair-frizziness-detection/{task_id}","summary":"查詢髮絲毛躁度偵測任務的狀態。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection~1{task_id}/get","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/FileV1.1":{"id":"components/schemas/FileV1.1","kind":"json-schema","title":"File V1.1","data":{"title":"File V1.1","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個物件代表一個檔案。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["content_type","file_name","file_size"],"properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容 MIME 類型。目前可用的值列於 enum 中。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_size":{"type":"integer","example":50000,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容長度，以位元組計。不應超過 10MB。"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}},"components/schemas/BasicFileResponse":{"id":"components/schemas/BasicFileResponse","kind":"json-schema","title":"BasicFileResponse","data":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容 MIME 類型。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_id":{"type":"string","example":"U8aqJbsXGT537jtGnEDFHqxdDXqh8+oTF/cSkLimzuvVwMP+Jb1XbjPsf7ZgUgLY","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的 ID。其他執行任務的 API 會需要這個 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"}]},"requests":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用下方的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"headers"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"method"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 上傳檔案。完成後，使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 繼續呼叫執行任務的 API。"},"children":[],"type":"text"}],"type":"paragraph"}],"items":{"type":"object","properties":{"headers":{"type":"object","example":{"Content-Type":"image/jpg","Content-Length":50000},"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳檔案時要納入的標頭"},"children":[],"type":"text"}],"type":"paragraph"}]},"url":{"type":"string","example":"https://example.com/presigned-upload-url","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案的網址"},"children":[],"type":"text"}],"type":"paragraph"}]},"method":{"type":"string","example":"PUT","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案所用的 HTTP 方法"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}}}}},"components/schemas/FileResponseV2":{"id":"components/schemas/FileResponseV2","kind":"json-schema","title":"FileResponseV2","data":{"type":"object","properties":{"status":{"type":"integer","example":200,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"data":{"$ref":"#/components/schemas/BasicFileResponse"}}}},"components/schemas/BasicFaceAttrReqFaceThreeAngleWithSrcFileUrls":{"id":"components/schemas/BasicFaceAttrReqFaceThreeAngleWithSrcFileUrls","kind":"json-schema","title":"以 3 個角度的來源檔案網址執行任務","data":{"title":"以 3 個角度的來源檔案網址執行任務","type":"object","required":["src_file_urls"],"properties":{"src_file_urls":{"type":"array","minItems":3,"maxItems":3,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"來自上傳檔案 API 的檔案網址。來源照片序列的檔案 ID 依序為 'frontFace'、'rightFace' 與 'leftFace'。應提供 'src_file_urls' 或 'src_file_ids' 其中之一。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":["https://example.com/selfie.jpg","https://example.com/selfie.jpg","https://example.com/selfie.jpg"],"items":{"type":"string"}}}}},"components/schemas/BasicFaceAttrReqFaceThreeAngleWithSrcFileIds":{"id":"components/schemas/BasicFaceAttrReqFaceThreeAngleWithSrcFileIds","kind":"json-schema","title":"以 3 個角度的來源檔案 ID 執行任務","data":{"title":"以 3 個角度的來源檔案 ID 執行任務","type":"object","required":["src_file_ids"],"properties":{"src_file_ids":{"type":"array","minItems":3,"maxItems":3,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"來自上傳檔案 API 的檔案 ID。來源照片序列的檔案 ID 依序為 'frontFace'、'rightFace' 與 'leftFace'。應提供 'src_file_urls' 或 'src_file_ids' 其中之一。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":["pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE=","pkVzplMv8Y1QPgHbqtKfyJmg+xJDUbTP16YijZ3qARNf","B5LNohvvO+7d/78Ymuhp6vMiSooN/5DX9oVuupzkKctf"],"items":{"type":"string"}}}}},"components/schemas/BasicFaceAttrReqFaceThreeAngle":{"id":"components/schemas/BasicFaceAttrReqFaceThreeAngle","kind":"json-schema","title":"BasicFaceAttrReqFaceThreeAngle","data":{"anyOf":[{"$ref":"#/components/schemas/BasicFaceAttrReqFaceThreeAngleWithSrcFileUrls"},{"$ref":"#/components/schemas/BasicFaceAttrReqFaceThreeAngleWithSrcFileIds"}]}},"components/schemas/BasicRunTaskResponseV2":{"id":"components/schemas/BasicRunTaskResponseV2","kind":"json-schema","title":"BasicRunTaskResponseV2","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"example":200},"data":{"type":"object","properties":{"task_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個任務的 ID。任務結果可以此 ID 查詢，有效期限 24 小時。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"}}}}}},"components/schemas/EngineErrorCode":{"id":"components/schemas/EngineErrorCode","kind":"json-schema","title":"EngineErrorCode","data":{"type":"string","nullable":true,"enum":["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":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exceed_max_filesize"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 輸入檔案大小超過上限"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"invalid_parameter"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 參數值無效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_download_image"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 下載來源圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_download_mask"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 下載遮罩圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_decode_image"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 解碼來源圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_decode_mask"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 解碼遮罩圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_nsfw_content_detected"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 在來源圖片中偵測到 NSFW 內容"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_no_face"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 來源圖片未偵測到臉部"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_pose"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 在來源圖片偵測姿勢失敗"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_face_parsing"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 在來源圖片進行人臉分割失敗"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_inference"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 推論流程錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exceed_nsfw_retry_limits"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 超過重試上限，以避免生成 NSFW 圖片"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_upload"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 上傳結果圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"unknown_internal_error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 其他"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}},"components/schemas/BasicFaceAttrRespHairFrizziness":{"id":"components/schemas/BasicFaceAttrRespHairFrizziness","kind":"json-schema","title":"BasicFaceAttrRespHairFrizziness","data":{"type":"object","properties":{"mapping":{"type":"number","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"用於對應結果的索引鍵"},"children":[],"type":"text"}],"type":"paragraph"}],"enum":[0,1,2,3]},"term":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"與 \"mapping\" 一比一對應"},"children":[],"type":"text"}],"type":"paragraph"}],"enum":["Not Frizzy","Slightly Frizzy","Frizzy","Extreme Frizzy"]}}}},"components/schemas/TaskStatusResponseHairFrizz":{"id":"components/schemas/TaskStatusResponseHairFrizz","kind":"json-schema","title":"TaskStatusResponseHairFrizz","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"example":200},"data":{"type":"object","properties":{"task_status":{"type":"string","enum":["running","success","error"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個任務的狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"$ref":"#/components/schemas/EngineErrorCode"},"error_message":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤的詳細說明"},"children":[],"type":"text"}],"type":"paragraph"}]},"results":{"allOf":[{"type":"object","properties":{"hair_frizziness":{"$ref":"#/components/schemas/BasicFaceAttrRespHairFrizziness"}}}]}}}}}},"schema_0":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/responses/RunError"}]},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":401,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error_code":{"type":"string","enum":["InvalidApiKey","InactiveApiKey","ExpiredApiKey"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidApiKey - 未提供 API Key，或 API Key 無效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InactiveApiKey - API Key 已停用"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"ExpiredApiKey - API Key 已到期"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}}},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"object"},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"string","example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"example":400},"error_code":{"type":"string","enum":["InvalidTaskId"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidTaskId - 任務 id 無效"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}}},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"example":500},"error_code":{"type":"string","enum":["TaskTimeout"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"TaskTimeout - 任務在預期時間內沒有回應"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}}},"id":"schema_5"}},"exampleStore":{},"securitySchemeStore":{"BearerAuthenticationV2":{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用標準的 'Bearer authentication'。請在標頭中放入您的 'API Key'："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}},"specVersion":"3.0.0","servers":[{"url":"https://yce-api-01.makeupar.com"}],"specType":"openapi"},"options":{"layout":"stacked","mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/@l10n/zh-TW/reference/ai_hair_frizziness_detection.json?download"},{"url":"/_bundle/@l10n/zh-TW/reference/ai_hair_frizziness_detection.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"AI 毛躁髮質分析","description":"# 概述\n僅用 3 張照片進行 180° 全視角髮絲毛躁度分析\n\n我們的 AI 毛躁髮質分析只需上傳 3 張照片——頭髮的正面、左側與右側視角——即可在數秒內提供精準的髮絲毛躁度分析。\n\n這高效的流程在數秒內提供準確結果，讓企業能依據髮絲毛躁度提供客製化的頭髮解決方案與抗毛躁產品，無需耗時的面對面諮詢、複雜的頭髮測驗，或專用硬體安裝。\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_frizzy_S_02_enu_b80c238858.jpg)\n\n## 整合指南\n\n1. **上傳自拍**\n  您可以透過兩種方式之一提供來源圖片：\n\n  - **使用現有的公開圖片網址**\n    無需上傳，您可以在啟動 AI 任務時直接提供可公開存取的圖片網址。\n\n  - **透過 File API 上傳**\n    使用端點：\n    ```\n    POST /s2s/v2.0/file\n    ```\n    這會回傳用於後續任務執行的 `file_id`。\n\n    - ***重要***：僅呼叫 File API 並不會上傳您的檔案。您必須**手動上傳**檔案到**File API 回應中提供的網址**。該網址就是您的上傳目的地，請確保檔案成功傳輸到該處後再繼續。\n\n    在呼叫 AI API 之前，請確保您的檔案已成功上傳。使用 File API 取得上傳網址，然後將檔案上傳到該位置。上傳完成後，您會在回應中取得 ***file_id***，這個 ID 就是您用於存取該檔案相關 AI 功能的依據。\n\n      > **警告：** 請注意，若您未將檔案上傳到 File API 回應中提供的網址，使用 AI API 時會得到 500 Server Error / unknown_internal_error 或 404 Not Found 錯誤。\n\n2.  **執行 AI 任務以取得任務 ID**\n    使用 /s2s/v2.0/task/hair-frizziness-detection 執行 AI 任務。對於目標使用者圖片，提供 ``src_file_url`` 或 ``src_file_id``。並提供要套用的 ``template_id`` 以取得 ``task_id``。\n\n3.  **輪詢以查詢任務狀態直到成功或失敗**\n    使用 ``task_id``，透過輪詢 GET /s2s/v2.0/task/hair-frizziness-detection 監控任務狀態，以取得目前的引擎狀態。在引擎完成任務之前，狀態會維持為 running，此階段不會消耗點數。\n    您也可以實作 webhook，在 AI 任務成功或失敗時接收通知。細節請參考 **[Webhook](../../../../develop/webhook)** 章節。\n\n    > **警告：** 必須在任務的保留期間內輪詢以查詢任務狀態。若在保留期間內沒有輪詢請求，任務將會逾時，即使任務已成功處理。您的點數仍會被消耗。\n\n    > **警告：** 若您查詢已逾時任務的狀態，會收到 InvalidTaskId 錯誤。因此，執行 AI 任務後，您必須在保留期間內輪詢以查詢狀態，直到狀態變為 success 或 error。\n\n4.  **成功後取得 AI 任務的結果**\n    引擎處理您的輸入檔案並生成結果影像後，任務狀態會變為 success。您會取得處理後圖片的網址。\n\n## 輸入與輸出\n* 輸入格式\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_frizzy_step_01_ac5c651ea4.png)\n上傳 3 張照片——頭髮的正面、左側與右側視角。\n您可以使用 JS Camera Kit 實作 JavaScript 攝影模組，拍攝 3 張合格的照片。\n\n\n* 輸出格式\nAI 毛躁髮質分析評估髮質類型，並辨識 4 種不同的髮絲毛躁程度——從平滑頭髮到極度毛躁的頭髮，提供關於髮絲毛躁狀況的精準洞察。\n\n| **對應（0–3）** | **術語**            | **說明**                                           |\n| ----------------- | ------------------- | --------------------------------------------------------- |\n| 0             | 不毛躁      | 頭髮看起來平滑，幾乎或完全沒有可見的毛躁。     |\n| 1            | 輕微毛躁 | 可見輕微毛躁；表面質地有輕微的不規則。 |\n| 2             | 毛躁         | 頭髮各處有明顯毛躁；質地明顯紊亂。   |\n| 3             | 極度毛躁  | 強烈且廣泛的毛躁；頭髮質地高度不規則。  |\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_frizzy_S_01_enu_fcd10905ff.jpg)\n\n* 輸出範例\n```json\n{\n  \"mapping\": 1, // number；結果對應的鍵，選項：[0, 1, 2, 3]\n  \"term\": \"Slightly Frizzy\" // string；與 \"mapping\" 一一對應，選項：[\"Not Frizzy\", \"Slightly Frizzy\", \"Frizzy\", \"Extreme Frizzy\"]\n}\n```\n\n## 檔案規格與錯誤\n* 支援的格式與尺寸\n\n|類型|支援的尺寸|支援的檔案大小|支援的格式|\n|  ----  | ----  | ----  | ----  |\n|AI 毛躁髮質分析|圖片寬與高至少 320 像素，任一維度不超過 4096 像素。若您的圖片其中一邊超過 1080 像素，會自動調整尺寸以符合該限制進行分析。|< 10MB|jpg/png|\n\n* 錯誤代碼\n\n|錯誤代碼|說明|\n|  ----  | ----  |\n|error_mismatch_image_size|請確保您所有的臉部照片（正面、左側、右側）尺寸相同|\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_insufficient_lighting|光線過暗，導致難以分析|\n|error_face_angle_invalid|您的臉部角度不太正確。正面拍攝時，請讓頭部偏離直線不超過 10 度。側面拍攝時，角度應超過 15 度|\n\n* 環境與相依性\n\n| 範例程式語言 / 工具 | 建議的執行環境版本 |\n|---|---|\n| cURL | - bash >= 3.2</br>   - curl >= 7.58（現代 TLS/HTTP 支援）</br>   - jq >= 1.6（穩健的 JSON 解析） |\n| Node.js（JavaScript） | Node >= 18（支援全域 fetch） |\n| JavaScript | - Chrome / Edge >= 80</br>   - Firefox >= 74</br>   - Safari >= 13.1 |\n| PHP | PHP >= 7.4（現代 TLS/相容性），ext-curl（建議）或 allow_url_fopen=On + ext-openssl、ext-json |\n| Python | Python >= 3.10（支援 f-strings），requests >= 2.20.0 |\n| Java | Java 11+（支援 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| AI 功能 | 消耗的點數 |\n|---|---|\n| AI 毛躁髮質分析 V1.0 | 2 |\n\n---\n"}},"baseSlug":"/zh-tw/reference/ai_hair_frizziness_detection","routesMapping":{}}