The resources (image, video, voice) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.
Experience our age adjustment technology in action by exploring our interactive demo on GitHub: AKool Reage Demo.
POST https://openapi.akool.com/api/open/v3/faceswap/highquality/imgreage
Request Headers
Parameter
Value
Description
Authorization
Bearer {token}
Your API Key used for request authorization.getToken
Body Attributes
Parameter
Type
Value
Description
targetImage
Array
[{path:"",opts:""}]
Replacement target image information(Each array element is an object, and the object contains 2 properties, path:Links to faces detected in target images. opts: Key information of the face detected in the target image【You can get it through the face https://sg3.akool.com/detect API, You can get the landmarks_str value returned by the api interface as the value of opts)
face_reage
Int
[-30, 30]
Reage ranges
modifyImage
String
Modify the link address of the image
webhookUrl
String
Callback url address based on HTTP request
Response Attributes
Parameter
Type
Value
Description
code
int
1000
Interface returns business status code(1000:success)
msg
String
Interface returns status information
data
Object
{_id:"",url: "",job_id: ""}
_id: Interface returns data url: faceswwap result url job_id: Task processing unique id
Example
Body
Copy
{ "targetImage": [ // Replacement target image information { "path": "https://d21ksh0k4smeql.cloudfront.net/crop_1695201103793-0234-0-1695201106985-2306.png", // Links to faces detected in target images "opts": "2804,2182:3607,1897:3341,2566:3519,2920" // Key information of the face detected in the target image【You can get it through the face https://sg3.akool.com/detect API,You can get the landmarks_str value returned by the api interface as the value of opts } ], "face_reage":10,// [-30,30] "modifyImage": "https://d3t6pcz7y7ey7x.cloudfront.net/material1__a92671d0-7960-4028-b2fc-aadd3541f32d.jpg", // Modify the link address of the image "webhookUrl":"http://localhost:3007/api/webhook" // Callback url address based on HTTP request}
{ "code": 1000, // Interface returns business status code "msg": "Please be patient! If your results are not generated in three hours, please check your input image.", // Interface returns status information "data": { "_id": "6593c94c0ef703e8c055e3c8", // Interface returns data "url": "https://***.cloudfront.net/final_71688047459_.pic-1704184129269-4947-f8abc658-fa82-420f-b1b3-c747d7f18e14-8535.jpg", // faceswwap result url "job_id": "20240102082900592-5653" // Task processing unique id }}
POST https://openapi.akool.com/api/open/v3/faceswap/highquality/vidreage
Request Headers
Parameter
Value
Description
Authorization
Bearer {token}
Your API Key used for request authorization.getToken
Body Attributes
Parameter
Type
Value
Description
targetImage
Array
[]
Replacement target image information(Each array element is an object, and the object contains 2 properties, path:Links to faces detected in target images. opts: Key information of the face detected in the target image【You can get it through the face https://sg3.akool.com/detect API, You can get the landmarks_str value returned by the api interface as the value of opts)
face_reage
Int
[-30,30]
Reage ranges
modifyVideo
String
Modify the link address of the video
webhookUrl
String
Callback url address based on HTTP request
Response Attributes
Parameter
Type
Value
Description
code
int
1000
Interface returns business status code (1000: success)
msg
String
Interface returns status information
data
Object
{ _id: "", url: "", job_id: "" }
_id: Interface returns data, url: faceswap result url, job_id: Task processing unique id
Example
Body
Copy
{ "targetImage": [ // Replacement target image information { "path": "https://static.website-files.org/assets/images/faceswap/crop_1719224038759-3888-0-1719224039439-1517.jpg", // Links to faces detected in target images "opts": "1408,786:1954,798:1653,1091:1447,1343" // Key information of the face detected in the target image【You can get it through the face https://sg3.akool.com/detect API,You can get the landmarks_str value returned by the api interface as the value of opts } ], "face_reage":10,// [-30,30] "modifyVideo": "https://d3t6pcz7y7ey7x.cloudfront.net/Video10__d2a8cf85-10ae-4c2d-8f4b-d818c0a2e4a4.mp4", // Modify the link address of the video "webhookUrl":"http://localhost:3007/api/webhook" // Callback url address based on HTTP request}
Request
Copy
curl --location 'https://openapi.akool.com/api/open/v3/faceswap/highquality/vidreage' \--header 'Authorization: Bearer token' \--header 'Content-Type: application/json' \--data '{ "targetImage": [ // Replacement target image information { "path": "https://static.website-files.org/assets/images/faceswap/crop_1719224038759-3888-0-1719224039439-1517.jpg", // Links to faces detected in target images "opts": "1408,786:1954,798:1653,1091:1447,1343" // Key information of the face detected in the target image【You can get it through the face https://sg3.akool.com/detect API,You can get the landmarks_str value returned by the api interface as the value of opts } ], "face_reage":10,// [-30,30] "modifyVideo": "https://d3t6pcz7y7ey7x.cloudfront.net/Video10__d2a8cf85-10ae-4c2d-8f4b-d818c0a2e4a4.mp4", // Modify the link address of the video "webhookUrl":"http://localhost:3007/api/webhook" // Callback url address based on HTTP request}'
Response
Copy
{ "code": 1000, // Interface returns business status code "msg": "Please be patient! If your results are not generated in three hours, please check your input image.", // Interface returns status information "data": { "_id": "6593c94c0ef703e8c055e3c8", // Interface returns data "url": "https://***.cloudfront.net/final_71688047459_.pic-1704184129269-4947-f8abc658-fa82-420f-b1b3-c747d7f18e14-8535.jpg", // faceswwap result url "job_id": "20240102082900592-5653" // Task processing unique id }}
faceswap_status: faceswap result status (1 In Queue, 2 Processing, 3 Success, 4 Failed), url: faceswap result url, createdAt: current faceswap action created time
Interface returns business status code (1000: success)
msg
String
Interface returns status information
Example
Body
Copy
{ "job_ids":"" // task id, You can get it by returning the job_id field based on [https://openapi.akool.com/api/open/v3/faceswap/highquality/specifyimage](https://docs.akool.com/ai-tools-suite/reage#image-reage) or [https://openapi.akool.com/api/open/v3/faceswap/highquality/specifyvideo](https://docs.akool.com/ai-tools-suite/reage#video-reage) api.}