YouCam Online Editor AI APIs (1.20 857ae8f)

Download OpenAPI specification:

API Document

Last modified: Apr. 10, 2025 857ae8f

The YouCam Online Editor AI APIs are series of AI effects that let you beautify your photos, as well as generate amazing aesthetic creations beyond human imagination. Let the magic begin.

PLEASE NOTE that by reading this API documentation, or by setting up code pursuant to the instructions in this API documentation, you acknowledge it adheres to Perfect Corp's Privacy policy, and Terms of Service. And If you have any issue, please contact: YouCamOnlineEditor_API@perfectcorp.com

YouCam Online Editor AI APIs

Introduction

YouCam Online Editor is a powerful and easy-to-use AI platform that provides beautiful and true-to-life visual effects thanks to the latest AI technology. This API document will briefly introduce how to integrate these awesome AI effects into your business. YouCam Online Editor AI APIs are standard RESTful APIs to let you easily integrate to your website, e-commerce platforms, iOS/Android APP, applets, mini-programs, and more.

YouCam Online Editor AI APIs

API Server

The YouCam Online Editor AI APIs are built on top of RESTful web APIs. The API server is the host of all APIs. Once you complete the authentication, you can start your AI tasks through the API Server.

Rate Limit

To ensure fair usage and prevent abuse, our API implements rate limiting. There are two types of rate limits:

  • Per IP Address

    Each IP address is allowed a maximum of 100 requests per 5 minutes. If this limit is exceeded, subsequent requests will receive a 429 Too Many Requests error.

  • Per Access Token

    Each access token is allowed a maximum of 100 requests per minute. If this limit is exceeded, subsequent requests will receive a 429 Too Many Requests error.

Both conditions must be met for a request to be accepted. If either condition is not met, the request will receive a 429 Too Many Requests error. Please note that each query related to credit will be processed real-time. Other APIs can use the access token util expired.

It is recommended that you handle rate limit errors gracefully in your application by implementing the appropriate backoff and retry mechanisms.

Quick start guide

First, you need to register a YouCam Online Editor account for free at https://yce.perfectcorp.com/. You can then purchase or subscribe to get your credits to use the service. You can see your subscription plan, pay as you go credits, and your usage record at https://yce.perfectcorp.com/account. You can go to the API Key tab under your account page to generate and maintain your API keys to start using the YouCam Online Editor AI APIs.

To complete the authentication and start using the AI APIs, you need:

  1. Go to https://yce.perfectcorp.com/account/apikey and create the API Key.

  2. Upon creation is completed, it will show the API Key and the Secret key. Where your API Key is the client_id and the Secret key is the client_secret in this document to complete the authentication process.

    Warning: Please kindly note that your Secret key can only be copied at step #2. Once the dialog is closed, there is no method to obtain the Secret key again unless create an another API Key.

  3. To obtain id_token, you need to follow the method below and convert client_secret into id_token

    Encrypt

    client_id=<client_id>&timestamp=<timestamp in millisecond>

    with RSA X.509 format Base64 encoded client_secret to obtain id_token

    JavaScript sample:

    let encrypt = new JSEncrypt();
    encrypt.setPublicKey(client_secret);
    let encrypted = encrypt.encrypt(
    `client_id=${client_id}&timestamp=${new Date().getTime()}`
    );
    console.log(encrypted);
    

    PHP sample:

    <?php
    class RSAPublicEncryption {
        private $publicKey;
    
        public function __construct($rawPublicKey) {
            $pemKey = "-----BEGIN PUBLIC KEY-----\n" .
                    chunk_split($rawPublicKey, 64, "\n") .
                    "-----END PUBLIC KEY-----";
    
            $this->publicKey = openssl_pkey_get_public($pemKey);
            if ($this->publicKey === false) {
                throw new Exception('Invalid public key');
            }
        }
    
        public function encrypt($data) {
            $encrypted = '';
            $result = openssl_public_encrypt($data, $encrypted, $this->publicKey);
            if ($result === false) {
                throw new Exception('Encryption failed');
            }
            return base64_encode($encrypted);
        }
    }
    
    try {
        $rawPublicKey = "<client_secret>";
    
        $rsa = new RSAPublicEncryption($rawPublicKey);
    
        $data = "client_id=<client_id>&timestamp=<timestamp in millisecond>";
    
        $encrypted = $rsa->encrypt($data);
        echo "Encrypted: " . $encrypted . "\n";
    
    } catch (Exception $e) {
        echo "Error: " . $e->getMessage();
    }
    ?>
    
  4. Calling the authentication API to obtain the access_token to start using the YouCam Online Editor AI APIs.

Please note that your credits will be consumed when the resulting image was successfully generated. You may refer to the pricing page regarding the price of each task and how to obtain credits.

Now, let's consider an example usage flow of an AI Photo Enhance API calling sequence. After successfully authorizing and getting the access_token, you can call 'file/enhance' to acquire the upload URL and a File ID associated with it. So that You can upload your photo to the upload URL and use the File ID to run a AI task.

AI Photo Enhance

Subsequently, calling POST 'task/enhance' with the File ID executes the enhance task and obtains a task_id.

This task_id is used to monitor the task's status through polling GET 'task/enhance' to retrieve the current engine status. Until the engine completes the task, the status will remain 'running', and no credits will be consumed during this stage.

Warning: Please note that, Polling to check the status of a task based on it's polling_interval is mandotary. A task will be timed out if there is no polling request within the polling_interval, even if the task is processed succefully(Your credit(s) will be consumed).

Warning: You will get a InvalidTaskId error once you check the status of a timed out task. So, once you run an AI task, you need to polling to check the status within the polling_interval until the status become either success or error.

AI Photo Colorize

The task will change to the 'success' status after the engine successfully processes your input file and generates the resulting image. Your credits will only be consumed in this case. If the engine fails to process the task, the task's status will change to 'error' and no credits will be consumed.

AI Image Generator

When deducting credits, the system will prioritize those nearing expiration. If the expiration date is the same, it will deduct the credits obtained on the earliest date.

File Retention Period

Any files you upload are stored on our server for one day, and then they're automatically deleted. Files created by the system – the results you get – we keep those for 30 days before they're automatically removed.

Warning: Even though those result files are still good for 30 days, the link to download them might only be active for about two hours after they're created. If that download link expires, you can still access the file using its file ID – you can use that ID with another feature to get it.

Supported Formats & Dimensions

AI Photo Editing Supported Dimensions Supported File Size Supported Formats
AI Photo Enhance Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Photo Colorize Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Photo Color Correction Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Photo Lighting 4096x4096 (long side <= 4096, short side >= 256) < 10MB jpg/jpeg/png
AI Image Extender Input: long side <= 4096, Output: short side <= 1024, long side <= 2048 < 10MB jpg/jpeg/png
AI Replace Input: long side <= 4096, Output: short side <= 1024, long side <= 2048 < 10MB jpg/jpeg/png
AI Object Removal Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Image Generator Input: long side <= 4096, Output: long side <= 1024 < 10MB jpg/jpeg/png
Al Photo Background Removal Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Photo Background Blur Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Photo Background Change Input: long side <= 4096, Output: long side <= 4096 < 10MB jpg/jpeg/png
AI Portrait Supported Dimensions Supported File Size Supported Formats
AI Headshot Generator Input: long side <= 4096, Output: long side <= 1024, single face only, need to show both shoulders, need to show full face < 10MB jpg/jpeg/png
AI Studio Generator Input: long side <= 4096, Output: long side <= 1024 < 10MB jpg/jpeg/png
AI Avatar Generator Input: long side <= 4096, Output: long side <= 1024 < 10MB jpg/jpeg/png
AI Face Swap 4096x4096 (long side <= 4096), single face only, need to show full face < 10MB jpg/jpeg/png
AI Video Editing Supported Dimensions Supported File Size Supported Formats
AI Video Enhance input: long side <= 1920; output: max 2x input resolution, up to 60 sec, 30 FPS, 8 bit <100MB container: mov, mp4; video codec: MPEG-4, H.264 AVC; audio codec: aac, mp3;
AI Video Face Swap input: long side <= 4096; output: 1280x720, 30 FPS, up to 30 sec, 8 bit, single face only <100MB container: mov, mp4; video codec: MPEG-4, H.264 AVC; audio codec: aac, mp3
AI Video Style Transfer input: long side <= 4096; output: long side <= 1280, 16 FPS, up to 30 sec, 8 bit <100MB container: mov, mp4; video codec: MPEG-4, H.264 AVC; audio codec: aac, mp3

