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
x-api-key
API Key
Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.
Authorization
Bearer {token}
Your API Key used for request authorization.Get Token.
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 Face Detect API 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
ExampleBody
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":"" // 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
x-api-key
API Key
Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.
Authorization
Bearer {token}
Your API Key used for request authorization.Get Token.
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 Face Detect API 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
ExampleBody
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":"" // Callback url address based on HTTP request}
Request
Copy
curl --location 'https://openapi.akool.com/api/open/v3/faceswap/highquality/vidreage' \--header "x-api-key: {{API Key}}" \--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":"" // 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 }}
GET https://openapi.akool.com/api/open/v3/faceswap/result/listbyids?_ids=64ef2f27b33f466877701c6a
Request Headers
Parameter
Value
Description
x-api-key
API Key
Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.
Authorization
Bearer {token}
Your API Key used for request authorization.Get Token.
Query Attributes
Parameter
Type
Value
Description
_ids
String
Result ids are strings separated by commas. You can get it by returning the _id field from Image Reage API or Video Reage API api.
Response Attributes
Parameter
Type
Value
Description
code
int
1000
Interface returns business status code (1000: success)
faceswap_status: faceswap result status (1 In Queue, 2 Processing, 3 Success, 4 Failed), url: faceswap result url, createdAt: current faceswap action created time
POST https://openapi.akool.com/api/open/v3/faceswap/job/del
Request Headers
Parameter
Value
Description
x-api-key
API Key
Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.
Authorization
Bearer {token}
Your API Key used for request authorization.Get Token.
Interface returns business status code (1000: success)
msg
String
Interface returns status information
ExampleBody
Copy
{ "job_ids":"" // task id, You can get it by returning the job_id field based on [Image Reage API](/ai-tools-suite/reage#image-reage) or [Video Reage API](/ai-tools-suite/reage#video-reage) api.}