Change Gender
curl --request POST \
--url https://api.acedata.cloud/face/change-gender \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
"gender_infos": [
{
"gender": 1,
"face_rect": {
"x": 784,
"y": 503,
"width": 274,
"height": 228
}
}
]
}
'import requests
url = "https://api.acedata.cloud/face/change-gender"
payload = {
"image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
"gender_infos": [
{
"gender": 1,
"face_rect": {
"x": 784,
"y": 503,
"width": 274,
"height": 228
}
}
]
}
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({
image_url: 'https://cdn.acedata.cloud/4hfydw.jpg',
gender_infos: [{gender: 1, face_rect: {x: 784, y: 503, width: 274, height: 228}}]
})
};
fetch('https://api.acedata.cloud/face/change-gender', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"image_url": "https://faceeffect-1254418846.cos.ap-guangzhou.myqcloud.com/ft/SwapGenderPic/1256437459/022636b0-e682-4be6-88c4-461bffa77aae"
}{
"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": "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"
}API Reference
Change Gender
Users upload a face picture, based on the face editing and generation algorithm, output a face gender conversion picture. Male to female can achieve beauty, light makeup, add bangs and long hair effect; Female to male can achieve the effect of adding a beard and changing short hair.
POST
/
face
/
change-gender
Change Gender
curl --request POST \
--url https://api.acedata.cloud/face/change-gender \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
"gender_infos": [
{
"gender": 1,
"face_rect": {
"x": 784,
"y": 503,
"width": 274,
"height": 228
}
}
]
}
'import requests
url = "https://api.acedata.cloud/face/change-gender"
payload = {
"image_url": "https://cdn.acedata.cloud/4hfydw.jpg",
"gender_infos": [
{
"gender": 1,
"face_rect": {
"x": 784,
"y": 503,
"width": 274,
"height": 228
}
}
]
}
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({
image_url: 'https://cdn.acedata.cloud/4hfydw.jpg',
gender_infos: [{gender: 1, face_rect: {x: 784, y: 503, width: 274, height: 228}}]
})
};
fetch('https://api.acedata.cloud/face/change-gender', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"image_url": "https://faceeffect-1254418846.cos.ap-guangzhou.myqcloud.com/ft/SwapGenderPic/1256437459/022636b0-e682-4be6-88c4-461bffa77aae"
}{
"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": "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"
}授权
API token from https://platform.acedata.cloud
请求头
Face Change Gender Param Accept
可用选项:
application/json, application/x-ndjson 请求体
application/json
响应
Face Change Gender Response 200
Face Change Gender Response 200 Image Url
⌘I