Error Codes

  • Successful responses (100 - 399)
  • Client error responses (400 - 499)
  • Server error response (500 - 599)
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_download_mask Download mask image error
error_decode_image Decode source image error
error_decode_mask Decode mask image error
error_download_video Download source video error
error_decode_video Decode source video error
error_nsfw_content_detected NSFW content detected in source image
error_no_face No face detected on source image
error_pose Failed to detect pose on source image
error_face_parsing Failed to do face segmentation on source image
error_inference Inference pipeline error
exceed_nsfw_retry_limits Exceed the retry limits to avoid generated NSFW image
error_upload Upload result image error
error_multiple_people Multiple people detected in the source image
error_no_shoulder Shoulders are not visible in the source image
error_large_face_angle The face angle in the uploaded image is too large
error_hair_too_short Input hair is too short
error_unexpected_video_duration Video durateion is not equal to the dstDuration
error_bald_image Input hairstyle is bald
error_unsupport_ratio The aspect ratio of input image is unsupported
unknown_internal_error Others

FAQ

Q: Why am I getting InvalidTaskId error?

A: You will get a InvalidTaskId error once you check the status of a timed out task. So, once you run an AI task, you need to polling to check the status within the polling_interval until the status become either success or error.

Q: What is client_id, client_secret and id_token?

A: Your API Key is the client_id and the Secret key is the client_secret. And please follow the Quick start guide to get the id_token to complete the authentication process.

For more information and questions, please refer to our blog page and the FAQ page. Or send an e-mail to YouCamOnlineEditor_API@perfectcorp.com. Our customer success team are very happy to help. ;)

Authentication

Authentication with Perfect API server.

Authenticate and obtain access_token

Request Body schema: application/json
required
client_id
required
string

Your api key

id_token
required
string

Encrypt client_id=<client_id>&timestamp=<timestamp in millisecond> with RSA X.509 format Base64 encoded client_secret to obtain id_token, where your API Key is the client_id and the Secret key is the client_secret.

Responses

Response Schema: application/json
status
integer

Response status

object
access_token
string

The access token valid for 2 hours. Pass this as Bearer token to call other APIs

Request samples

Content type
application/json
{
  • "client_id": "<generated_client_id>",
  • "id_token": "<generated_id_token>"
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Credit system

Query credit information and usage history.

Get credit info

Authorizations:
BearerAuthentication

Responses

Response Schema: application/json
status
integer

Response status

Array of objects
Array
id
integer

Unique identifier of this credit

type
string
Enum: "SubsToken" "PaygToken"

Type of this credit

amount
integer

Current credit balance

expiry
integer

Unix timestamp of the expiry of this credit (ms)

Request samples

curl --request GET \
    --url https://yce-api-01.perfectcorp.com/s2s/v1.0/client/credit \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "results": [
    ]
}

Get credit history

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in a page. Valid value should be between 1 and 30. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

Unique identifier of the history

timestamp
integer

Unix timestamp of the history (ms)

action
string
Enum: "photo_enhance" "api_photo_enhance" "object_removal" "api_object_removal" "background_removal" "api_background_removal" "colorize" "api_colorize" "text_to_image" "api_text_to_image" "hair_style" "api_hair_style" "blur_background" "change_background" "wig" "trial_gift_text_to_image" "sign_up_gift" "subscription_credits" "subscriber_gift" "permanent_credits" "compensation_from_customer_service" "renew" "expire"

Action of this history

target_id
string

Id of the target for this credit. For example, when running AI Photo Enhance task, target_id for this history will be task_id of the AI Photo Enhance task. When purchasing credit, the target_id for this history will be order_id

object
Array of objects

Detailed information for each credit

Array
id
integer

Id of the credit

amount
integer

Total amount changed from this credit

dst_actions
Array of strings

The dst_actions of skin analysis

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/client/credit/history?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

AI Photo Enhance

AI Photo Enhance

AI Photo Enhancer uses advanced AI and deep learning to analyze image details and improve resolution, making low-resolution images clear & fix motion blur.

  • No More Pixelation: Eliminate pixelation for smoother, more defined images.
  • Fix Blurry Photos: Remove blurriness to reveal sharper, crisper details.
  • Enhance Quality: Bring out finer details, making every part of your image stand out.
  • Sharpen Images: Increase sharpness for clearer and more vivid images.
  • Improve Clarity: Boost overall clarity to make your photos look fresh and professional.
  • Face Enhancement: Refine facial features for more lifelike, enhanced portraits in motional images.

Before sample: AI Photo Enhance

After sample: AI Photo Enhance

Before sample:

After sample:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI Photo Enhance task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of file to run enhancement. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
scale
required
integer

Scaling ratio. Available values are 1, 2, 4.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an AI Photo Enhance task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/enhance?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Object Removal

AI Object Removal

Remove unwanted objects with precision from your photos while preserving intricate details. To use this amazing feature, simply input a photo along with a grayscale mask where white pixels indicate foreground elements and black pixels represent background areas. The AI Object Removal then leverages advanced algorithms to produce natural-looking images by effectively removing unwanted objects such as people, reflections, shadows, and other distractions from your photos.

Sample input:

Sample output:

Sample input:

Sample output:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI Object Removal task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the file to run object removal. File ID from upload file API.

mask_ids
required
Array of strings

ID of the file to run object removal. This should be a grey scale mask image with the exact same width and hight with the input image where white pixels indicate foregroud and black pixels represent background. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an AI Object Removal task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/obj-removal?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

Al Photo Background Removal

AI Photo Background Removal

Remove background from photo with impeccable accuracy, ensuring the high quality of images.

  • Automatic Background Detection: : Uses AI to identify and separate the subject from the background.
  • High Precision Editing: : Provides clean and precise edges around the subject.
  • Supports various categories: People, Products, Animals, Cars, Graphics & more.
  • Easy to chain with other AI tasks: The output file ID can be chained into other AI tasks in a flash.

Sample usage:

Sample uasge:

Sample input:

Sample output:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an Al Photo Background Removal task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Repeated requests with the same request ID will be ignored by the server. This ID should remain consistent for retries due to connection issues. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the file to run SOD. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate anid for each actiond. This action id has to be unique per task. In the response from the get status API, these actionids will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an Al Photo Background Removal task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/sod?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Photo Background Change

AI Photo Background Change

The AI Photo Background Change tool enhances photos by effortlessly isolating the subject from the background image, allowing for various application, including in business, to sharpen the focus on product subjects.

By using this API, you can easily extract a foreground mask from a input image. So that you can change the background using the mask by any other images or colors.

Sample Before:

After:

Before:

After:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI photo Background Change task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Repeated requests with the same request ID will be ignored by the server. This ID should remain consistent for retries due to connection issues. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the file to change background. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate anid for each actiond. This action id has to be unique per task. In the response from the get status API, these actionids will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check AI photo Background Change task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/sod/change-background?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Photo Background Blur

AI Photo Background Blur

The AI Photo Background Blur tool enhances photos by effortlessly isolating the subject from the background image, allowing for various application, including in bokeh simulation, to sharpen the focus on product subjects.

By using this API, you can easily extract a foreground mask from a input image. So that you can blur the background using the mask by any image blur algorithms like the gaussian blur or custom blur kernels.

Sample Before:

After:

Before:

After:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI photo Background Blur task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Repeated requests with the same request ID will be ignored by the server. This ID should remain consistent for retries due to connection issues. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the file to blur background. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate anid for each actiond. This action id has to be unique per task. In the response from the get status API, these actionids will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check AI photo Background Blur task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/sod/blur-background?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Photo Colorize

AI Photo Colorize

Using the latest AI technology to colorize black and white photos, old images, or repair them. With AI Photo Colorize, you can instantly generate 4 different colorized versions of your photos, each with unique color tones ranging from warm to cool. Utilizing deep learning technology, this tool transforms your black and white photos into vibrant color images within seconds.

AI Photo Colorize

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run a AI Photo Colorize task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the file to run colorize. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Photo Colorize task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/colorize?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

AI Image Generator

AI Image Generator

Discover the power of AI with our innovative text-to-image generator! Transform your ideas into stunning visuals instantly, experiment with prompts, explore unique styles like cartoons, oil paintings, or sketches, and let your creativity shine through. Whether you're an artist, designer, or creative soul, our tool offers endless possibilities to bring your vision to life. Add images as references to inspire new artistic directions while letting AI refine them into entirely original masterpieces.

Want more inspirations? Please refer to https://yce.perfectcorp.com/ai-art-generator.

Use cases: AI Image Generator

AI Image Generator

Sample output: AI Image Generator

AI Image Generator

List predefined style groups for AI Image Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/text-to-image?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style for AI Image Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/text-to-image?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/text-to-image?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run a AI Image Generator task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
prompt
required
string

Prompt to generate image

negative_prompt
string

Prompt what DO NOT want

style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

steps
integer

Steps affect image quality and time of processing

cfg_scale
number

CFG controls how closely the generated image follows text prompt

seed
Array of integers

Each image is generated with a unique seed. Using same seed to recreate the same image. Only accept 1 seed.

width_ratio
integer

The width of ratio of image.

height_ratio
integer

The height of ratio of image.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Image Generator task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/text-to-image?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Hairstyle Generator

AI Hairstyle Generator

Using the latest AI technology to try a wide variety of hairstyles, catering to both women and men, meeting different gender and style preference. Discover a world of styles: curly, long, buzz cut, and more. Our AI-powered hair changer lets you experiment effortlessly. Find your ideal hairstyle now!

Want to see more Hair styles? Please refer to https://yce.perfectcorp.com/ai-hairstyle-generator.

Use case: AI Hairstyle Generator

AI Hairstyle Generator

Suggestions for How to Shoot: Suggestions for How to Shoot

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
AI Hairstyle Generator long side <= 1024, face width >= 128, face pose: -10 < pitch < +10, -45 < yaw < +45, -15 < roll < +15, single face only, need to show full face < 10MB jpg/jpeg

Error Codes

Error Code Description
error_no_shoulder Shoulders are not visible in the source image
error_large_face_angle The face angle in the uploaded image is too large
error_insufficient_landmarks Cannot detect sufficient face or body landmarks in the source image
error_hair_too_short Input hair is too short
error_face_pose The face pose of source image is unsupported

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups for AI Hairstyle Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/hair-style?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style for AI Hairstyle Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/hair-style?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/hair-style?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run a AI Hairstyle Generator task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of file to apply hair style. File ID from upload file API

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of a AI Hairstyle Generator task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/hair-style?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Hair Extension

AI Hair Extension

Discover Your Perfect Hair Extension Match with AI​ Experiment with a variety of lengths—from long to extra-long—styles, colors, and bangs, all from the comfort of your device. No more guessing games—see exactly how each hair extension style looks on you with the advanced Generative AI. Make informed styling decisions before committing to a new look.​ With the advanced Hair Extension Try-On, which naturally blends with your current hair length, it’s the perfect time to experiment with super-long styles.

Use case: AI Hair Extension

AI Hair Extension

Suggestions for How to Shoot: Suggestions for How to Shoot

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
AI Hair Extension long side <= 1024, face width >= 128, face pose: -10 < pitch < +10, -45 < yaw < +45, -15 < roll < +15, single face only, need to show full face < 10MB jpg/jpeg

Error Codes

Error Code Description
error_no_shoulder Shoulders are not visible in the source image
error_large_face_angle The face angle in the uploaded image is too large
error_insufficient_landmarks Cannot detect sufficient face or body landmarks in the source image
error_hair_too_short Input hair is too short
error_face_pose The face pose of source image is unsupported
error_bald_image Input hairstyle is bald

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups for AI Hair Extension task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/hair-ext?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style for AI Hair Extension task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/hair-ext?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/hair-ext?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run a AI Hair Extension task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

required
object
src_ids
required
Array of strings

ID of file to apply hair extension. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of a AI Hair Extension task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/hair-ext?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Hair Bang Generator

AI Hair Bang Generator

Try on Your Perfect Hair Bangs with AI Realistic Looks: Experiment with realistic bangs and discover the style that best complements your face.​ Versatile Styling Options: Explore a wide range of bangs styles to suit every personality and occasion.​ Effortless Experience: Enjoy a user-friendly interface that makes trying new bangs easy and fun​.

Want to see more Hair Bang styles? Please refer to https://yce.perfectcorp.com/bangs-filter.

Use case:

AI Hair Bang Generator

AI Hair Bang Generator

Suggestions for How to Shoot: Suggestions for How to Shoot

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
AI Hair Bang Generator long side <= 1024, face width >= 128, face pose: -10 < pitch < +10, -45 < yaw < +45, -15 < roll < +15, single face only, need to show full face < 10MB jpg/jpeg/png

Error Codes

Error Code Description
error_no_shoulder Shoulders are not visible in the source image
error_large_face_angle The face angle in the uploaded image is too large
error_insufficient_landmarks Cannot detect sufficient face or body landmarks in the source image
error_hair_too_short Input hair is too short
error_face_pose The face pose of source image is unsupported
error_bald_image Input hairstyle is bald

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups for AI Hair Bang Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/hair-bang?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style for AI Hair Bang Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/hair-bang?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/hair-bang?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run a AI Hair Bang Generator task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

required
object
src_ids
required
Array of strings

ID of file to apply hair bang generator. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of a AI Hair Bang Generator task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/hair-bang?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Hair Volume Generator

AI Hair Volume Generator

Enhance Your Look with Fuller, More Voluminous Hair Instantly!​ Add natural volume to fine or thinning hair. Seamlessly fill gaps or add hair with AI. Works for all hair types: straight, curly, thin. Perfect for dating profiles, resumes & more. Our AI tool helps you achieve perfect hair volume and density in all your photos, whether for personal, professional, or social use. Say goodbye to bad hair days in pictures and hello to fresh, voluminous hair every time.

Use case: AI Hair Volume Generator

AI Hair Volume Generator

Suggestions for How to Shoot: Suggestions for How to Shoot

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
AI Hair Volume Generator long side <= 1024, face width >= 128, face pose: -10 < pitch < +10, -45 < yaw < +45, -15 < roll < +15, single face only, need to show full face < 10MB jpg/jpeg/png

