Face swap based on the provided image.
curl --request POST \
--url https://api.acedata.cloud/face/swap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timeout": 123,
"callback_url": "<string>",
"async": true,
"source_image_url": "https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg",
"target_image_url": "https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg"
}
'import requests
url = "https://api.acedata.cloud/face/swap"
payload = {
"timeout": 123,
"callback_url": "<string>",
"async": True,
"source_image_url": "https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg",
"target_image_url": "https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timeout: 123,
callback_url: '<string>',
async: true,
source_image_url: 'https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg',
target_image_url: 'https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg'
})
};
fetch('https://api.acedata.cloud/face/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"task_id": "<string>",
"image_url": "<string>",
"image_width": "<string>",
"image_height": "<string>"
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "forbidden",
"message": "Sorry! Our Al moderators feel your prompt might be against our community standards."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "timeout",
"message": "Timeout to generate the image."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}API Reference
Face swap based on the provided image.
POST
/
face
/
swap
Face swap based on the provided image.
curl --request POST \
--url https://api.acedata.cloud/face/swap \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"timeout": 123,
"callback_url": "<string>",
"async": true,
"source_image_url": "https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg",
"target_image_url": "https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg"
}
'import requests
url = "https://api.acedata.cloud/face/swap"
payload = {
"timeout": 123,
"callback_url": "<string>",
"async": True,
"source_image_url": "https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg",
"target_image_url": "https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
timeout: 123,
callback_url: '<string>',
async: true,
source_image_url: 'https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg',
target_image_url: 'https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg'
})
};
fetch('https://api.acedata.cloud/face/swap', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"success": true,
"task_id": "<string>",
"image_url": "<string>",
"image_width": "<string>",
"image_height": "<string>"
}{
"error": {
"code": "token_mismatched",
"message": "The specified token is not matched with API."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "invalid_token",
"message": "The specified token is invalid or wrong."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "forbidden",
"message": "Sorry! Our Al moderators feel your prompt might be against our community standards."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "too_many_requests",
"message": "You have exceeded the rate limit."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "api_error",
"message": "Internal server error."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}{
"error": {
"code": "timeout",
"message": "Timeout to generate the image."
},
"trace_id": "2efa9340-b21b-4e26-9e14-4aac95f343ab"
}인증
API token from https://platform.acedata.cloud
헤더
Face Swap Param Accept
사용 가능한 옵션:
application/json, application/x-ndjson 본문
application/json
Face Swap Timeout
Face Swap Callback Url
Face Swap Async
Face Swap Source Image Url
예시:
"https://i.ibb.co/m9BFL9J/ad61a39afd9079e57a5908c0bd9dd995.jpg"
Face Swap Target Image Url
예시:
"https://i.ibb.co/LnLYwhR/66f41e64b1922.jpg"

