{"items":[{"type":"link","label":"AI 照片去背","link":"/zh-tw/reference/ai_background_removal","routeSlug":"/zh-tw/reference/ai_background_removal","content":{"contentType":"overview","meta":{"name":"AI 照片去背"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"ai_background_removal.json","url":"/_bundle/@l10n/zh-TW/reference/ai_background_removal.json?download"},{"kind":"download","label":"ai_background_removal.yaml","url":"/_bundle/@l10n/zh-TW/reference/ai_background_removal.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":"以無可挑剔的精準度移除照片背景，確保影像的高品質。"},"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"}],"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"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"易於串接其他 AI 任務：輸出的檔案 ID 可即刻串接到其他 AI 任務。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"alt":"","src":"https://plugins-media.makeupar.com/smb/blog/post/2023-11-03/54285311-7c65-4658-9e27-11bf5c8dfe56.jpg"},"children":[],"type":"image"}],"type":"paragraph"}]}],"sectionId":"/section/概述"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/整合指南"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"整合指南"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"如何執行 AI 照片去背"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$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":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"調整您的照片以符合支援的尺寸。細節請參考**"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"#section/overview/File-Specs-and-Errors"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案規格與錯誤"},"children":[],"type":"text"}],"type":"link"},{"$$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":"使用 File API 上傳檔案"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"/s2s/v2.0/file"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" API 上傳目標使用者圖片。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$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":"細節請參考**"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"href":"#section/overview/File-Specs-and-Errors"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案規格與錯誤"},"children":[],"type":"text"}],"type":"link"},{"$$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":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"重要"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"：僅呼叫 File API 並不會上傳您的檔案。您必須"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"手動上傳"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"檔案到"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"File API 回應中提供的網址"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。該網址就是您的上傳目的地，請確保檔案成功傳輸到該處後再繼續。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"在呼叫 AI API 之前，請確保您的檔案已成功上傳。使用 File API 取得上傳網址，然後將檔案上傳到該位置。上傳完成後，您會在回應中取得 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"，這個 ID 就是您用於存取該檔案相關 AI 功能的依據。"},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"警告："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 請注意，若您未將檔案上傳到 File API 回應中提供的網址，使用 AI API 時會得到 500 Server Error / unknown_internal_error 或 404 Not Found 錯誤。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"blockquote"}],"type":"item"}],"type":"list"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"執行 AI 任務"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳完成後，使用檔案 ID 呼叫 POST 'task/sod' 執行 AI 任務，並取得用於監控的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$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":"設定 webhook 或輪詢，以查詢任務狀態直到成功或錯誤"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"marker":"*"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"task_id"},"children":[],"type":"text"}],"type":"strong"}],"type":"em"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 用於設定 webhook 或實作輪詢，在整個保留期間監控任務狀態。在 AI 引擎完成任務之前，狀態會維持為 running。任務處於執行狀態時不會消耗點數。處理完成後，任務狀態會變為 success 或 error。"},"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":"成功後取得 AI 任務的結果"},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"引擎成功處理您的輸入檔案並生成結果影像後，任務會變為 'success' 狀態。您會取得處理後影像的網址，以及一個 dst_id，讓您在無需重新上傳結果圖片的情況下串接另一個 AI 任務。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"點數僅在這種情況下會被消耗。若引擎處理任務失敗，任務狀態會變為 'error'，且不會消耗點數。"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$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":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"示範情境："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{},"children":[],"type":"softbreak"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"常見實作案例："},"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/Transparen_Background_aca3cdbd83.jpg"},"children":[],"type":"image"}],"type":"item"}],"type":"list"}]}],"sectionId":"/section/概述/整合指南"}],"sectionId":"/section/概述/整合指南"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","attributes":{"level":2,"id":"section/概述/輸入與輸出"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輸入與輸出"},"children":[],"type":"text"}],"type":"heading"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"輸入"},"children":[],"type":"text"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"Image"},"children":[],"type":"code"}],"type":"item"}],"type":"list"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"類型："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"image"},"children":[],"type":"code"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"說明："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 具有清晰前景的影像。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$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/yce_removal_bg_s4_poster_1_289b8eaf81.png"},"children":[],"type":"image"}],"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"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"前景圖片"},"children":[],"type":"code"}],"type":"item"}],"type":"list"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"類型："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"image"},"children":[],"type":"code"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"說明："},"children":[],"type":"text"}],"type":"strong"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 已移除背景的影像。"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$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/yce_removal_bg_s4_poster_2_a6bc3c5f6a.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":"輸入與輸出圖片的建議與限制如下："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"name":"br","attrs":{}},"children":[],"type":"tag","tag":"html"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"解析度：4096 × 4096 像素（最長邊不得超過 4096 像素）"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"<10MB"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"JPG 與 PNG"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼"},"children":[],"type":"text"}],"type":"item"}],"type":"list"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤代碼"},"children":[],"type":"text"}],"type":"th"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"說明"},"children":[],"type":"text"}],"type":"th"}],"type":"tr"}],"type":"thead"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exceed_max_filesize"},"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":"invalid_parameter"},"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_download_image"},"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_download_mask"},"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_decode_image"},"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_decode_mask"},"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_download_video"},"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_decode_video"},"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_nsfw_content_detected"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"在來源圖片中偵測到 NSFW 內容"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_no_face"},"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_pose"},"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_parsing"},"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_inference"},"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":"exceed_nsfw_retry_limits"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"超過重試上限，以避免生成 NSFW 圖片"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_upload"},"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_multiple_people"},"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_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_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_unexpected_video_duration"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"影片長度等於 dstDuration"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_bald_image"},"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_unsupport_ratio"},"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":"unknown_internal_error"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"其他"},"children":[],"type":"text"}],"type":"td"}],"type":"tr"}],"type":"tbody"}],"type":"table"},{"$$mdtype":"Node","attributes":{},"children":[],"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 照片去背 V1.0"},"children":[],"type":"text"}],"type":"td"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"1"},"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_background_removal/section/概述","routeSlug":"/zh-tw/reference/ai_background_removal/section/概述","items":[{"type":"link","label":"整合指南","link":"/zh-tw/reference/ai_background_removal/section/概述/整合指南","routeSlug":"/zh-tw/reference/ai_background_removal/section/概述/整合指南","content":null},{"type":"link","label":"輸入與輸出","link":"/zh-tw/reference/ai_background_removal/section/概述/輸入與輸出","routeSlug":"/zh-tw/reference/ai_background_removal/section/概述/輸入與輸出","content":null},{"type":"link","label":"檔案規格與錯誤","link":"/zh-tw/reference/ai_background_removal/section/概述/檔案規格與錯誤","routeSlug":"/zh-tw/reference/ai_background_removal/section/概述/檔案規格與錯誤","content":null},{"type":"link","label":"點數消耗","link":"/zh-tw/reference/ai_background_removal/section/概述/點數消耗","routeSlug":"/zh-tw/reference/ai_background_removal/section/概述/點數消耗","content":null}],"content":null},{"type":"group","label":"V1.0","link":"/zh-tw/reference/ai_background_removal/v1.0","routeSlug":"/zh-tw/reference/ai_background_removal/v1.0","items":[{"label":"執行 AI 照片去背任務。","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_background_removal/v1.0/paths/~1s2s~1v2.0~1task~1sod/post","routeSlug":"/zh-tw/reference/ai_background_removal/v1.0/paths/~1s2s~1v2.0~1task~1sod/post","metadata":{"seo":{"title":"執行 AI 照片去背任務。","description":"這個端點啟動背景移除流程。您必須提供從檔案上傳 API 取得的檔案 ID。任務會以非同步方式處理，您可以使用這個回應回傳的 task_id 查詢其狀態。"}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"執行 AI 照片去背任務。","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1sod/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":"這個端點啟動背景移除流程。您必須提供從檔案上傳 API 取得的檔案 ID。任務會以非同步方式處理，您可以使用這個回應回傳的 task_id 查詢其狀態。"},"children":[],"type":"text"}],"type":"paragraph"}]},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用標準的 'Bearer authentication'。請在標頭中放入您的 'API Key'："},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"},"children":[],"type":"text"}],"type":"paragraph"}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/BasicRunTaskV2"}},"schemaId":"components/schemas/BasicRunTaskV2","pointer":"/paths/~1s2s~1v2.0~1task~1sod/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/task/sod","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"requestBody":{"application/json":{"schemaId":"components/schemas/BasicRunTaskV2"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.0/task/sod","href":"v1.0/paths/~1s2s~1v2.0~1task~1sod/post","summary":"執行 AI 照片去背任務。"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"components/schemas/BasicRunTaskV2","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/BasicRunTaskV2"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務執行成功"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}},"schemaId":"components/schemas/BasicRunTaskResponseV2"},{"code":"400","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務執行失敗"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_0"}},"schemaId":"schema_0"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API Key 無效、已停用或已到期"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1"},{"code":"429","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"在指定時間內請求過多"},"children":[],"type":"text"}],"type":"paragraph"}]}],"pointer":"/paths/~1s2s~1v2.0~1task~1sod/post/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/BasicRunTaskResponseV2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}}},{"code":"400","schemaId":"schema_0","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_0"}}},{"code":"401","schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}}},{"code":"429"}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1sod/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/sod"},{"label":"查詢 AI 照片去背任務的狀態。","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/zh-tw/reference/ai_background_removal/v1.0/paths/~1s2s~1v2.0~1task~1sod~1{task_id}/get","routeSlug":"/zh-tw/reference/ai_background_removal/v1.0/paths/~1s2s~1v2.0~1task~1sod~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~1sod~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_2","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~1sod~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/sod/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_2"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.0/task/sod/{task_id}","href":"v1.0/paths/~1s2s~1v2.0~1task~1sod~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":"成功查詢任務狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TaskStatusResponseV2"}},"schemaId":"components/schemas/TaskStatusResponseV2"},{"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_3"}},"schemaId":"schema_3"},{"code":"401","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"API Key 無效、已停用或已到期"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}},"schemaId":"schema_1"},{"code":"500","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"任務在預期時間內沒有回應"},"children":[],"type":"text"}],"type":"paragraph"}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_4"}},"schemaId":"schema_4"}],"pointer":"/paths/~1s2s~1v2.0~1task~1sod~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","responseCodes":[{"code":"200","schemaId":"components/schemas/TaskStatusResponseV2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/TaskStatusResponseV2"}}},{"code":"400","schemaId":"schema_3","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_3"}}},{"code":"401","schemaId":"schema_1","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_1"}}},{"code":"500","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~1sod~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/sod/{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/sod","summary":"執行 AI 照片去背任務。","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1sod/post","deprecated":false},{"title":"/s2s/v2.0/task/sod/{task_id}","summary":"查詢 AI 照片去背任務的狀態。","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1sod~1{task_id}/get","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/EngineErrorCode":{"id":"components/schemas/EngineErrorCode","kind":"json-schema","title":"EngineErrorCode","data":{"type":"string","nullable":true,"enum":["exceed_max_filesize","invalid_parameter","error_download_image","error_download_mask","error_decode_image","error_decode_mask","error_nsfw_content_detected","error_no_face","error_pose","error_face_parsing","error_inference","exceed_nsfw_retry_limits","error_upload","unknown_internal_error"],"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"錯誤："},"children":[],"type":"text"}],"type":"paragraph"},{"$$mdtype":"Node","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exceed_max_filesize"},"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":{"content":"invalid_parameter"},"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":{"content":"error_download_image"},"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":{"content":"error_download_mask"},"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":{"content":"error_decode_image"},"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":{"content":"error_decode_mask"},"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":{"content":"error_nsfw_content_detected"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 在來源圖片中偵測到 NSFW 內容"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_no_face"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 來源圖片未偵測到臉部"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_pose"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 在來源圖片偵測姿勢失敗"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_face_parsing"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 在來源圖片進行人臉分割失敗"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_inference"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 推論流程錯誤"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"exceed_nsfw_retry_limits"},"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":"生成 NSFW 圖片"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"error_upload"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 上傳結果圖片錯誤"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"},{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"unknown_internal_error"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" - 其他"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"item"}],"type":"list"}]}},"components/schemas/FileV1.1":{"id":"components/schemas/FileV1.1","kind":"json-schema","title":"File V1.1","data":{"title":"File V1.1","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個物件代表一個檔案。"},"children":[],"type":"text"}],"type":"paragraph"}],"type":"object","required":["files"],"properties":{"files":{"type":"array","items":{"type":"object","required":["content_type","file_name","file_size"],"properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容 MIME 類型。目前可用的值列於 enum 中。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_size":{"type":"integer","example":50000,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容長度，以位元組計。不應超過 10MB。"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}},"components/schemas/BasicFileResponse":{"id":"components/schemas/BasicFileResponse","kind":"json-schema","title":"BasicFileResponse","data":{"type":"object","properties":{"files":{"type":"array","items":{"type":"object","properties":{"content_type":{"type":"string","example":"image/jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的內容 MIME 類型。"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_name":{"type":"string","example":"my-selfie.jpg","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的名稱"},"children":[],"type":"text"}],"type":"paragraph"}]},"file_id":{"type":"string","example":"U8aqJbsXGT537jtGnEDFHqxdDXqh8+oTF/cSkLimzuvVwMP+Jb1XbjPsf7ZgUgLY","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"這個檔案的 ID。其他執行任務的 API 會需要這個 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"。"},"children":[],"type":"text"}],"type":"paragraph"}]},"requests":{"type":"array","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"使用下方的 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"url"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"headers"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"、"},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"method"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 上傳檔案。完成後，使用 "},"children":[],"type":"text"},{"$$mdtype":"Node","inline":true,"attributes":{"content":"file_id"},"children":[],"type":"code"},{"$$mdtype":"Node","inline":true,"attributes":{"content":" 繼續呼叫執行任務的 API。"},"children":[],"type":"text"}],"type":"paragraph"}],"items":{"type":"object","properties":{"headers":{"type":"object","example":{"Content-Type":"image/jpg","Content-Length":50000},"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳檔案時要納入的標頭"},"children":[],"type":"text"}],"type":"paragraph"}]},"url":{"type":"string","example":"https://example.com/presigned-upload-url","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案的網址"},"children":[],"type":"text"}],"type":"paragraph"}]},"method":{"type":"string","example":"PUT","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"上傳這個檔案所用的 HTTP 方法"},"children":[],"type":"text"}],"type":"paragraph"}]}}}}}}}}}},"components/schemas/FileResponseV2":{"id":"components/schemas/FileResponseV2","kind":"json-schema","title":"FileResponseV2","data":{"type":"object","properties":{"status":{"type":"integer","example":200,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"data":{"$ref":"#/components/schemas/BasicFileResponse"}}}},"components/schemas/BasicRunTaskV2SrcFileUrl":{"id":"components/schemas/BasicRunTaskV2SrcFileUrl","kind":"json-schema","title":"以來源檔案網址執行任務","data":{"title":"以來源檔案網址執行任務","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":"以來源檔案 ID 執行任務","data":{"title":"以來源檔案 ID 執行任務","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":[{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"}]}},"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/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":{"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":{"$ref":"#/components/schemas/TaskStatusResponseBodySingleUrlResultsV2"}}}}}},"schema_0":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/responses/RunError"}]},"id":"schema_0"},"schema_1":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":401,"description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}]},"error_code":{"type":"string","enum":["InvalidApiKey","InactiveApiKey","ExpiredApiKey"]}}},"id":"schema_1"},"schema_2":{"kind":"json-schema","data":{"type":"string","example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"},"id":"schema_2"},"schema_3":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"example":400},"error_code":{"type":"string","enum":["InvalidTaskId"]}}},"id":"schema_3"},"schema_4":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","description":[{"$$mdtype":"Node","attributes":{},"children":[{"$$mdtype":"Node","inline":true,"attributes":{"content":"回應狀態"},"children":[],"type":"text"}],"type":"paragraph"}],"example":500},"error_code":{"type":"string","enum":["TaskTimeout"]}}},"id":"schema_4"}},"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_background_removal.json?download"},{"url":"/_bundle/@l10n/zh-TW/reference/ai_background_removal.yaml?download"}],"excludeFromSearch":false,"replayFeatures":{"graphql":false,"asyncapi":false},"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"AI 照片去背","description":"# 概述\n以無可挑剔的精準度移除照片背景，確保影像的高品質。\n* 自動背景偵測：：使用 AI 辨識並將主體與背景分離。\n* 高精度編輯：：在主體周圍提供乾淨且精準的邊緣。\n* 支援多種類別：人物、產品、動物、汽車、圖形等。\n* 易於串接其他 AI 任務：輸出的檔案 ID 可即刻串接到其他 AI 任務。\n\n![](https://plugins-media.makeupar.com/smb/blog/post/2023-11-03/54285311-7c65-4658-9e27-11bf5c8dfe56.jpg)\n\n## 整合指南\n* 如何執行 AI 照片去背\n1. **調整來源圖片尺寸**</br>\n  調整您的照片以符合支援的尺寸。細節請參考**[檔案規格與錯誤](#section/overview/File-Specs-and-Errors)**\n\n2. **使用 File API 上傳檔案**</br>\n  使用 ***/s2s/v2.0/file*** API 上傳目標使用者圖片。\n    - 圖片需求\n      - 細節請參考**[檔案規格與錯誤](#section/overview/File-Specs-and-Errors)**。\n    - ***重要***：僅呼叫 File API 並不會上傳您的檔案。您必須**手動上傳**檔案到**File API 回應中提供的網址**。該網址就是您的上傳目的地，請確保檔案成功傳輸到該處後再繼續。<br>\n    在呼叫 AI API 之前，請確保您的檔案已成功上傳。使用 File API 取得上傳網址，然後將檔案上傳到該位置。上傳完成後，您會在回應中取得 ***file_id***，這個 ID 就是您用於存取該檔案相關 AI 功能的依據。\n    \n      > **警告：** 請注意，若您未將檔案上傳到 File API 回應中提供的網址，使用 AI API 時會得到 500 Server Error / unknown_internal_error 或 404 Not Found 錯誤。\n\n3. **執行 AI 任務**</br>\n  上傳完成後，使用檔案 ID 呼叫 POST 'task/sod' 執行 AI 任務，並取得用於監控的 ***task_id***。\n\n4. **設定 webhook 或輪詢，以查詢任務狀態直到成功或錯誤**</BR>\n***task_id*** 用於設定 webhook 或實作輪詢，在整個保留期間監控任務狀態。在 AI 引擎完成任務之前，狀態會維持為 running。任務處於執行狀態時不會消耗點數。處理完成後，任務狀態會變為 success 或 error。\n\n1. **成功後取得 AI 任務的結果**</BR>\n引擎成功處理您的輸入檔案並生成結果影像後，任務會變為 'success' 狀態。您會取得處理後影像的網址，以及一個 dst_id，讓您在無需重新上傳結果圖片的情況下串接另一個 AI 任務。\n點數僅在這種情況下會被消耗。若引擎處理任務失敗，任務狀態會變為 'error'，且不會消耗點數。</BR>\n扣除點數時，系統會優先使用接近到期的點數。若到期日相同，則扣除最早取得的點數。\n\n* 示範情境：\n常見實作案例：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/Transparen_Background_aca3cdbd83.jpg)\n\n## 輸入與輸出\n* 輸入\n   * `Image`\n- **類型：** `image`\n- **說明：** 具有清晰前景的影像。\n\n實際應用（輸入）： \n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_removal_bg_s4_poster_1_289b8eaf81.png)\n\n---\n\n* 輸出\n   * `前景圖片`\n- **類型：** `image`\n- **說明：** 已移除背景的影像。\n\n實際應用（輸出）：\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_removal_bg_s4_poster_2_a6bc3c5f6a.png)\n\n## 檔案規格與錯誤\n* 支援的格式與尺寸\n\n|AI 功能|支援的尺寸|檔案大小|接受的格式|\n|  ----  | ----  | ----  | ----  |\n|AI 照片去背|輸入與輸出圖片的建議與限制如下：</br>解析度：4096 × 4096 像素（最長邊不得超過 4096 像素）|<10MB|JPG 與 PNG|\n\n* 錯誤代碼\n\n|錯誤代碼|說明|\n|  ----  | ----  |\n|exceed_max_filesize|輸入檔案大小超過上限|\n|invalid_parameter|參數值無效|\n|error_download_image|下載來源圖片錯誤|\n|error_download_mask|下載遮罩圖片錯誤|\n|error_decode_image|解碼來源圖片錯誤|\n|error_decode_mask|解碼遮罩圖片錯誤|\n|error_download_video|下載來源影片錯誤|\n|error_decode_video|解碼來源影片錯誤|\n|error_nsfw_content_detected|在來源圖片中偵測到 NSFW 內容|\n|error_no_face|來源圖片未偵測到臉部|\n|error_pose|在來源圖片偵測姿勢失敗|\n|error_face_parsing|在來源圖片進行人臉分割失敗|\n|error_inference|推論流程錯誤|\n|exceed_nsfw_retry_limits|超過重試上限，以避免生成 NSFW 圖片|\n|error_upload|上傳結果圖片錯誤|\n|error_multiple_people|在來源圖片中偵測到多人|\n|error_no_shoulder|來源圖片中肩膀不可見|\n|error_large_face_angle|上傳圖片的臉部角度過大|\n|error_hair_too_short|輸入的頭髮過短|\n|error_unexpected_video_duration|影片長度等於 dstDuration|\n|error_bald_image|輸入的髮型為禿頭|\n|error_unsupport_ratio|輸入圖片的長寬比不受支援|\n|unknown_internal_error|其他|\n\n---\n\n## 點數消耗\n\n| AI 功能 | 消耗的點數 |\n|---|---|\n| AI 照片去背 V1.0 | 1 |\n\n---\n"}},"baseSlug":"/zh-tw/reference/ai_background_removal","routesMapping":{}}