Error Codes

Error Code Description
error_no_shoulder Shoulders are not visible in the source image
error_large_face_angle The face angle in the uploaded image is too large
error_insufficient_landmarks Cannot detect sufficient face or body landmarks in the source image
error_hair_too_short Input hair is too short
error_face_pose The face pose of source image is unsupported
error_bald_image Input hairstyle is bald

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups for AI Hair Volume task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/hair-vol?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style for AI Hair Volume Generator task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/hair-vol?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/hair-vol?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run a AI Hair Volume Generator task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

required
object
src_ids
required
Array of strings

ID of file to apply hair volume generator. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of a AI Hair Volume Generator task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/hair-vol?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Wavy Hair

AI Wavy Hair

Whether you're dreaming of bouncy ringlets, loose waves, or a bold curly statement, the YouCam Online Editor’s curly hair filter lets you experiment with a fresh, fabulous hairstyle in seconds—all from the comfort of home.

Whether you’re testing a soft wave or a wild afro, YouCam delivers precision and realism that other tools can’t match. It’s perfect for anyone wanting to experiment nobel hairstyle risk-free and make people look forward to their next salon visit.

Suggestions for How to Shoot: Suggestions for How to Shoot

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
AI Wavy Hair long side <= 1024, face width >= 128, face pose: -10 < pitch < +10, -45 < yaw < +45, -15 < roll < +15, single face only, need to show full face < 10MB jpg/jpeg/png

Error Codes

Error Code Description
error_no_shoulder Shoulders are not visible in the source image
error_large_face_angle The face angle in the uploaded image is too large
error_insufficient_landmarks Cannot detect sufficient face or body landmarks in the source image
error_hair_too_short Input hair is too short
error_face_pose The face pose of source image is unsupported

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups for AI Wavy Hair task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/hair-curl?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style for AI Wavy Hair task

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/hair-curl?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/hair-curl?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run a AI Wavy Hair task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

required
object
src_ids
required
Array of strings

ID of file to apply hair wavy generator. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of a AI Wavy Hair task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/hair-curl?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Image Extender

AI Image Extender

Experience vibrant AI Outpainting with our cutting-edge AI Image Extender. Seamlessly expand images in any ratio, bringing out your creativity with our advanced AI technology. Preserve the highest quality while expanding your photos without compromising on style or aesthetics. Instantly transform your photos with one-click automatic background enlargement thanks to our user-friendly AI tool. Thanks to our advanced context-aware technology, we ensure a seamless and captivating experience for every viewer.

AI Image Extender

Whether you're aiming for Instagram glory or framing a digital masterpiece, select from a variety of sizes and ratios for that perfect fit. As you tweak and transform, our AI seamlessly weaves its magic, ensuring the expanded areas blend flawlessly with your original photo.

AI Image Extender

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI Image Extender task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of file to run enhancement. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object

The AI Image Extender API takes 3 key parameters to work, an input image, a pivot point and an output image. The size of output image should always be larger than the size of input image. And the recommeded size of output image should be less than two times of the size of input image to ensure better quality. The pivot point with location input_x and input_y is used to place the top-left of input image to the output image. You need to scale the input image by youself first if any of edges of the input image is larger than 4096. Or using the crop parameters to crop the input image. After cropping, you need to make sure the input image is completely inside the output image with your pivot point. It is your resposibility to provide correct pivot point and size of the output image. Otherwise, you may get unexpected results.

output_width
required
integer

Output image height. value range: [1 - 4096]

output_height
required
integer

Output image width. value range: [1 - 4096]

input_x
required
integer

Source image left position in output image, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

input_y
required
integer

Source image top position in output image, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

input_width
required
integer

Source image width, input_x + input_width must ⇐ output_width. value range: [1 - 4096]

input_height
required
integer

Source image height, input_y + input_height must ⇐ output_height. value range: [1 - 4096]

crop_input_x
required
integer

Crop source image from x, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

crop_input_y
required
integer

Crop source image from y, where The indices are ordered from top to bottom, and from left to right. value range: [0 - 4096]

crop_input_width
required
integer

Crop source image with width crop_input_width. value range: [1 - 4096]

crop_input_height
required
integer

Crop source image with height crop_input_height. value range: [1 - 4096]

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an AI Image Extender task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/out-paint?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Photo Lighting

AI Photo Lighting

Brighten your images with Our AI image brightening tool effortlessly. With the legendary AI technology, lighten up any image of your choice. Brighten your dark photos or images with our AI Photo Lighting tool, illuminating your memories in a flash.

Before After Brighten low-light photos effortlessly using AI tool, bringing out stunning details and vibrant colors.

Before After Brighten your product pictures with AI Lighting tool for a captivating and stunning presentation.

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI Photo Lighting task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of file to run enhancement. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

params
required
object

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an AI Photo Lighting task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/lighting?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Photo Color Correction

AI Color Correction

Perfect AI Color Correction let you automatically adjust saturation, temperature, and hue of photos with ease. Adjust white balance to correct color temperature, enhance saturation and make it vibrant, correct exposure level to balance brightness, remove color casts or tints, improve skin tones for a nature-looking portrait, enhance shadow and highlight details, remove noise and improve clarity, or even apply creative color grading effects all in one touch. With AI Color Correction, you can instantly generate 4 different color graded versions of your photos, each with unique color tones ranging from warm to cool within seconds.

Sample Before:

After:

Before:

After

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run a AI Photo Color Correction task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the file to correct color. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Photo Color Correction task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/colorize/color-correct?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

AI Replace

Al Replace

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:

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.

Create stunning room mockups with AI Replace by filling empty spaces with aesthetically pleasing furniture and objects, transforming the perception of any space.

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI Replace task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of main image. File ID from upload file API.

msk_ids
required
Array of strings

ID of masked area image. This should be a grey scale mask image with the exact same width and hight with the input image where white pixels indicate foregroud and black pixels represent background. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
prompt
required
string

Prompt for generating objects in the masked area.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an AI Replace task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/obj-replace?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Makeup Transfer

AI Makeup Transfer

Just Upload a Desired Photo with the Look You Like! AI Makeup Transfer makes it easy and fun to experiment with different looks by letting you to upload desired photo to try them one by one. Have any makeup look you want to try now? Let us amaze you with AI Makeup Transfer!

First, upload a photo of yourself where your face and its features are clearly visible as the target image.

Then, upload a photo of your favorite makeup look as the reference image.

There you have it - an AI Makeup Transferred photo.

Samples:

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
AI Makeup Transfer 1024x1024 (long side <= 1024), single face only, need to show full face < 10MB jpg/jpeg/png

Error Codes

Error Code Description
error_src_no_face No face detected in the user image
error_ref_no_face No face detected in the reference image
error_src_face_too_small Face in the user image is too small
error_ref_face_too_small Face in the reference image is too small
error_src_large_face_angle Frontal face required in the user image
error_ref_large_face_angle Frontal face required in the reference image
error_src_eye_closed Eye is closed in the user image
error_ref_eye_closed Eye is closed in the reference image
error_src_eye_occluded Eye is occluded in the user image
error_ref_eye_occluded Eye is occluded in the reference image
error_src_lip_occluded Lip is occluded in the user image
error_ref_lip_occluded Lip is occluded in the reference image
error_inappropriate_ref_case01 For both eyes, hair is too close to eye or skin region beside eyetail is not large enough in the reference image
error_inappropriate_ref_case02 For one eye, hair is too close to eye or skin region beside eyetail is not large enough in the reference image. The other one is not frontal enough in the reference image

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run a AI Makeup Transfer task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the target image to transfer. File ID from upload file API.

