- Before using the API, make sure you have obtained the API key. Refer to the link below for instructions on how to obtain it. API For API Key Settings
- All generated images will be automatically deleted after 24 hours. Please make sure to save the images you need to your local storage in a timely manner.
- Regular users are limited to creating a maximum of 20 Face Swap tasks per minute.
- Once this limit is reached, a 429000 error code will be returned.
- Fetch Job does not have this limitation.
- If you would like to create more tasks per minute, please contact us:
[email protected]
Parameter | Description |
---|
Authorization | Your API Key used for request authorization. |
--request POST https://developer.remaker.ai/api/remaker/v1/face-swap/create-job
Parameter | Description |
---|
target_image | Face to be replaced(binary ) |
swap_image | Your Face(binary ) |
import requests
url = 'https://developer.remaker.ai/api/remaker/v1/face-swap/create-job'
headers = {
'accept': 'application/json',
'Authorization': 'your token',
}
files = {
'target_image': open('demo1.jpg', 'rb'),
'swap_image': open('demo2.jpg', 'rb')
}
response = requests.post(url, headers=headers, files=files)
print(response.json()) # Print the response content
--request GET https://developer.remaker.ai/api/remaker/v1/face-swap/{job_id}
Parameter | Description |
---|
job_id | job_id returned by create task |
import requests
url = 'https://developer.remaker.ai/api/remaker/v1/face-swap/224a9f67-5fc3-4c31-b33f-e611de310aa9'
headers = {
'accept': 'application/json',
'Authorization': 'your token',
}
response = requests.get(url, headers=headers)
print(response.json()) # Print the response content
{
"code": 100000,
"result": {
"job_id": "dcc56c3d-4686-4961-bb9f-81f030cd9777"
},
"message": {
"en": "Request Success."
}
}
{
"code": 100000,
"result": {
"output_image_url": [
"https://image.remaker.ai/datarm/api/face-swap/api/2024-03-05/output/0ba36469-0184-4f7b-b1f6-2a0e4d661d40.png"
],
"input_image_url": [
"https://image.remaker.ai/datarm/api/face-swap/api/2024-03-05/input/1dbdd84e-1cd9-4a53-8cf0-ac4cc6b5dd5e.png",
"https://image.remaker.ai/datarm/api/face-swap/api/2024-03-05/input/9cb17f53-354b-4af0-819a-d5e70e935fa6.png"
],
"job_id": "dcc56c3d-4686-4961-bb9f-81f030cd9777",
"message": ""
},
"message": {
"en": "Image generated successfully."
}
}