{"items":[{"type":"link","label":"AI Replace","link":"/reference/ai_replace","routeSlug":"/reference/ai_replace","content":{"contentType":"overview","meta":{"name":"AI Replace"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"ai_replace.json","url":"/_bundle/reference/ai_replace.json?download"},{"kind":"download","label":"ai_replace.yaml","url":"/_bundle/reference/ai_replace.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 Replace","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[]}],"sectionId":"/reference/ai_replace"}],"sectionId":"/reference/ai_replace"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":1,"id":"section/overview"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Overview"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Replace unwanted elements with new objects using AI Replace. By using this API, you can instantly remove unwanted object from your photo and replace it with a new one just by using text. Eliminate anything from bags to cars and beyond.​"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Sample:"},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"image","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_02_a73a26bcc3.jpg"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For content creators aiming to perfect their social media presence, AI Replace offers a hassle-free way to polish travel photos or promotional images. Remove and replace elements with ease, ensuring your content stands out."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"image","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_03_42c9cd98d0.jpg"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Create stunning room mockups with AI Replace by filling empty spaces with aesthetically pleasing furniture and objects, transforming the perception of any space."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"image","inline":true,"attributes":{"alt":"","src":"https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_04_4d2d82f76e.jpg"},"children":[]}]}]},{"$$mdtype":"Node","type":"hr","attributes":{},"children":[]}]}],"sectionId":"/reference/ai_replace/section/overview"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/overview/file-specs-and-errors"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"File Specs & Errors"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supported Formats & Dimensions"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AI Feature"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supported Dimensions"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supported File Size"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Supported Formats"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AI Replace"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"long side <= 2048"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"< 10MB"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"jpg/jpeg/png"},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Error Codes"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Error Code"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Description"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"exceed_max_filesize"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Input file size exceeds the maximum limit"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"invalid_parameter"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Invalid parameter value"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"error_download_image"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Download source image error"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"error_decode_image"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Decode source image error"},"children":[]}]}]}]},{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"error_nsfw_content_detected"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"NSFW content detected in source image"},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"hr","attributes":{},"children":[]}]}],"sectionId":"/reference/ai_replace/section/overview/file-specs-and-errors"}],"sectionId":"/reference/ai_replace/section/overview/file-specs-and-errors"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/overview/unit-consumption"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unit Consumption"},"children":[]}]}]},{"$$mdtype":"Node","type":"table","attributes":{},"children":[{"$$mdtype":"Node","type":"thead","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AI Feature"},"children":[]}]}]},{"$$mdtype":"Node","type":"th","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Unit Consumed"},"children":[]}]}]}]}]},{"$$mdtype":"Node","type":"tbody","attributes":{},"children":[{"$$mdtype":"Node","type":"tr","attributes":{},"children":[{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"AI Replace V1.0"},"children":[]}]}]},{"$$mdtype":"Node","type":"td","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"1"},"children":[]}]}]}]}]}]},{"$$mdtype":"Node","type":"hr","attributes":{},"children":[]}]}],"sectionId":"/reference/ai_replace/section/overview/unit-consumption"}],"sectionId":"/reference/ai_replace/section/overview/unit-consumption"}]}]}},{"type":"group","label":"Overview","link":"/reference/ai_replace/section/overview","routeSlug":"/reference/ai_replace/section/overview","items":[{"type":"link","label":"File Specs & Errors","link":"/reference/ai_replace/section/overview/file-specs-and-errors","routeSlug":"/reference/ai_replace/section/overview/file-specs-and-errors","content":null},{"type":"link","label":"Unit Consumption","link":"/reference/ai_replace/section/overview/unit-consumption","routeSlug":"/reference/ai_replace/section/overview/unit-consumption","content":null}],"content":null},{"type":"group","label":"V1.0","link":"/reference/ai_replace/v1.0","routeSlug":"/reference/ai_replace/v1.0","items":[{"label":"Run an AI Replace task.","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post","routeSlug":"/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post","metadata":{"seo":{"title":"Run an AI Replace task.","description":"Please refer to the polling guide for checking task status. This API requires a source image, mask file, and prompt describing what should replace the masked area."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"Run an AI Replace task.","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1obj-replace/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Run an AI Replace task.","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Please refer to the polling guide for checking task status. This API requires a source image, mask file, and prompt describing what should replace the masked area."},{"nodeType":"security","requirements":[{"schemes":[{"name":"BearerAuthenticationV2","scopes":[],"type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the standard 'Bearer authentication'. Put your 'API Key' in header: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Notice that there is ' ' a space between 'Bearer' and the 'YOUR_API_KEY'."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_857"}},"schemaId":"schema_857","pointer":"/paths/~1s2s~1v2.0~1task~1obj-replace/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/s2s/v2.0/task/obj-replace","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_857"}},"responseCodes":["200","400","401","429"],"pointer":"/s2s/v2.0/task/obj-replace","href":"v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post","summary":"Run an AI Replace task."},"isWebhook":false,"hideReplay":false,"servers":[{"url":"https://yce-api-01.makeupar.com"}],"schemaId":"schema_857","mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"schema_857"}},"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Successful execution of the task","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}},"schemaId":"components/schemas/BasicRunTaskResponseV2"},{"code":"400","description":"Failed execution of task","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_858"}},"schemaId":"schema_858"},{"code":"401","description":"Invalid or missing API key","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_859"}},"schemaId":"schema_859"},{"code":"429","description":"Too many requests","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_860"}},"schemaId":"schema_860"}],"pointer":"/paths/~1s2s~1v2.0~1task~1obj-replace/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/BasicRunTaskResponseV2","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/BasicRunTaskResponseV2"}}},{"code":"400","schemaId":"schema_858","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_858"}}},{"code":"401","schemaId":"schema_859","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_859"}}},{"code":"429","schemaId":"schema_860","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_860"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/obj-replace"},{"label":"Check an AI Replace task status.","deprecated":false,"httpVerb":"get","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get","routeSlug":"/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get","metadata":{"seo":{"title":"Check an AI Replace task status.","description":"Check an AI Replace task status."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"name":"Check an AI Replace task status.","isWebhook":false,"pointer":"/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get","hasSamples":false},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Check an AI Replace task status.","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","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the standard 'Bearer authentication'. Put your 'API Key' in header: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Notice that there is ' ' a space between 'Bearer' and the 'YOUR_API_KEY'."},"children":[]}]}]}]}]}]},{"nodeType":"item-content","variant":"path","label":"Path","labelTranslationKey":"path","parameters":[{"name":"task_id","in":"path","schemaId":"schema_861","description":"ID of task to check","required":true}],"pointer":"/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get/parameters"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"GET","path":"/s2s/v2.0/task/obj-replace/{task_id}","servers":[{"url":"https://yce-api-01.makeupar.com"}],"parameters":{"path":[{"name":"task_id","in":"path","required":true,"example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe","schemaId":"schema_861"}],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[{"schemes":[{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer"}],"scopes":[]}],"responseCodes":["200","400","401","500"],"pointer":"/s2s/v2.0/task/obj-replace/{task_id}","href":"v1.0/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get","summary":"Check an AI Replace task status."},"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":"Successful check of the task status","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_862"}},"schemaId":"schema_862"},{"code":"400","description":"Invalid task ID","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_863"}},"schemaId":"schema_863"},{"code":"401","description":"Invalid or missing API key","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_859"}},"schemaId":"schema_859"},{"code":"500","description":"Task execution timeout","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_864"}},"schemaId":"schema_864"}],"pointer":"/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"schema_862","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_862"}}},{"code":"400","schemaId":"schema_863","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_863"}}},{"code":"401","schemaId":"schema_859","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_859"}}},{"code":"500","schemaId":"schema_864","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"schema_864"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get"}],"panels":[]}]},"httpPath":"/s2s/v2.0/task/obj-replace/{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":"AI Replace API allows you to replace specific objects in images using generative fill technology. Requires source image, mask for the area to replace, and a text prompt describing what should be generated."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/s2s/v2.0/task/obj-replace","summary":"Run an AI Replace task.","prefix":{"name":"post","color":"post"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post","deprecated":false},{"title":"/s2s/v2.0/task/obj-replace/{task_id}","summary":"Check an AI Replace task status.","prefix":{"name":"get","color":"get"},"badges":[],"link":"/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace~1{task_id}/get","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"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":"Url of the file to run task. The url should be publicly accessible.","example":"https://example.com/selfie.jpg"}}}},"components/schemas/BasicRunTaskV2MskFileUrl":{"id":"components/schemas/BasicRunTaskV2MskFileUrl","kind":"json-schema","title":"BasicRunTaskV2MskFileUrl","data":{"type":"object","properties":{"msk_file_url":{"type":"string","example":"https://example.com/mask.jpg","description":"URL of the mask file. This should be a grey scale mask image with the exact same width and height with the input image where white pixels indicate foreground and black pixels represent background. The URL should be publicly accessible."}}}},"components/schemas/BasicRunTaskV2MskFileId":{"id":"components/schemas/BasicRunTaskV2MskFileId","kind":"json-schema","title":"BasicRunTaskV2MskFileId","data":{"type":"object","properties":{"msk_file_id":{"type":"string","example":"eA1CCL3kG4w2s0kpbo2pkah59VfxzIjxahJD2wWm7zw=","description":"ID of the mask file. This should be a grey scale mask image with the exact same width and height with the input image where white pixels indicate foreground and black pixels represent background. File ID from upload file API."}}}},"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":"ID of file to run task. File ID from upload file API.","example":"pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="}}}},"components/schemas/BasicRunTaskV2WithRequiredMsk":{"id":"components/schemas/BasicRunTaskV2WithRequiredMsk","kind":"json-schema","title":"BasicRunTaskV2WithRequiredMsk","data":{"title":"BasicRunTaskV2WithRequiredMsk","anyOf":[{"allOf":[{"title":"Run task with src file url & msk file url","required":["msk_file_url"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2MskFileUrl"}]},{"allOf":[{"title":"Run task with src file url & msk file ID","required":["msk_file_id"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileUrl"},{"$ref":"#/components/schemas/BasicRunTaskV2MskFileId"}]},{"allOf":[{"title":"Run task with src file ID & msk file url","required":["msk_file_url"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/BasicRunTaskV2MskFileUrl"}]},{"allOf":[{"title":"Run task with src file ID & msk file ID","required":["msk_file_id"]},{"$ref":"#/components/schemas/BasicRunTaskV2SrcFileId"},{"$ref":"#/components/schemas/BasicRunTaskV2MskFileId"}]}]}},"components/schemas/BasicRunTaskResponseV2":{"id":"components/schemas/BasicRunTaskResponseV2","kind":"json-schema","title":"BasicRunTaskResponseV2","data":{"type":"object","properties":{"status":{"type":"integer","description":"Response status","example":200},"data":{"type":"object","properties":{"task_id":{"type":"string","description":"ID of this task. Task result is valid to query by this ID for 24 hours.","example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"}}}}}},"components/schemas/RunError":{"id":"components/schemas/RunError","kind":"json-schema","title":"RunError","data":{"type":"object","properties":{"status":{"type":"integer","description":"Response status","example":400},"error":{"type":"string","description":"Error message","example":"The operation could not be completed"},"error_code":{"type":"string","enum":["InvalidParameters","CreditInsufficiency","InvalidStyleGroup","InvalidStyle","BadRequest"],"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Error code:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"*"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"InvalidParameters - Invalid request parameters"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"CreditInsufficiency - Insufficient unit to run"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"BadRequest - Unexpected request parameter"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"InvalidStyleGroup - Invalid style group id"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"InvalidStyle - Invalid style id"},"children":[]}]}]}]}]}}}},"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","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Errors:"},"children":[]}]}]},{"$$mdtype":"Node","type":"list","attributes":{"ordered":false,"marker":"-"},"children":[{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_exceed_max_image_size`  - Input image size exceeds the maximum limit"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`exceed_max_filesize` - Input file size exceeds the maximum limit"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`invalid_parameter` - Invalid parameter value"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_download_image` - Download source image error"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_download_mask` - Download mask image error"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_decode_image` - Decode source image error"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_decode_mask` - Decode mask image error"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_nsfw_content_detected` - NSFW content detected in source image"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_no_face` - No face detected on source image"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_pose` - Failed to detect pose on source image"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_face_parsing` - Failed to do face segmentation on source image"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_inference` - Inference pipeline error"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`exceed_nsfw_retry_limits` - Exceed the retry limits to avoid generated NSFW image"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`error_upload` - Upload result image error"},"children":[]}]}]},{"$$mdtype":"Node","type":"item","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"`unknown_internal_error` - Others"},"children":[]}]}]}]}]}},"components/schemas/TaskStatusResponseBodySingleUrlResultsV2":{"id":"components/schemas/TaskStatusResponseBodySingleUrlResultsV2","kind":"json-schema","title":"TaskStatusResponseBodySingleUrlResultsV2","data":{"type":"object","properties":{"url":{"type":"string","description":"URL to download this result. Valid for 2 hours","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":"URL to download this result. Valid for 2 hours","example":"https://example.com/sample-result-url"}}}},"schema_857":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/BasicRunTaskV2WithRequiredMsk"},{"type":"object","required":["prompt"],"properties":{"prompt":{"type":"string","description":"Prompt for generating objects in the masked area.","example":"a cute cat"}}}]},"id":"schema_857"},"schema_858":{"kind":"json-schema","data":{"allOf":[{"$ref":"#/components/schemas/RunError"}]},"id":"schema_858"},"schema_859":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":401,"description":"Response status"},"error":{"type":"string","example":"Invalid API key"}}},"id":"schema_859"},"schema_860":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":429,"description":"Response status"},"error":{"type":"string","example":"Too many requests"}}},"id":"schema_860"},"schema_861":{"kind":"json-schema","data":{"type":"string","example":"grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"},"id":"schema_861"},"schema_862":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","description":"Response status","example":200},"data":{"type":"object","properties":{"task_status":{"type":"string","enum":["running","success","error"],"description":"Status of this task"},"error":{"$ref":"#/components/schemas/EngineErrorCode"},"error_message":{"type":"string","description":"Detailed description of error"},"results":null}}},"$ref":"#/components/schemas/TaskStatusResponseBodySingleUrlResultsV2"},"id":"schema_862"},"schema_863":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":400,"description":"Response status"},"error":{"type":"string","example":"Invalid task ID"}}},"id":"schema_863"},"schema_864":{"kind":"json-schema","data":{"type":"object","properties":{"status":{"type":"integer","example":500,"description":"Response status"},"error":{"type":"string","example":"Task execution timed out"}}},"id":"schema_864"}},"exampleStore":{},"securitySchemeStore":{"BearerAuthenticationV2":{"id":"BearerAuthenticationV2","type":"http","scheme":"bearer","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Use the standard 'Bearer authentication'. Put your 'API Key' in header: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"Authorization:Bearer YOUR_API_KEY"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":". Notice that there is ' ' a space between 'Bearer' and the 'YOUR_API_KEY'."},"children":[]}]}]}]}},"servers":[{"url":"https://yce-api-01.makeupar.com"}]},"options":{"layout":"stacked","hideSidebar":true,"mockServer":{"off":true,"position":"off"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/reference/ai_replace.json?download"},{"url":"/_bundle/reference/ai_replace.yaml?download"}],"excludeFromSearch":false,"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"AI Replace","description":"# Overview\nReplace unwanted elements with new objects using AI Replace. By using this API, you can instantly remove unwanted object from your photo and replace it with a new one just by using text. Eliminate anything from bags to cars and beyond.​\n\nSample:\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_02_a73a26bcc3.jpg)\n\n\nFor content creators aiming to perfect their social media presence, AI Replace offers a hassle-free way to polish travel photos or promotional images. Remove and replace elements with ease, ensuring your content stands out.\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_03_42c9cd98d0.jpg)\n\n\nCreate stunning room mockups with AI Replace by filling empty spaces with aesthetically pleasing furniture and objects, transforming the perception of any space.\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_04_4d2d82f76e.jpg)\n\n---\n\n## File Specs & Errors\n* Supported Formats & Dimensions\n\n| AI Feature | Supported Dimensions | Supported File Size | Supported Formats |\n| ---- | ---- | ----  | ---- |\n| AI Replace | long side <= 2048 | < 10MB | jpg/jpeg/png |\n\n* Error Codes\n\n|Error Code|Description|\n|  ----  | ----  |\n| exceed_max_filesize |\tInput file size exceeds the maximum limit |\n| invalid_parameter |\tInvalid parameter value |\n| error_download_image\t| Download source image error |\n| error_decode_image\t| Decode source image error |\n| error_nsfw_content_detected\t| NSFW content detected in source image |\n\n---\n\n## Unit Consumption\n\n| AI Feature | Unit Consumed |\n|---|---|\n| AI Replace V1.0 | 1 |\n\n---\n"}},"baseSlug":"/reference/ai_replace","routesMapping":{}}