ref_ids
required
Array of strings

ID of the reference image. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Makeup Transfer task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/mu-transfer?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Face Swap

AI Face Swap

Using AI Face Swap for hyper-realistic effect with multiple faces supported.​ Our face swap artificial intelligence supports swapping one or multiple faces. Either for creating funny pictures of faces, or need a professional tool, we've got you covered.

Multiple faces swap sample:

Single face swap sample:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run a AI Face Swap face detection task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the target image to detect face. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Face Swap face detection task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Array of objects

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/face-swap/pre-process?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

Run a AI Face Swap task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the target image for swap.

ref_ids
required
Array of strings

ID of the reference image. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
required
Array of objects

The designated ref image id and face position information to be swapped for each detected face on target image. e.g. [{'index': 0, 'position': 1}] indicates that the second face on the target image is going to be swapped with the first reference image

Array
index
integer

The index of reference image

position
integer

The index of face on the target image. The index is from faces of detection result.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Face Swap task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/face-swap?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Video Enhance

AI Video Enhance

Fix blur, adjust sharpness and brightness, and instantly transform low-quality videos into clear, high-quality content with AI. From 480p to 4K, unblur, upscale, and boost quality with the video enhancer—no skills needed.

Supported format: .mp4, .mov are supported. Please keep the duration under 1 minute. Maximun output resolution: up to 4K.

Sample usage cases:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Value: "video/mp4"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Value: "video/mp4"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 100MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run a AI Video Enhance task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the video to enhance. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

object
dst_duration
required
integer

The length of video in seconds

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check a AI Video Enhance task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/video-sr?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Headshot Generator

AI Headshot Generator

Transform your photos into stunning professional deadshots with our AI Headshot Generator. Elevate your headshots quickly and effectively using our powerful AI tools designed to deliver professional-quality results.

  • Variety of Styles: From polished LinkedIn headshots and professional business headshots to creative model headshots, our AI headshot generator helps you select the perfect look to suit your needs.
  • Professional Results: Leveraging AI to ensure your headshots look natural and flattering, making a strong impression on potential employers and clients.
  • Convenience: Generate multiple AI headshots anytime, anywhere, without the need for a photographer. Perfect for busy professionals.

For more AI Headshot styles, please refer to https://yce.perfectcorp.com/ai-headshot-generator.

Use cases: AI Headshot Generator

AI Headshot Generator

Suggestions for How to Shoot: Suggestions for How to Shoot

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/headshot?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style by style group

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/headshot?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/headshot?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run an AI Headshot Generator task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. The number of styles must be less than or equal to the output_count.

required
object
output_count
required
integer [ 1 .. 200 ]

The number of generated images. It must be between 1 to 200.

required
object
src_ids
required
Array of strings

ID of file to apply task. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of the AI Headshot Generator task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/headshot?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Studio Generator

AI Studio Generator

Embrace the excellence of studio kike AI Portrait Generator. Transform your selfie into a studio-quality portrait in a flash​.

  • Studio-Free Convenience: No need for a photographer or studio visits—create studio-quality artistic photos anytime, anywhere​
  • Quick Photo Transformation: Fast processing for instant high-quality artistic photo results, ideal for quick updates
  • High-Quality Artistic Output: Delivers professional-standard artistic photos with clear details, perfect lighting, just like you've taken the photos in a studio

Use cases: AI Studio Generator

AI Studio Generator

Suggestions for How to Shoot: Suggestions for How to Shoot

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/ai-studio?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style by style group

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/ai-studio?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/ai-studio?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run an AI Studio task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. The number of styles must be less than or equal to the output_count.

required
object
output_count
required
integer [ 1 .. 200 ]

The number of generated images. It must be between 1 to 200.

required
object
src_ids
required
Array of strings

ID of file to apply task. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of the AI Studio task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/ai-studio?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Avatar Generator

AI Avatar Generator

For the AI magic avatar tool, this app uses the technology of image-to-image. which means the avatar is generated based on your photo. Once the photos are selected by the users, the technology embedded in the app starts analyzing and learning the user's facial traits.

For more avatar styles, please refer to https://yce.perfectcorp.com/avatar

Use cases: AI Avatar Generator

AI Avatar Generator

Suggestions for How to Shoot: Suggestions for How to Shoot

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/ai-avatar?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style by style group

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/ai-avatar?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/ai-avatar?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run an AI Avatar task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. The number of styles must be less than or equal to the output_count.

required
object
output_count
required
integer [ 1 .. 200 ]

The number of generated images. It must be between 1 to 200.

required
object
src_ids
required
Array of strings

ID of file to apply task. File ID from upload file API

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of the AI Avatar task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/ai-avatar?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Face Swap (video)

AI Video Face Swap

Video face swapping is an AI-powered process that uses YouCam’s AI Video Face Swap API to replace one person's face with another in a video. With advanced AI technology, the AI video face swap delivers remarkably realistic results. The facial expressions, lighting, and skin tones are finely tuned to ensure that the swapped faces blend seamlessly with the original footage.

Note: This API supports video with single face only. For customizable solution, please contact us.

Sample usage cases:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Value: "video/mp4"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Value: "video/mp4"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 100MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an AI Face Swap (video) task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of the target video for swap.

ref_ids
required
Array of strings

ID of the reference image. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
dst_duration
required
integer

The length of video in seconds

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Check the status of the AI Face Swap (video) task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/face-swap-vid?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Style Transfer (video)

AI Video Style Transfer

Create unique videos with our AI Video Filters and Effects. Easily enhance each video with stunning AI styles. AI Video Filters with Instant Transformation. Experience a seamless transformation with AI video filters that apply stunning effects instantly. Choose from an array of unique styles, including pop art, retro, anime, and more, to add depth and creativity to every frame.

Sample usage cases:

Create a new file. Deprecated

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Value: "video/mp4"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Value: "video/mp4"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 100MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style groups

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/video-trans?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style by style group

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/video-trans?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/video-trans?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run an AI Style Transfer (video) task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

required
object
src_ids
required
Array of strings

ID of file to apply task. File ID from upload file API

required
object
dst_duration
required
integer

The length of video in seconds

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of the AI Style Transfer (video) task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/video-trans?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json

AI Skin Analysis

AI Skin Analysis

AI skincare analysis technology harnesses the power of artificial intelligence to analyze various aspects of the skin, from texture and pigmentation to hydration and pore size, with remarkable precision. By employing advanced algorithms and machine learning, AI skin analysis can offer personalized recommendations and skincare routines tailored to an individual's unique skin type and concerns.

This not only enhances the effectiveness of skincare products but also empowers users to make informed decisions about their skincare regimen. With the integration of AI skin analysis, individuals can now embark on a journey towards healthier, more radiant skin, guided by data-driven insights and the promise of more effective skincare solutions.

Warning: Please be advised that the system requires processing exactly 4, 7, or 14 distinct skin concerns at one time. Simultaneous use of SD and HD skin concern parameters is NOT supported. Attempting to deviate from these specifications will result in an InvalidParameters error.

  • For example, if you run a task with 5 HD skin concerns, you will get an error as following:
    {
        "status": 400,
        "error": "must select 4, 7 or 14 distinct dst_actions",
        "error_code": "InvalidParameters"
    }
    
  • If you mix using HD and SD skin concerns, you will get an error as following:
    {
        "status": 400,
        "error": "cannot mix HD and SD dst_actions",
        "error_code": "InvalidParameters"
    }
    
  • If you misspell a skin concern or sending unknown skin concerns, you will get an error as following:
    {
        "status": 400,
        "error": "Not available dst_action abc123",
        "error_code": "InvalidParameters"
    }
    

