# AI Replace

# Overview
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.​
Sample:
![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_02_a73a26bcc3.jpg)
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.
![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_03_42c9cd98d0.jpg)
Create stunning room mockups with AI Replace by filling empty spaces with aesthetically pleasing furniture and objects, transforming the perception of any space.
![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/yce_web_AI_replace_S3_feature_img_04_4d2d82f76e.jpg)


---

## File Specs & Errors
* Supported Formats & Dimensions

| AI Feature | Supported Dimensions | Supported File Size | Supported Formats |
|  --- | --- | --- | --- |
| AI Replace | long side <= 2048 | < 10MB | jpg/jpeg/png |

* Error Codes

| Error Code | Description |
|  --- | --- |
| exceed_max_filesize | Input file size exceeds the maximum limit |
| invalid_parameter | Invalid parameter value |
| error_download_image | Download source image error |
| error_decode_image | Decode source image error |
| error_nsfw_content_detected | NSFW content detected in source image |



---

## Unit Consumption
| AI Feature | Unit Consumed |
|  --- | --- |
| AI Replace V1.0 | 1 |



---

License: Privacy policy

## Servers

```
https://yce-api-01.makeupar.com
```

## Security

### BearerAuthenticationV2

Use the standard 'Bearer authentication'. Put your 'API Key' in header: `Authorization:Bearer YOUR_API_KEY`. Notice that there is ' ' a space between 'Bearer' and the 'YOUR_API_KEY'.

Type: http
Scheme: bearer

## Download OpenAPI description

 - [AI Replace](https://docs.perfectcorp.com/_bundle/reference/ai_replace.yaml)

## V1.0

 - [POST /s2s/v2.0/task/obj-replace](https://docs.perfectcorp.com/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post.md): 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.
 - [GET /s2s/v2.0/task/obj-replace/{task_id}](https://docs.perfectcorp.com/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace~1%7Btask_id%7D/get.md)
