{"items":[{"type":"link","label":"AI 虛擬髮型","link":"/zh-tw/reference/ai_hairstyle","routeSlug":"/zh-tw/reference/ai_hairstyle","content":{"contentType":"overview","meta":{"name":"AI 虛擬髮型"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"ai_hairstyle.json","url":"/_bundle/@l10n/zh-TW/reference/ai_hairstyle.json?download"},{"kind":"download","label":"ai_hairstyle.yaml","url":"/_bundle/@l10n/zh-TW/reference/ai_hairstyle.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":"使用最新的 AI 技術嘗試多種髮型，同時滿足女性與男性，符合不同的性別與風格偏好。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"探索風格的世界：捲髮、長髮、平頭等。我們 AI 驅動的髮型變換器讓您可以輕鬆嘗試。現在就找到您的理想髮型！"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_style_v3_poster_bb1c7aad10.jpg"},"children":[],"type":"image"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"}]}],"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":"API Playground"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"您可以使用 API Playground 測試 AI 虛擬髮型功能。這讓您可以實驗自己的想法，並更深入了解試戴流程。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"在此存取 API Playground："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"https://yce.makeupar.com/api-console/en/api-playground/ai-hair-style-generator/"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"https://yce.makeupar.com/api-console/en/api-playground/ai-hair-style-generator/"},"children":[],"type":"text"}],"type":"link"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 工作流程"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$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 的工作流程："},"children":[],"type":"text"}],"type":"paragraph"},{"$$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"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.1/task/hair-transfer"},"children":[],"type":"code"}],"type":"paragraph"},{"$$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"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization: Bearer YOUR_API_KEY"},"children":[],"type":"code"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"工作流程步驟："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":true,"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"}],"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"}],"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":{"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":"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":{"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":{"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":{"content":"template_id"},"children":[],"type":"code"},{"$$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"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"呼叫 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.1/task/template/hair-transfer"},"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"}],"type":"td"}],"type":"tr"},{"$$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"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" / "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_id"},"children":[],"type":"code"},{"$$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"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"透過相同的檔案 API 上傳；"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"若您的參考圖片已託管在線上，請使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{"ordered":true,"start":3,"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"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"透過 HTTP POST 請求，將上傳的圖片與風格設定傳送到 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.0/file"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"在回應中取得唯一的任務 ID，用以識別這次互動。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}],"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"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$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":"，透過 HTTP GET 請求（例如 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"GET /task/${task_id}"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）定期輪詢任務狀態。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"持續監控："},"children":[],"type":"text"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Task_status = \"success\""},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（流程完成）。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Task_status = \"error\""},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（視情況解決或重試）。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"狀態轉為成功後，相應更新工作流程。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個結構化的工作流程確保與使用者輸入的高效整合、任務的自動化監控，以及無縫取得結果。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$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":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Bearer Token"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 將您的 API key 納入請求標頭："},"children":[],"type":"text"},{"$$mdtype":"Node","attributes":{"content":"Authorization: Bearer YOUR_API_KEY\n"},"children":[{"$$mdtype":"Node","attributes":{"content":"Authorization: Bearer YOUR_API_KEY\n"},"children":[],"type":"text"}],"type":"fence"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"您可以在 https://yce.makeupar.com/api-console/en/api-keys/ 找到您的 API Key。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 使用指南"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"本指南說明如何使用 AI 虛擬髮型 API 上傳圖片、準備參考圖片，以及建立虛擬試戴任務。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 1. 使用 File API 上傳檔案，或提供有效的圖片網址"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$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"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.0/file"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）上傳目標使用者圖片。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"或者，若您已有公開的圖片網址，可跳過步驟 1 到 3。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"圖片需求："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳高解析度的自拍照片。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"確保照片清楚呈現整個身體。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"避免有多人干擾的物件背景。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"請求範例："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/file \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"files\": [\n      {\n        \"content_type\": \"image/jpg\",\n        \"file_name\": \"selfie_01_3dbd1b6683.jpg\",\n        \"file_size\": 547541\n      }\n    ]\n  }'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/file \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"files\": [\n      {\n        \"content_type\": \"image/jpg\",\n        \"file_name\": \"selfie_01_3dbd1b6683.jpg\",\n        \"file_size\": 547541\n      }\n    ]\n  }'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 2. 取得 File API 回應"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$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":"用於建立 AI 任務的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"用於上傳實際圖片檔案的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"requests.url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應範例："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"files\": [\n      {\n        \"content_type\": \"image/jpg\",\n        \"file_name\": \"full_body_photo_01_3dbd1b6683.jpg\",\n        \"file_id\": \"SaGaqpDgKwFrVBgMpQMA3HY0LeqdT9/13W5TOD8/u/FfjK3xgCQ+hRt9MJXBFaud\",\n        \"requests\": [\n          {\n            \"method\": \"PUT\",\n            \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...\",\n            \"headers\": {\n              \"Content-Length\": \"547541\",\n              \"Content-Type\": \"image/jpg\"\n            }\n          }\n        ]\n      }\n    ]\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"files\": [\n      {\n        \"content_type\": \"image/jpg\",\n        \"file_name\": \"full_body_photo_01_3dbd1b6683.jpg\",\n        \"file_id\": \"SaGaqpDgKwFrVBgMpQMA3HY0LeqdT9/13W5TOD8/u/FfjK3xgCQ+hRt9MJXBFaud\",\n        \"requests\": [\n          {\n            \"method\": \"PUT\",\n            \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...\",\n            \"headers\": {\n              \"Content-Length\": \"547541\",\n              \"Content-Type\": \"image/jpg\"\n            }\n          }\n        ]\n      }\n    ]\n  }\n}\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 3. 上傳圖片到提供的網址"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 File API 回應中的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"requests.url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 上傳圖片："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --location --request PUT 'https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...' \\\n  --header 'Content-Type: image/jpg' \\\n  --header 'Content-Length: 547541' \\\n  --data-binary @'./full_body_photo_01_3dbd1b6683.jpg'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --location --request PUT 'https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...' \\\n  --header 'Content-Type: image/jpg' \\\n  --header 'Content-Length: 547541' \\\n  --data-binary @'./full_body_photo_01_3dbd1b6683.jpg'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 4. 準備參考圖片"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"4.1 取得預先定義的圖片範本"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範本 API"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.1/task/template/hair-transfer"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）取得預先定義的參考範本清單："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --request GET \\\n  --url 'https://yce-api-01.makeupar.com/s2s/v2.1/task/template/hair-transfer?page_size=20&starting_token=73a3c9e69b89' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --request GET \\\n  --url 'https://yce-api-01.makeupar.com/s2s/v2.1/task/template/hair-transfer?page_size=20&starting_token=73a3c9e69b89' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"4.2 上傳參考圖片"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$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":"使用 File API（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.0/file"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）上傳參考圖片，或"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"提供有效的圖片網址。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"支援的圖片："},"children":[],"type":"text"}],"type":"strong"}],"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":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"詳細規格請參考 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"href":"#section/overview/File-Specs-and-Errors"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案規格與錯誤"},"children":[],"type":"text"}],"type":"link"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 5. 建立 AI 虛擬髮型任務"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 任務 API"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.1/task/hair-transfer"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）建立虛擬試戴任務。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"參數："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$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":"src_file_url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"參考圖片："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_url"},"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"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"請求範例："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.1/task/hair-transfer \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"src_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/selfie_03_cccd5d4803.jpeg\",\n    \"ref_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/style_reference_full_body_01_5a000d999f.png\"\n  }'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.1/task/hair-transfer \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"src_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/selfie_03_cccd5d4803.jpeg\",\n    \"ref_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/style_reference_full_body_01_5a000d999f.png\"\n  }'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應範例："},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"task_id\": \"SaGaqpDgKwFrVBgMpQMA3HY0LeqdT9_13W5TOD8_u_GPi6NqQ3dhlmN-6ntFwhzT\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"task_id\": \"SaGaqpDgKwFrVBgMpQMA3HY0LeqdT9_13W5TOD8_u_GPi6NqQ3dhlmN-6ntFwhzT\"\n  }\n}\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 6. 輪詢任務結果"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用任務 ID 查詢狀態："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"curl --request GET \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.1/task/hair-transfer/<YOUR_TASK_ID> \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json'\n","language":"bash"},"children":[{"$$mdtype":"Node","attributes":{"content":"curl --request GET \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.1/task/hair-transfer/<YOUR_TASK_ID> \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json'\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"步驟 7. 取得結果"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"成功的回應會包含結果圖片的下載網址："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"error\": null,\n    \"results\": {\n      \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...\"\n    },\n    \"task_status\": \"success\"\n  }\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 200,\n  \"data\": {\n    \"error\": null,\n    \"results\": {\n      \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...\"\n    },\n    \"task_status\": \"success\"\n  }\n}\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API Key 無效的錯誤回應："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 401,\n  \"error\": \"Unauthorized\",\n  \"error_code\": \"InvalidAccessToken\"\n}\n","language":"json"},"children":[{"$$mdtype":"Node","attributes":{"content":"{\n  \"status\": 401,\n  \"error\": \"Unauthorized\",\n  \"error_code\": \"InvalidAccessToken\"\n}\n"},"children":[],"type":"text"}],"type":"fence"},{"$$mdtype":"Node","attributes":{},"children":[],"type":"hr"},{"$$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":"應用案例："},"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_style_v1_video_08513beb46.jpg"},"children":[],"type":"image"}],"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/AI_Hair_Extension_recommendation_ba24bd5d92.png"},"children":[],"type":"image"}],"type":"paragraph"}]}],"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":"AI 功能"},"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":"長邊 <= 1024，臉寬 >= 128，臉部姿勢：-10 < pitch < +10，-45 < yaw < +45，-15 < roll < +15，僅限單張臉部，需呈現完整臉部"},"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/jpeg"},"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_no_shoulder"},"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_large_face_angle"},"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_landmarks"},"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_hair_too_short"},"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_pose"},"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":{"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/概述/常見問題"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"常見問題"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"問：我可以試戴自訂的髮型嗎？"},"children":[],"type":"text"}],"type":"strong"}],"type":"paragraph"},{"$$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":" 完全可以，您可以使用自己的參考照片試戴自訂髮型。AI 虛擬髮型支援兩種指定理想髮型的方法："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":true,"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":"您可以透過 File API（"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.0/file"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"）上傳高解析度的自拍或風格照片（例如展示目標髮型的人）。上傳後，在建立 AI 任務時，使用回傳的 "},"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"}],"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":"若您的參考圖片已託管在線上（例如在您自己的伺服器或 CDN 上），您可以直接在請求內容的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 欄位提供其 HTTPS 網址。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"透過 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.1/task/hair-transfer"},"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":{"content":"src_file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（您的自拍）與 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"ref_file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"（您的自訂參考圖片），"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"或"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$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":"ref_file_url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$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":"支援的格式：僅限 JPG/JPEG"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案大小低於 10 MB"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"長邊 ≤ 1024 像素"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"臉寬 ≥ 128 像素"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"頭部姿勢在允許範圍內（pitch：−10° 到 +10°，yaw：−45° 到 +45°，roll：−15° 到 +15°）"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"可見單張臉部，完整正面視角且頭髮清晰可見"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這種彈性讓您可以從照片參考套用幾乎任何髮型，而不僅限於預先定義的範本。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$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/概述/點數消耗"},"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 虛擬髮型 V2.0"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"預設模式 1 點 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 自訂模式 2 點"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"AI 虛擬髮型 V2.1"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"預設模式 2 點 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$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_hairstyle/section/概述","routeSlug":"/zh-tw/reference/ai_hairstyle/section/概述","items":[{"type":"link","label":"整合指南","link":"/zh-tw/reference/ai_hairstyle/section/概述/整合指南","routeSlug":"/zh-tw/reference/ai_hairstyle/section/概述/整合指南","content":null},{"type":"link","label":"檔案規格與錯誤","link":"/zh-tw/reference/ai_hairstyle/section/概述/檔案規格與錯誤","routeSlug":"/zh-tw/reference/ai_hairstyle/section/概述/檔案規格與錯誤","content":null},{"type":"link","label":"常見問題","link":"/zh-tw/reference/ai_hairstyle/section/概述/常見問題","routeSlug":"/zh-tw/reference/ai_hairstyle/section/概述/常見問題","content":null},{"type":"link","label":"點數消耗","link":"/zh-tw/reference/ai_hairstyle/section/概述/點數消耗","routeSlug":"/zh-tw/reference/ai_hairstyle/section/概述/點數消耗","content":null}],"content":null},{"type":"group","label":"V2.1","link":"/zh-tw/reference/ai_hairstyle/v2.1","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.1","items":[{"label":"列出預先定義的範本 v2.1。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get","metadata":{"seo":{"title":"列出預先定義的範本 v2.1。","description":"列出預先定義的範本 v2.1。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"列出預先定義的範本 v2.1。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"列出預先定義的範本 v2.1。","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":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"page_size","in":"query","schemaId":"schema_0","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這一頁要回傳的結果數量。有效值應介於 1 到 20 之間。預設為 20。"},"children":[],"type":"text"}],"type":"paragraph"}]},{"name":"starting_token","in":"query","schemaId":"schema_1","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"目前頁面的令牌。第一頁以 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"null"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 開始，並使用上一個回應中的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"next_token"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 開始下一頁"},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.1/task/template/hair-transfer","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[],"query":[{"name":"page_size","in":"query","example":20,"schemaId":"schema_0"},{"name":"starting_token","in":"query","example":"73a3c9e69b89","schemaId":"schema_1"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401"],"pointer":"/s2s/v2.1/task/template/hair-transfer","href":"v2.1/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get","summary":"列出預先定義的範本 v2.1。"},"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":"schema_2"}},"schemaId":"schema_2"},{"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_3"}},"schemaId":"schema_3"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"}],"pointer":"/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"400","schemaId":"schema_3","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v2.1/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get"}],"panels":[]}]},"httpPath":"/s2s/v2.1/task/template/hair-transfer"},{"label":"執行 AI 髮型生成 v2.1 任務。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer/post","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer/post","metadata":{"seo":{"title":"執行 AI 髮型生成 v2.1 任務。","description":"AI 任務是非同步的。當功能支援 webhook 時，請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章，並在收到 success 或 error 通知後，使用收到的 task_id 查詢任務結果。設定與驗證細節請見 webhook 整合指南。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"執行 AI 髮型生成 v2.1 任務。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.1~1task~1hair-transfer/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"執行 AI 髮型生成 v2.1 任務。","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":"AI 任務是非同步的。當功能支援 webhook 時，請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章，並在收到 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"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"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"/develop/webhook"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"webhook 整合指南"},"children":[],"type":"text"}],"type":"link"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"若您的整合不支援 webhook 或無法使用 webhook，請實作輪詢。送出 AI 任務後，以固定間隔（例如每 10 秒）輪詢狀態端點，直到任務狀態為 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$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":"schema_5"}},"schemaId":"schema_5","pointer":"/paths/~1s2s~1v2.1~1task~1hair-transfer/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.1/task/hair-transfer","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":"schema_5"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.1/task/hair-transfer","href":"v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer/post","summary":"執行 AI 髮型生成 v2.1 任務。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"schema_5","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_5"}},"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_6"}},"schemaId":"schema_6"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"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_7"}},"schemaId":"schema_7"}],"pointer":"/paths/~1s2s~1v2.1~1task~1hair-transfer/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_6","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"429","schemaId":"schema_7","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer/post"}],"panels":[]}]},"httpPath":"/s2s/v2.1/task/hair-transfer"},{"label":"查詢 AI 髮型生成 v2.1 任務的狀態。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get","metadata":{"seo":{"title":"查詢 AI 髮型生成 v2.1 任務的狀態。","description":"查詢 AI 髮型生成 v2.1 任務的狀態。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"查詢 AI 髮型生成 v2.1 任務的狀態。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"查詢 AI 髮型生成 v2.1 任務的狀態。","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_8","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"要查詢的任務 ID"},"children":[],"type":"text"}],"type":"paragraph"}],"required":true}],"pointer":"/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.1/task/hair-transfer/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_8"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.1/task/hair-transfer/{task_id}","href":"v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get","summary":"查詢 AI 髮型生成 v2.1 任務的狀態。"},"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":"schema_9"}},"schemaId":"schema_9"},{"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_10"}},"schemaId":"schema_10"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"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_11"}},"schemaId":"schema_11"}],"pointer":"/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_9","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}}},{"code":"400","schemaId":"schema_10","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"500","schemaId":"schema_11","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_11"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.1/task/hair-transfer/{task_id}"}],"content":{"contentType":"group","meta":{"name":"V2.1"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"V2.1","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"透過更新的 AI 技術與新的風格範本，平台可以創造新髮型、套用特定的範本造型，並從使用者提供的參考圖片移轉風格。"},"children":[],"type":"text"}],"type":"paragraph"}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/s2s/v2.1/task/template/hair-transfer","summary":"列出預先定義的範本 v2.1。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v2.1/paths/~1s2s~1v2.1~1task~1template~1hair-transfer/get","deprecated":false},{"title":"/s2s/v2.1/task/hair-transfer","summary":"執行 AI 髮型生成 v2.1 任務。","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer/post","deprecated":false},{"title":"/s2s/v2.1/task/hair-transfer/{task_id}","summary":"查詢 AI 髮型生成 v2.1 任務的狀態。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer~1{task_id}/get","deprecated":false}]}]}]}]}},{"type":"group","label":"V2.0","link":"/zh-tw/reference/ai_hairstyle/v2.0","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.0","items":[{"label":"執行帶參考圖片的 AI 髮型生成任務。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer/post","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer/post","metadata":{"seo":{"title":"執行帶參考圖片的 AI 髮型生成任務。","description":"AI 任務是非同步的。當功能支援 webhook 時，請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章，並在收到 success 或 error 通知後，使用收到的 task_id 查詢任務結果。設定與驗證細節請見 webhook 整合指南。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"執行帶參考圖片的 AI 髮型生成任務。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1hair-transfer/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"執行帶參考圖片的 AI 髮型生成任務。","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":"AI 任務是非同步的。當功能支援 webhook 時，請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章，並在收到 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"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"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"/develop/webhook"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"webhook 整合指南"},"children":[],"type":"text"}],"type":"link"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"若您的整合不支援 webhook 或無法使用 webhook，請實作輪詢。送出 AI 任務後，以固定間隔（例如每 10 秒）輪詢狀態端點，直到任務狀態為 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$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":"schema_12"}},"schemaId":"schema_12","pointer":"/paths/~1s2s~1v2.0~1task~1hair-transfer/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/task/hair-transfer","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":"schema_12"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.0/task/hair-transfer","href":"v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer/post","summary":"執行帶參考圖片的 AI 髮型生成任務。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"schema_12","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_12"}},"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":"AI 髮型生成任務執行成功"},"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_6"}},"schemaId":"schema_6"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"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_7"}},"schemaId":"schema_7"}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-transfer/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_6","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"429","schemaId":"schema_7","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/hair-transfer"},{"label":"查詢帶參考圖片的 AI 髮型生成任務的狀態。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get","routeSlug":"/zh-tw/reference/ai_hairstyle/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get","metadata":{"seo":{"title":"查詢帶參考圖片的 AI 髮型生成任務的狀態。","description":"查詢帶參考圖片的 AI 髮型生成任務的狀態。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"查詢帶參考圖片的 AI 髮型生成任務的狀態。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"查詢帶參考圖片的 AI 髮型生成任務的狀態。","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_8","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-transfer~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/hair-transfer/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_8"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.0/task/hair-transfer/{task_id}","href":"v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get","summary":"查詢帶參考圖片的 AI 髮型生成任務的狀態。"},"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":"成功查詢 AI 髮型生成任務的狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}},"schemaId":"schema_9"},{"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_10"}},"schemaId":"schema_10"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"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_11"}},"schemaId":"schema_11"}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_9","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}}},{"code":"400","schemaId":"schema_10","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"500","schemaId":"schema_11","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_11"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/hair-transfer/{task_id}"}],"content":{"contentType":"group","meta":{"name":"V2.0"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"V2.0","showPageActions":true},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"透過直接從使用者提供的參考圖片創造髮型，此方案也以最新引擎支援 AI 驅動的風格生成與範本套用。"},"children":[],"type":"text"}],"type":"paragraph"}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/s2s/v2.0/task/hair-transfer","summary":"執行帶參考圖片的 AI 髮型生成任務。","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer/post","deprecated":false},{"title":"/s2s/v2.0/task/hair-transfer/{task_id}","summary":"查詢帶參考圖片的 AI 髮型生成任務的狀態。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v2.0/paths/~1s2s~1v2.0~1task~1hair-transfer~1{task_id}/get","deprecated":false}]}]}]}]}},{"type":"group","label":"V1.0","link":"/zh-tw/reference/ai_hairstyle/v1.0","routeSlug":"/zh-tw/reference/ai_hairstyle/v1.0","items":[{"label":"列出預先定義的範本。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v1.0/paths/~1s2s~1v2.0~1task~1template~1hair-style/get","routeSlug":"/zh-tw/reference/ai_hairstyle/v1.0/paths/~1s2s~1v2.0~1task~1template~1hair-style/get","metadata":{"seo":{"title":"列出預先定義的範本。","description":"列出預先定義的範本。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"列出預先定義的範本。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1template~1hair-style/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":"query","label":"Query","labelTranslationKey":"query","parameters":[{"name":"page_size","in":"query","schemaId":"schema_13","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這一頁要回傳的結果數量。有效值應介於 1 到 20 之間。預設為 20。"},"children":[],"type":"text"}],"type":"paragraph"}]},{"name":"starting_token","in":"query","schemaId":"schema_1","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"目前頁面的令牌。第一頁以 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"null"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 開始，並使用上一個回應中的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"next_token"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 開始下一頁"},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1s2s~1v2.0~1task~1template~1hair-style/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/template/hair-style","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[],"query":[{"name":"page_size","in":"query","example":20,"schemaId":"schema_13"},{"name":"starting_token","in":"query","example":"73a3c9e69b89","schemaId":"schema_1"}],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401"],"pointer":"/s2s/v2.0/task/template/hair-style","href":"v1.0/paths/~1s2s~1v2.0~1task~1template~1hair-style/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":"schema_2"}},"schemaId":"schema_2"},{"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_3"}},"schemaId":"schema_3"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"}],"pointer":"/paths/~1s2s~1v2.0~1task~1template~1hair-style/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_2"}}},{"code":"400","schemaId":"schema_3","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1template~1hair-style/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/template/hair-style"},{"label":"執行 AI 髮型生成任務。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v1.0/paths/~1s2s~1v2.0~1task~1hair-style/post","routeSlug":"/zh-tw/reference/ai_hairstyle/v1.0/paths/~1s2s~1v2.0~1task~1hair-style/post","metadata":{"seo":{"title":"執行 AI 髮型生成任務。","description":"AI 任務是非同步的。當功能支援 webhook 時，請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章，並在收到 success 或 error 通知後，使用收到的 task_id 查詢任務結果。設定與驗證細節請見 webhook 整合指南。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"執行 AI 髮型生成任務。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1hair-style/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"執行 AI 髮型生成任務。","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":"AI 任務是非同步的。當功能支援 webhook 時，請優先使用以 webhook 為基礎的完成處理。設定您的 webhook 端點、驗證 webhook 簽章，並在收到 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"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"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"/develop/webhook"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"webhook 整合指南"},"children":[],"type":"text"}],"type":"link"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"若您的整合不支援 webhook 或無法使用 webhook，請實作輪詢。送出 AI 任務後，以固定間隔（例如每 10 秒）輪詢狀態端點，直到任務狀態為 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"success"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 或 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"error"},"children":[],"type":"code"},{"$$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":"schema_14"}},"schemaId":"schema_14","pointer":"/paths/~1s2s~1v2.0~1task~1hair-style/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/task/hair-style","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":"schema_14"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.0/task/hair-style","href":"v1.0/paths/~1s2s~1v2.0~1task~1hair-style/post","summary":"執行 AI 髮型生成任務。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"schema_14","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_14"}},"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":"AI 髮型生成任務執行成功"},"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_6"}},"schemaId":"schema_6"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"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_7"}},"schemaId":"schema_7"}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-style/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_6","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_6"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"429","schemaId":"schema_7","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_7"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-style/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/hair-style"},{"label":"查詢 AI 髮型生成任務的狀態。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_hairstyle/v1.0/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get","routeSlug":"/zh-tw/reference/ai_hairstyle/v1.0/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get","metadata":{"seo":{"title":"查詢 AI 髮型生成任務的狀態。","description":"查詢 AI 髮型生成任務的狀態。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"查詢 AI 髮型生成任務的狀態。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"查詢 AI 髮型生成任務的狀態。","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_8","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-style~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/hair-style/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_8"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.0/task/hair-style/{task_id}","href":"v1.0/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get","summary":"查詢 AI 髮型生成任務的狀態。"},"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":"成功查詢 AI 髮型生成任務的狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}},"schemaId":"schema_9"},{"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_10"}},"schemaId":"schema_10"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API 金鑰無效或缺失"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"},{"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_11"}},"schemaId":"schema_11"}],"pointer":"/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"schema_9","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_9"}}},{"code":"400","schemaId":"schema_10","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_10"}}},{"code":"401","schemaId":"schema_4","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}}},{"code":"500","schemaId":"schema_11","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_11"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/hair-style/{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 技術生成新髮型，並透過範本套用特定髮型。"},"children":[],"type":"text"}],"type":"paragraph"}]}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/s2s/v2.0/task/template/hair-style","summary":"列出預先定義的範本。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1template~1hair-style/get","deprecated":false},{"title":"/s2s/v2.0/task/hair-style","summary":"執行 AI 髮型生成任務。","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-style/post","deprecated":false},{"title":"/s2s/v2.0/task/hair-style/{task_id}","summary":"查詢 AI 髮型生成任務的狀態。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1hair-style~1{task_id}/get","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/RunHairTransferTaskV2.1Template":{"id":"components/schemas/RunHairTransferTaskV2.1Template","kind":"json-schema","title":"RunHairTransferTaskV2.1Template","data":{"required":["template_id"],"properties":{"template_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範本的 ID。請先列出預先定義的範本，然後使用某個範本的 id。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"good_template_001"}}}},"components/schemas/RunHairTransferTaskV2.1":{"id":"components/schemas/RunHairTransferTaskV2.1","kind":"json-schema","title":"RunHairTransferTaskV2.1","data":{"allOf":[{"type":"object","properties":{"hair_color":{"type":"string","enum":["ref","src"],"default":"ref","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"指定輸出圖片的髮色（來源/參考），預設為參考顏色。"},"children":[],"type":"text"}],"type":"paragraph"}]}}},{"title":"請提供 ref_file_id、ref_file_url 或 template_id 其中之一，且僅一個","not":{"required":["ref_file_url","template_id"]}},{"title":"請提供 ref_file_id、ref_file_url 或 template_id 其中之一，且僅一個","not":{"required":["ref_file_id","template_id"]}},{"anyOf":[{"allOf":[{"title":"以來源檔案網址與參考檔案網址執行任務","required":["ref_file_url"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileUrl"}]},{"allOf":[{"title":"以來源檔案網址與參考檔案 ID 執行任務","required":["ref_file_id"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileId"}]},{"allOf":[{"title":"以來源檔案 ID 與參考檔案網址執行任務","required":["ref_file_url"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileUrl"}]},{"allOf":[{"title":"以來源檔案 ID 與參考檔案 ID 執行任務","required":["ref_file_id"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileId"}]},{"allOf":[{"title":"以來源檔案網址與範本執行任務"},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/RunHairTransferTaskV2.1Template"}]},{"allOf":[{"title":"以來源檔案 ID 與範本執行任務"},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/RunHairTransferTaskV2.1Template"}]}]}]}},"components/schemas/HairStyleTemplate":{"id":"components/schemas/HairStyleTemplate","kind":"json-schema","title":"HairStyleTemplate","data":{"allOf":[{"$ref":"#/components/schemas/Template"},{"type":"object","properties":{"keep_users_color":{"type":"boolean"}}}]}},"components/schemas/Template":{"id":"components/schemas/Template","kind":"json-schema","title":"Template","data":{"type":"object","properties":{"id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範本的 ID。執行任務時作為 `template_id` 使用。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"good_template_001"},"thumb":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"風格的縮略圖。"},"children":[],"type":"text"}],"type":"paragraph"}]},"title":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範本的標題。"},"children":[],"type":"text"}],"type":"paragraph"}]},"category_name":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範本的類別名稱。"},"children":[],"type":"text"}],"type":"paragraph"}]}}}},"components/schemas/RunWithSingleTemplate":{"id":"components/schemas/RunWithSingleTemplate","kind":"json-schema","title":"RunWithSingleTemplate","data":{"title":"RunWithSingleTemplate","type":"object","properties":{"template_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"範本的 ID。請先列出預先定義的範本，然後使用某個範本的 id。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"good_template_001"}},"required":["template_id"]}},"components/schemas/BasicRunTaskV2SrcFileUrl":{"id":"components/schemas/BasicRunTaskV2SrcFileUrl","kind":"json-schema","title":"BasicRunTaskV2SrcFileUrl","data":{"type":"object","required":["src_file_url"],"properties":{"src_file_url":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"要執行任務的檔案網址。該網址應可公開存取。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/selfie.jpg"}}}},"components/schemas/BasicRunTaskV2SrcFileId":{"id":"components/schemas/BasicRunTaskV2SrcFileId","kind":"json-schema","title":"BasicRunTaskV2SrcFileId","data":{"type":"object","required":["src_file_id"],"properties":{"src_file_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"要執行任務的檔案 ID。檔案 ID 來自上傳檔案 API。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="}}}},"components/schemas/BasicRunTaskV2":{"id":"components/schemas/BasicRunTaskV2","kind":"json-schema","title":"BasicRunTaskV2","data":{"title":"BasicRunTaskV2","anyOf":[{"title":"Run task with src file url","allOf":[{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"}]},{"title":"Run task with src file ID","allOf":[{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"}]}]}},"components/schemas/RunWithSingleTemplateAndSrcUrl":{"id":"components/schemas/RunWithSingleTemplateAndSrcUrl","kind":"json-schema","title":"RunWithSingleTemplateAndSrcUrl","data":{"title":"RunWithSingleTemplateAndSrcUrl","allOf":[{"$ref":"#/components/schemas/RunWithSingleTemplate"},{"$ref":"#/components/schemas/BasicRunTaskV2"}]}},"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/RunError":{"id":"components/schemas/RunError","kind":"json-schema","title":"RunError","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":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤訊息"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"The operation could not be completed"},"error_code":{"type":"string","enum":["InvalidParameters","CreditInsufficiency","InvalidStyleGroup","InvalidStyle","BadRequest"],"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":"InvalidParameters - 請求參數無效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"CreditInsufficiency - 點數不足，無法執行"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"BadRequest - 非預期的請求參數"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidStyleGroup - 風格群組 id 無效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"InvalidStyle - 風格 id 無效"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}}}},"components/schemas/EngineErrorCode":{"id":"components/schemas/EngineErrorCode","kind":"json-schema","title":"EngineErrorCode","data":{"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":[{"$$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":"`error_exceed_max_image_size`  - 輸入圖片尺寸超過上限"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`exceed_max_filesize` - 輸入檔案大小超過上限"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`invalid_parameter` - 參數值無效"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_download_image` - 下載來源圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_download_mask` - 下載遮罩圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_decode_image` - 解析來源圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_decode_mask` - 解析遮罩圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_nsfw_content_detected` - 在來源圖片中偵測到 NSFW 內容"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_no_face` - 來源圖片未偵測到臉部"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_pose` - 無法偵測來源圖片的姿势"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_face_parsing` - 無法對來源圖片進行臉部分割"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_inference` - 推論流程錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`exceed_nsfw_retry_limits` - 超過重試上限以避免產生 NSFW 圖片"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`error_upload` - 上傳結果圖片錯誤"},"children":[],"type":"text"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"`unknown_internal_error` - 其他"},"children":[],"type":"text"}],"type":"item"}],"type":"list"}]}},"components/schemas/TaskStatusResponseBodySingleUrlResultsV2":{"id":"components/schemas/TaskStatusResponseBodySingleUrlResultsV2","kind":"json-schema","title":"TaskStatusResponseBodySingleUrlResultsV2","data":{"type":"object","properties":{"url":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下載這個結果的網址。有效期限 2 小時"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/sample-result-url"}}}},"components/schemas/TaskStatusResponseV2":{"id":"components/schemas/TaskStatusResponseV2","kind":"json-schema","title":"TaskStatusResponseV2","data":{"type":"object","properties":{"url":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"下載這個結果的網址。有效期限 2 小時"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/sample-result-url"}}}},"components/schemas/BasicRunTaskV2RefFileUrl":{"id":"components/schemas/BasicRunTaskV2RefFileUrl","kind":"json-schema","title":"BasicRunTaskV2RefFileUrl","data":{"type":"object","properties":{"ref_file_url":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"執行任務所用參考檔案的網址。該網址需可公開存取。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"https://example.com/accessory.jpg"}}}},"components/schemas/BasicRunTaskV2RefFileId":{"id":"components/schemas/BasicRunTaskV2RefFileId","kind":"json-schema","title":"BasicRunTaskV2RefFileId","data":{"type":"object","properties":{"ref_file_id":{"type":"string","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"執行任務所用參考檔案的 ID。來自上傳檔案 API 的檔案 ID。"},"children":[],"type":"text"}],"type":"paragraph"}],"example":"pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="}}}},"components/schemas/BasicRunTaskV2WithRequiredRef":{"id":"components/schemas/BasicRunTaskV2WithRequiredRef","kind":"json-schema","title":"BasicRunTaskV2WithRef","data":{"title":"BasicRunTaskV2WithRef","anyOf":[{"allOf":[{"title":"Run task with src file url & ref file url","required":["ref_file_url"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileUrl"}]},{"allOf":[{"title":"Run task with src file url & ref file ID","required":["ref_file_id"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileId"}]},{"allOf":[{"title":"Run task with src file ID & ref file url","required":["ref_file_url"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileUrl"}]},{"allOf":[{"title":"Run task with src file ID & ref file ID","required":["ref_file_id"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/BasicRunTaskV2RefFileId"}]}]}},"schema_0":{"kind":"json-schema","data":{"type":"integer","example":20,"minimum":1,"maximum":20},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"string","example":"73a3c9e69b89"},"id":"schema_1"},"schema_2":{"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":200},"data":{"type":"object","properties":{"templates":{"type":"array","items":{"$ref":"#/components/schemas/HairStyleTemplate"}},"next_token":{"type":"string","example":"73a3c9e69b89","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"查詢下一頁的令牌。"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":400,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Invalid parameter value"},"error_code":{"type":"string","example":"InvalidParameters"}}},"id":"schema_3"},"schema_4":{"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":{"type":"string","example":"Invalid API key"}}},"id":"schema_4"},"schema_5":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/RunHairTransferTaskV2.1"}]},"id":"schema_5"},"schema_6":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/RunError"}]},"id":"schema_6"},"schema_7":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":429,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Too many requests"}}},"id":"schema_7"},"schema_8":{"kind":"json-schema","data":{"type":"string","example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"},"id":"schema_8"},"schema_9":{"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":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":null}}},"$ref":"#/components/schemas/TaskStatusResponseBodySingleUrlResultsV2"},"id":"schema_9"},"schema_10":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":400,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Invalid task ID"}}},"id":"schema_10"},"schema_11":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":500,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error":{"type":"string","example":"Task execution timed out"}}},"id":"schema_11"},"schema_12":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/BasicRunTaskV2WithRequiredRef"}]},"id":"schema_12"},"schema_13":{"kind":"json-schema","data":{"type":"integer","example":20},"id":"schema_13"},"schema_14":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/RunWithSingleTemplateAndSrcUrl"}]},"id":"schema_14"}},"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_hairstyle.json?download"},{"url":"/_bundle/@l10n/zh-TW/reference/ai_hairstyle.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"AI 虛擬髮型","description":"# 概述\n使用最新的 AI 技術嘗試多種髮型，同時滿足女性與男性，符合不同的性別與風格偏好。\n探索風格的世界：捲髮、長髮、平頭等。我們 AI 驅動的髮型變換器讓您可以輕鬆嘗試。現在就找到您的理想髮型！\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_style_v3_poster_bb1c7aad10.jpg)\n\n---\n\n## 整合指南\n\n* API Playground\n您可以使用 API Playground 測試 AI 虛擬髮型功能。這讓您可以實驗自己的想法，並更深入了解試戴流程。\n\n在此存取 API Playground：\n<https://yce.makeupar.com/api-console/en/api-playground/ai-hair-style-generator/>\n\n---\n\n* API 工作流程\n本指南將引導您完成：\n\nAI 虛擬髮型 API 的工作流程：\n\n**端點：** `/s2s/v2.1/task/hair-transfer`\n\n**需要認證：** `Authorization: Bearer YOUR_API_KEY`\n\n**工作流程步驟：**\n\n1. **圖片上傳準備：**\n   - 流程從準備自拍開始。\n\n2. **列出預先定義的範本，或使用您自己的參考照片**\n    **選擇參考來源**\n造型參考有兩種選項：\n\n| 選項 | 使用情境 | 實作建議 |\n|-------|-----------|---------------------|\n| **預先定義的範本**（`template_id`） | 快速開始（例如「捲髮短髮」、「側分瀏海」） | 呼叫 `/s2s/v2.1/task/template/hair-transfer` 並選擇 `template_id`。 |\n| **自訂參考圖片**（`ref_file_url` / `ref_file_id`） | 使用者上傳自己的風格照片，或使用提供的圖片連結 | 透過相同的檔案 API 上傳；<BR>若您的參考圖片已託管在線上，請使用 `ref_file_url`。 |\n\n3. **啟動 AI 任務並取得任務 ID：**\n   - 透過 HTTP POST 請求，將上傳的圖片與風格設定傳送到 `/s2s/v2.0/file`。\n   - 在回應中取得唯一的任務 ID，用以識別這次互動。\n\n4. **輪詢任務狀態（持續檢查）：**\n   - 使用取得的 `task_id`，透過 HTTP GET 請求（例如 `GET /task/${task_id}`）定期輪詢任務狀態。\n   - 持續監控：\n     - `Task_status = \"success\"`（流程完成）。\n     - `Task_status = \"error\"`（視情況解決或重試）。\n   - 狀態轉為成功後，相應更新工作流程。\n\n這個結構化的工作流程確保與使用者輸入的高效整合、任務的自動化監控，以及無縫取得結果。\n\n---\n\n* 認證\n- 使用 **Bearer Token** 將您的 API key 納入請求標頭：\n    ```\n    Authorization: Bearer YOUR_API_KEY\n    ```\n您可以在 https://yce.makeupar.com/api-console/en/api-keys/ 找到您的 API Key。\n\n---\n\n* API 使用指南\n\n本指南說明如何使用 AI 虛擬髮型 API 上傳圖片、準備參考圖片，以及建立虛擬試戴任務。\n\n***\n\n   * 步驟 1. 使用 File API 上傳檔案，或提供有效的圖片網址\n\n使用 **File API**（`/s2s/v2.0/file`）上傳目標使用者圖片。\n\n或者，若您已有公開的圖片網址，可跳過步驟 1 到 3。\n\n**圖片需求：**\n\n*   上傳高解析度的自拍照片。\n*   確保照片清楚呈現整個身體。\n*   避免有多人干擾的物件背景。\n\n**請求範例：**\n\n```bash\ncurl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.0/file \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"files\": [\n      {\n        \"content_type\": \"image/jpg\",\n        \"file_name\": \"selfie_01_3dbd1b6683.jpg\",\n        \"file_size\": 547541\n      }\n    ]\n  }'\n```\n\n***\n\n   * 步驟 2. 取得 File API 回應\n\n回應包含：\n\n*   用於建立 AI 任務的 `file_id`。\n*   用於上傳實際圖片檔案的 `requests.url`。\n\n**回應範例：**\n\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"files\": [\n      {\n        \"content_type\": \"image/jpg\",\n        \"file_name\": \"full_body_photo_01_3dbd1b6683.jpg\",\n        \"file_id\": \"SaGaqpDgKwFrVBgMpQMA3HY0LeqdT9/13W5TOD8/u/FfjK3xgCQ+hRt9MJXBFaud\",\n        \"requests\": [\n          {\n            \"method\": \"PUT\",\n            \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...\",\n            \"headers\": {\n              \"Content-Length\": \"547541\",\n              \"Content-Type\": \"image/jpg\"\n            }\n          }\n        ]\n      }\n    ]\n  }\n}\n```\n\n***\n\n   * 步驟 3. 上傳圖片到提供的網址\n\n使用 File API 回應中的 `requests.url` 上傳圖片：\n\n```bash\ncurl --location --request PUT 'https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...' \\\n  --header 'Content-Type: image/jpg' \\\n  --header 'Content-Length: 547541' \\\n  --data-binary @'./full_body_photo_01_3dbd1b6683.jpg'\n```\n\n***\n\n   * 步驟 4. 準備參考圖片\n\n     * 4.1 取得預先定義的圖片範本\n\n使用 **範本 API**（`/s2s/v2.1/task/template/hair-transfer`）取得預先定義的參考範本清單：\n\n```bash\ncurl --request GET \\\n  --url 'https://yce-api-01.makeupar.com/s2s/v2.1/task/template/hair-transfer?page_size=20&starting_token=73a3c9e69b89' \\\n  --header 'Authorization: Bearer YOUR_API_KEY'\n```\n\n     * 4.2 上傳參考圖片\n\n您可以：\n\n*   使用 File API（`/s2s/v2.0/file`）上傳參考圖片，或\n*   提供有效的圖片網址。\n\n**支援的圖片：**\n\n*   另一張自拍照片作為參考圖片。\n\n詳細規格請參考 **[檔案規格與錯誤](#section/overview/File-Specs-and-Errors)**。\n\n***\n\n   * 步驟 5. 建立 AI 虛擬髮型任務\n\n使用 **AI 任務 API**（`/s2s/v2.1/task/hair-transfer`）建立虛擬試戴任務。\n\n**參數：**\n\n*   使用者圖片：`src_file_id` 或 `src_file_url`。\n*   參考圖片：`ref_file_id`、`ref_file_url` 或 `template_id`。\n\n**請求範例：**\n\n```bash\ncurl --request POST \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.1/task/hair-transfer \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json' \\\n  --data '{\n    \"src_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/selfie_03_cccd5d4803.jpeg\",\n    \"ref_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/style_reference_full_body_01_5a000d999f.png\"\n  }'\n```\n\n**回應範例：**\n\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"task_id\": \"SaGaqpDgKwFrVBgMpQMA3HY0LeqdT9_13W5TOD8_u_GPi6NqQ3dhlmN-6ntFwhzT\"\n  }\n}\n```\n\n***\n\n   * 步驟 6. 輪詢任務結果\n\n使用任務 ID 查詢狀態：\n\n```bash\ncurl --request GET \\\n  --url https://yce-api-01.makeupar.com/s2s/v2.1/task/hair-transfer/<YOUR_TASK_ID> \\\n  --header 'Authorization: Bearer YOUR_API_KEY' \\\n  --header 'content-type: application/json'\n```\n\n***\n\n   * 步驟 7. 取得結果\n\n成功的回應會包含結果圖片的下載網址：\n\n```json\n{\n  \"status\": 200,\n  \"data\": {\n    \"error\": null,\n    \"results\": {\n      \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/demo/ttl30/...signature...\"\n    },\n    \"task_status\": \"success\"\n  }\n}\n```\n\nAPI Key 無效的錯誤回應：\n\n```json\n{\n  \"status\": 401,\n  \"error\": \"Unauthorized\",\n  \"error_code\": \"InvalidAccessToken\"\n}\n```\n\n---\n\n應用案例：\n應用案例：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/hair_style_v1_video_08513beb46.jpg)\n\n拍攝建議：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/AI_Hair_Extension_recommendation_ba24bd5d92.png)\n\n## 檔案規格與錯誤\n* 支援的格式與尺寸\n\n|AI 功能|支援的尺寸|支援的檔案大小|支援的格式|\n|  ----  | ----  | ----  | ----  |\n|AI 虛擬髮型|長邊 <= 1024，臉寬 >= 128，臉部姿勢：-10 < pitch < +10，-45 < yaw < +45，-15 < roll < +15，僅限單張臉部，需呈現完整臉部|< 10MB|jpg/jpeg|\n\n* 錯誤代碼\n\n|錯誤代碼|說明|\n|  ----  | ----  |\n|error_no_shoulder\t|來源圖片中肩膀不可見\n|error_large_face_angle\t|上傳圖片的臉部角度過大\n|error_insufficient_landmarks\t|無法在來源圖片偵測足夠的臉部或身體標記點\n|error_hair_too_short\t|輸入的頭髮過短\n|error_face_pose\t|來源圖片的臉部姿勢不受支援\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## 常見問題\n**問：我可以試戴自訂的髮型嗎？**\n\n**答：** 完全可以，您可以使用自己的參考照片試戴自訂髮型。AI 虛擬髮型支援兩種指定理想髮型的方法：\n\n1. **上傳您自己的參考圖片**\n   您可以透過 File API（`/s2s/v2.0/file`）上傳高解析度的自拍或風格照片（例如展示目標髮型的人）。上傳後，在建立 AI 任務時，使用回傳的 `file_id` 或公開網址作為參考來源。\n\n2. **提供有效的圖片網址**\n   若您的參考圖片已託管在線上（例如在您自己的伺服器或 CDN 上），您可以直接在請求內容的 `ref_file_url` 欄位提供其 HTTPS 網址。\n\n透過 `/s2s/v2.1/task/hair-transfer` 提交任務時，請包含以下其中之一：\n- `src_file_id`（您的自拍）與 `ref_file_id`（您的自訂參考圖片），\n或\n- `src_file_url` 與 `ref_file_url`。\n\n請確保兩張圖片都符合指定的需求：\n- 支援的格式：僅限 JPG/JPEG\n- 檔案大小低於 10 MB\n- 長邊 ≤ 1024 像素\n- 臉寬 ≥ 128 像素\n- 頭部姿勢在允許範圍內（pitch：−10° 到 +10°，yaw：−45° 到 +45°，roll：−15° 到 +15°）\n- 可見單張臉部，完整正面視角且頭髮清晰可見\n\n這種彈性讓您可以從照片參考套用幾乎任何髮型，而不僅限於預先定義的範本。\n\n---\n\n## 點數消耗\n\n| AI 功能 | 消耗的點數 |\n|---|---|\n| AI 虛擬髮型 V2.0 | 預設模式 1 點 <br> 自訂模式 2 點 |\n| AI 虛擬髮型 V2.1 | 預設模式 2 點 <br> 自訂模式 2 點 |\n\n---\n"}},"baseSlug":"/zh-tw/reference/ai_hairstyle","routesMapping":{}}