Use cases:

Suggestions for How to Shoot:

Warning: The width of the face needs to be greater than 60% of the width of the image.

Get Ready to Start Skin Analysis Instructions

  • Take off your glasses and make sure bangs are not covering your forehead
  • Make sure that you’re in a well-lit environment
  • Remove makeup to get more accurate results
  • Look straight into the camera and keep your face in the center

Output ZIP Data Structure Description

The system provides a ZIP file with a 'skinanalysisResult' folder inside. This folder contains a 'score_info.json' file that includes all the detection scores and references to the result images.

The 'score_info.json' file contains all the skin analysis detection results, with numerical scores and the names of the corresponding output mask files.

The PNG files are detection result masks that can be overlaid on your original image. Simply use the alpha values in these PNG files to blend them with your original image, allowing you to see the detection results directly on the source image.

File Structure in the Skin Analysis Result ZIP

  • HD Skincare ZIP

    • skinanalysisResult
      • score_info.json
      • hd_acne_output.png
      • hd_age_spot_output.png
      • hd_dark_circle_output.png
      • hd_droopy_lower_eyelid_output.png
      • hd_droopy_upper_eyelid_output.png
      • hd_eye_bag_output.png
      • hd_firmness_output.png
      • hd_moisture_output.png
      • hd_oiliness_output.png
      • hd_radiance_output.png
      • hd_redness_output.png
      • hd_texture_output.png
      • hd_pore_output_all.png
      • hd_pore_output_cheek.png
      • hd_pore_output_forehead.png
      • hd_pore_output_nose.png
      • hd_wrinkle_output_all.png
      • hd_wrinkle_output_crowfeet.png
      • hd_wrinkle_output_forehead.png
      • hd_wrinkle_output_glabellar.png
      • hd_wrinkle_output_marionette.png
      • hd_wrinkle_output_nasolabial.png
      • hd_wrinkle_output_periocular.png
  • SD Skincare ZIP

    • skinanalysisResult
      • score_info.json
      • acne_output.png
      • age_spot_output.png
      • dark_circle_v2_output.png
      • droopy_lower_eyelid_output.png
      • droopy_upper_eyelid_output.png
      • eye_bag_output.png
      • firmness_output.png
      • moisture_output.png
      • oiliness_output.png
      • pore_output.png
      • radiance_output.png
      • redness_output.png
      • texture_output.png
      • wrinkle_output.png
  • JSON Data Structure (score_info.json)

    • Each category contains:

      • "raw_score": A floating-point value ranging from 1 to 100. A higher score indicates healthier and more aesthetically pleasing skin condition.
      • "ui_score": An integer ranging from 1 to 100. The UI Score functions primarily as a psychological motivator in beauty assessment. We adjust the raw scores to produce more favorable results, acknowledging that consumers generally prefer positive evaluations regarding their skin health. This calibration serves to instill greater confidence in users while maintaining the underlying beauty psychology framework.
      • "output_mask_name": The filename of the corresponding output mask image.
    • Categories and Descriptions

      • HD Skincare:

        • "hd_redness": Measures skin redness severity.
        • "hd_oiliness": Determines skin oiliness level.
        • "hd_age_spot": Detects age spots and pigmentation.
        • "hd_radiance": Evaluates skin radiance.
        • "hd_moisture": Assesses skin hydration levels.
        • "hd_dark_circle": Analyzes the presence of dark circles under the eyes.
        • "hd_eye_bag": Detects eye bags.
        • "hd_droopy_upper_eyelid": Measures upper eyelid drooping severity.
        • "hd_droopy_lower_eyelid": Measures lower eyelid drooping severity.
        • "hd_firmness": Evaluates skin firmness and elasticity.
        • "hd_texture": Subcategories[whole]; Analyzes overall skin texture.
        • "hd_acne": Subcategories[whole]; Detects acne presence.
        • "hd_pore": Subcategories[forehead, nose, cheek, whole]; Detects and evaluates pores in different facial regions.
        • "hd_wrinkle": Subcategories[forehead, glabellar, crowfeet, periocular, nasolabial, marionette, whole]; Measures the severity of wrinkles in various facial areas.
      • SD Skincare:

        • "wrinkle": General wrinkle analysis.
        • "droopy_upper_eyelid": Measures upper eyelid drooping severity.
        • "droopy_lower_eyelid": Measures lower eyelid drooping severity.
        • "firmness": Evaluates skin firmness and elasticity.
        • "acne": Evaluates acne presence.
        • "moisture": Measures skin hydration.
        • "eye_bag": Detects eye bags.
        • "dark_circle_v2": Analyzes dark circles using an alternative method.
        • "age_spot": Detects age spots.
        • "radiance": Evaluates skin brightness.
        • "redness": Measures skin redness.
        • "oiliness": Determines skin oiliness.
        • "pore": Measures pore visibility.
        • "texture": Analyzes overall skin texture.
    • Sample score_info.json of HD Skincare

      {
          "hd_redness": {
              "raw_score": 72.011962890625,
              "ui_score": 77,
              "output_mask_name": "hd_redness_output.png"
          },
          "hd_oiliness": {
              "raw_score": 60.74365234375,
              "ui_score": 72,
              "output_mask_name": "hd_oiliness_output.png"
          },
          "hd_age_spot": {
              "raw_score": 83.23274230957031,
              "ui_score": 77,
              "output_mask_name": "hd_age_spot_output.png"
          },
          "hd_radiance": {
              "raw_score": 76.57244205474854,
              "ui_score": 79,
              "output_mask_name": "hd_radiance_output.png"
          },
          "hd_moisture": {
              "raw_score": 48.694559931755066,
              "ui_score": 70,
              "output_mask_name": "hd_moisture_output.png"
          },
          "hd_dark_circle": {
              "raw_score": 80.1993191242218,
              "ui_score": 76,
              "output_mask_name": "hd_dark_circle_output.png"
          },
          "hd_eye_bag": {
              "raw_score": 76.67280435562134,
              "ui_score": 79,
              "output_mask_name": "hd_eye_bag_output.png"
          },
          "hd_droopy_upper_eyelid": {
              "raw_score": 79.05348539352417,
              "ui_score": 80,
              "output_mask_name": "hd_droopy_upper_eyelid_output.png"
          },
          "hd_droopy_lower_eyelid": {
              "raw_score": 79.97175455093384,
              "ui_score": 81,
              "output_mask_name": "hd_droopy_lower_eyelid_output.png"
          },
          "hd_firmness": {
              "raw_score": 89.66898322105408,
              "ui_score": 85,
              "output_mask_name": "hd_firmness_output.png"
          },
          "hd_texture": {
              "whole": {
                  "raw_score": 66.3921568627451,
                  "ui_score": 75,
                  "output_mask_name": "hd_texture_output.png"
              }
          },
          "hd_acne": {
              "whole": {
                  "raw_score": 59.92677688598633,
                  "ui_score": 76,
                  "output_mask_name": "hd_acne_output.png"
              }
          },
          "hd_pore": {
              "forehead": {
                  "raw_score": 79.59770965576172,
                  "ui_score": 80,
                  "output_mask_name": "hd_pore_output_forehead.png"
              },
              "nose": {
                  "raw_score": 29.139814376831055,
                  "ui_score": 58,
                  "output_mask_name": "hd_pore_output_nose.png"
              },
              "cheek": {
                  "raw_score": 44.11081314086914,
                  "ui_score": 65,
                  "output_mask_name": "hd_pore_output_cheek.png"
              },
              "whole": {
                  "raw_score": 49.23978805541992,
                  "ui_score": 67,
                  "output_mask_name": "hd_pore_output_all.png"
              }
          },
          "hd_wrinkle": {
              "forehead": {
                  "raw_score": 55.96956729888916,
                  "ui_score": 67,
                  "output_mask_name": "hd_wrinkle_output_forehead.png"
              },
              "glabellar": {
                  "raw_score": 76.7251181602478,
                  "ui_score": 75,
                  "output_mask_name": "hd_wrinkle_output_glabellar.png"
              },
              "crowfeet": {
                  "raw_score": 83.4361481666565,
                  "ui_score": 78,
                  "output_mask_name": "hd_wrinkle_output_crowfeet.png"
              },
              "periocular": {
                  "raw_score": 67.88706302642822,
                  "ui_score": 72,
                  "output_mask_name": "hd_wrinkle_output_periocular.png"
              },
              "nasolabial": {
                  "raw_score": 74.03312683105469,
                  "ui_score": 74,
                  "output_mask_name": "hd_wrinkle_output_nasolabial.png"
              },
              "marionette": {
                  "raw_score": 71.94477319717407,
                  "ui_score": 73,
                  "output_mask_name": "hd_wrinkle_output_marionette.png"
              },
              "whole": {
                  "raw_score": 49.64699745178223,
                  "ui_score": 65,
                  "output_mask_name": "hd_wrinkle_output_all.png"
              }
          }
      }
      
    • Sample score_info.json of SD Skincare

      {
          "wrinkle": {
              "raw_score": 36.09360456466675,
              "ui_score": 60,
              "output_mask_name": "wrinkle_output.png"
          },
          "droopy_upper_eyelid": {
              "raw_score": 79.05348539352417,
              "ui_score": 80,
              "output_mask_name": "droopy_upper_eyelid_output.png"
          },
          "droopy_lower_eyelid": {
              "raw_score": 79.97175455093384,
              "ui_score": 81,
              "output_mask_name": "droopy_lower_eyelid_output.png"
          },
          "firmness": {
              "raw_score": 89.66898322105408,
              "ui_score": 85,
              "output_mask_name": "firmness_output.png"
          },
          "acne": {
              "raw_score": 92.29713000000001,
              "ui_score": 88,
              "output_mask_name": "acne_output.png"
          },
          "moisture": {
              "raw_score": 48.694559931755066,
              "ui_score": 70,
              "output_mask_name": "moisture_output.png"
          },
          "eye_bag": {
              "raw_score": 76.67280435562134,
              "ui_score": 79,
              "output_mask_name": "eye_bag_output.png"
          },
          "dark_circle_v2": {
              "raw_score": 80.1993191242218,
              "ui_score": 76,
              "output_mask_name": "dark_circle_v2_output.png"
          },
          "age_spot": {
              "raw_score": 83.23274230957031,
              "ui_score": 77,
              "output_mask_name": "age_spot_output.png"
          },
          "radiance": {
              "raw_score": 76.57244205474854,
              "ui_score": 79,
              "output_mask_name": "radiance_output.png"
          },
          "redness": {
              "raw_score": 72.011962890625,
              "ui_score": 77,
              "output_mask_name": "redness_output.png"
          },
          "oiliness": {
              "raw_score": 60.74365234375,
              "ui_score": 72,
              "output_mask_name": "oiliness_output.png"
          },
          "pore": {
              "raw_score": 88.38014125823975,
              "ui_score": 84,
              "output_mask_name": "pore_output.png"
          },
          "texture": {
              "raw_score": 80.09742498397827,
              "ui_score": 76,
              "output_mask_name": "texture_output.png"
          }
      }
      

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
SD Skincare long side <= 1920, short side >= 480 < 10MB jpg/jpeg/png
HD Skincare long side <= 2560, short side >= 1080 < 10MB jpg/jpeg/png

Warning: It is your resposibility to resize input images based on the Supported Dimensions of HD or SD Skincare before runing AI Skin Analysis. It is highly recommended to use portrait rather than landscape aspect ratio as input.

Error Codes

Error Code Description
error_below_min_image_size Input image resolution is too small
error_exceed_max_image_size Input image resolution is too large
error_src_face_too_small The face area in the uploaded image is too small. The width of the face needs to be greater than 60% of the width of the image.
error_src_face_out_of_bound The face area in the uploaded image is out of bound
error_lighting_dark The lighting in the uploaded image is too dark

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Run an Skin Analysis task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
object
src_ids
required
Array of strings

ID of file to run enhancement. File ID from upload file API.

required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

params
required
object
dst_actions
required
Array of strings
Items Enum: "hd_wrinkle" "hd_pore" "hd_texture" "hd_acne" "hd_oiliness" "hd_radiance" "hd_eye_bag" "hd_age_spot" "hd_dark_circle" "hd_droopy_upper_eyelid" "hd_droopy_lower_eyelid" "hd_firmness" "hd_moisture" "hd_redness" "wrinkle" "pore" "texture" "acne" "oiliness" "radiance" "eye_bag" "age_spot" "dark_circle_v2" "droopy_upper_eyelid" "droopy_lower_eyelid" "firmness" "moisture" "redness"

The actions for Skin Analysis. There are 2 types of features: HD and SD. You can freely choose 4, 7, or 14 features, either all in SD or all in HD.

Note: HD and SD features cannot be mixed.

HD features:

  • hd_redness: Measures skin redness severity.
  • hd_oiliness: Determines skin oiliness level.
  • hd_age_spot: Detects age spots and pigmentation.
  • hd_radiance: Evaluates skin radiance.
  • hd_moisture: Assesses skin hydration levels.
  • hd_dark_circle: Analyzes the presence of dark circles under the eyes.
  • hd_eye_bag: Detects eye bags.
  • hd_droopy_upper_eyelid: Measures upper eyelid drooping severity.
  • hd_droopy_lower_eyelid: Measures lower eyelid drooping severity.
  • hd_firmness: Evaluates skin firmness and elasticity.
  • hd_texture: Analyzes overall skin texture.
  • hd_acne: Detects acne presence.
  • hd_pore: Detects and evaluates pores in different facial regions (forehead, nose, cheek, whole).
  • hd_wrinkle: Measures the severity of wrinkles in various facial areas (forehead, glabellar, crowfeet, periocular, nasolabial, marionette, whole).

SD features:

  • wrinkle: General wrinkle analysis.
  • droopy_upper_eyelid: Measures upper eyelid drooping severity.
  • droopy_lower_eyelid: Measures lower eyelid drooping severity.
  • firmness: Evaluates skin firmness and elasticity.
  • acne: Evaluates acne presence.
  • moisture: Measures skin hydration.
  • eye_bag: Detects eye bags.
  • dark_circle_v2: Analyzes dark circles.
  • age_spot: Detects age spots.
  • radiance: Evaluates skin brightness.
  • redness: Measures skin redness.
  • oiliness: Determines skin oiliness.
  • pore: Measures pore visibility.
  • texture: Analyzes overall skin texture.

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check an Skin Analysis task status

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects

The url of result ZIP to be downloaded. The returned ZIP file contains a skinanalysisResult folder of a score_info.json file with all detection result scores and images of all detection results.

Array
url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/skin-analysis?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

AI Image to Video Generator

AI Image to Video Generator

YouCam AI Image to Video Generator quickly turns one image into stunning videos using advanced algorithms to create realistic motion effects. Offers a variety of highly optimized pre-made templates to animate your photos.

To easily create a video from an image using AI, start with a photo that has a clean background and a clear portrait. Simply upload your photo, and watch the magic happen!

Use cases:

Suggestions for How to Shoot:

Supported Formats & Dimensions

AI Feature Supported Dimensions Supported File Size Supported Formats
Image to Video (Standard) Input: >= 300*300px with aspect ratio between 1:2.5 ~ 2.5:1. Output: Up to 720p 30fps Input: <10MB. Output: 5 seconds or 10 seconds jpg/jpeg/png
Image to Video (Professional) Input: >= 300*300px with aspect ratio between 1:2.5 ~ 2.5:1. Output: Up to 1080p 30fps Input: <10MB. Output: 5 seconds or 10 seconds jpg/jpeg/png

Error Codes

Error Message Description
Invalid request parameters Check whether the request parameters are correct
Invalid parameters, such as incorrect key or illegal value Refer to the specific information in the message field of the returned body and modify the request parameters
The requested method is invalid Review the API documentation and use the correct request method
The requested resource does not exist, such as the model Refer to the specific information in the message field of the returned body and modify the request parameters
Trigger strategy of the platform Check if any platform policies have been triggered
Trigger the content security policy of the platform Check the input content, modify it, and resend the request
Server internal error Try again later, or contact customer service
Server temporarily unavailable, usually due to maintenance Try again later, or contact customer service
Server internal timeout, usually due to a backlog Try again later, or contact customer service

Create a new file.

To upload a new file, you'll first need to use the File API. It will give you a URL – use that URL to upload your file. Once the upload is finished, you can use the file_id from the same response to start using our AI features.

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
required
Array of objects
Array
content_type
required
string
Enum: "image/jpg" "image/jpeg" "image/png"

Content MIME type for this file. Currently available values are listed in the enum.

file_name
required
string

Name of this file

file_size
required
integer

Content length for this file in bytes. Should not be larger than 10MB.

Responses

Response Schema: application/json
status
integer

Response status

object
Array of objects
Array
content_type
string

Content MIME type for this file.

file_name
string

Name of this file

file_id
string

ID of this file. Other run task API will need this file_id.

Array of objects

Using upload url, headers, method below to upload file. After completion, the file_id is used to proceed with calling run task API.

Array
headers
object

Headers to include when uploading the file

url
string

URL to upload this file

method
string

HTTP method to upload this file

Request samples

Content type
application/json
{
  • "files": [
    ]
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style group

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style group

object
title
string

Title of this style group

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style-group/image-to-video?page_size=20&starting_token=13045969587275114' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

List predefined style

Authorizations:
BearerAuthentication
query Parameters
page_size
integer
Example: page_size=20

Number of results to return in this page. Valid value should be between 1 and 20. Default 20.

starting_token
string
Example: starting_token=13045969587275114

Token for current page. Start with null for the first page, and use next_token from the previous response to start next page

style_group_id
required
integer
Example: style_group_id=18213963761051864

The id of style group

Responses

Response Schema: application/json
status
integer

Response status

object
next_token
string

Token to query next page.

Array of objects
Array
id
integer

ID of style

object
title
string

Title of this style

thumb
string

Thumbnail url for this parameter

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/style/image-to-video?page_size=20&starting_token=13045969587275114&style_group_id=18213963761051864' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{}

List predefined style by category

Authorizations:
BearerAuthentication
query Parameters
category_id
Array of integers <= 5 items

The id of category. Accepts multiple values, up to a maximum of 5.

Responses

Response Schema: application/json
id
required
integer

The id of category.

name
required
string

The name of category.

required
Array of objects (Style)

The styles belong to this category.

Array
style_group_id
required
integer

The id of style group. Use this as style_group_id when run task.

style_id
required
integer

The id of style. Use this as style_ids when run task.

required
object
title
required
string

The style name

thumb
required
string

The thumbnail of style

required
Array of objects
Array
id
required
integer

The id of sub-category. Use this id to query for its content.

name
required
string

The name of sub-category.

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.1/task/style/image-to-video?category_id=SOME_ARRAY_VALUE' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json
{
  • "id": 0,
  • "name": "string",
  • "styles": [
    ],
  • "sub_categories": [
    ]
}

Run an Image to Video task

Authorizations:
BearerAuthentication
Request Body schema: application/json
required
request_id
required
integer

Incremental request number starting from 0. Requests with the same request_id will be ignored by the server. request_id should remain the same if the API client needs to retry the API due to a connection issue. This is to prevent duplicate deduction of credits caused by running the same task repeatedly. For instance, if the same file_id is sent with the same request_id, the engine won't re-run the task, nor will duplicate consume credits. However, if a client wants to generate multiple different results using the same file_id, the client needs to increment the request_id then the engine will re-run the task and consume the credit accordingly.

required
object
required
Array of objects

Only accept 1 action.

Array
id
required
integer

ID of this action, start with 0. The client needs to generate an id for each action. This action id has to be unique per task. In the response from the get status API, these action id will be used to let the client know which results correspond to each action.

required
object
style_group_id
required
integer

Id of style group

style_ids
required
Array of numbers

Id of style to run the task. Only accept 1 style.

mode
string
Enum: "std" "pro"

The quailty mode. Standard (std) mode is faster speed, OK quailty. Professional (pro) mode is best quailty with richer details. Automatically select best mode by style if not provide.

required
object
src_ids
required
Array of strings

ID of file to apply task. File ID from upload file API

required
object
dst_duration
required
integer

The length of video in seconds. Only accept 5 or 10 seconds

Responses

Response Schema: application/json
status
integer

Response status

object
task_id
string

ID of this task. This task_id will only valid if client continue polling check status API with interval polling_interval defined in check status API response. Otherwise, engine might consider client have leave and will not process the task. No credit will be consumed in this case.

Request samples

Content type
application/json
{
  • "request_id": 0,
  • "payload": {
    }
}

Response samples

Content type
application/json
{
  • "status": 200,
  • "result": {
    }
}

Check the status of the Image to Video task

Authorizations:
BearerAuthentication
query Parameters
task_id
required
string
Example: task_id=SX9ALF1Z+KIiNa+GaFRp4bI5gijoc/ckI2teebLq35Bo1Nwc++3iXXdKqnU4/LID

ID of task to check

Responses

Response Schema: application/json
status
integer

Response status

object
polling_interval
integer

Milliseconds waiting time for start next polling. Note that the task will lose if no polling in 10 seconds

status
string
Enum: "running" "success" "error"

Status of this task

error
string or null (EngineErrorCode)
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"

Errors:

  • exceed_max_filesize - Input file size exceeds the maximum limit
  • invalid_parameter - Invalid parameter value
  • error_download_image - Download source image error
  • error_download_mask - Download mask image error
  • error_decode_image - Decode source image error
  • error_decode_mask - Decode mask image error
  • error_nsfw_content_detected - NSFW content detected in source image
  • error_no_face - No face detected on source image
  • error_pose - Failed to detect pose on source image
  • error_face_parsing - Failed to do face segmentation on source image
  • error_inference - Inference pipeline error
  • exceed_nsfw_retry_limits - Exceed the retry limits to avoid generated NSFW image
  • error_upload - Upload result image error
  • unknown_internal_error - Others
error_message
string

Detailed description of error

Array of objects
Array
id
integer

ID of action

Array of objects
Array
dst_id
string

File ID of the result file is used for integrating other task. No need to reupload file.

url
string

URL to download this result. Valid for 2 hours

Request samples

curl --request GET \
    --url 'https://yce-api-01.perfectcorp.com/s2s/v1.0/task/image-to-video?task_id=SX9ALF1Z%2BKIiNa%2BGaFRp4bI5gijoc%2FckI2teebLq35Bo1Nwc%2B%2B3iXXdKqnU4%2FLID' \
    --header 'Authorization: Bearer <access_token>'

Response samples

Content type
application/json