Create task
curl --request POST \
--url https://gengen.farm/api/gengen/v1/wan-face-swaps/generations \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan-face-swap",
"assets": {
"targetImage": "https://example.com/target-photo.png",
"faceImage": "https://example.com/source-face.png"
},
"controls": {
"seed": 42
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/wan-face-swaps/generations"
payload = {
"model": "wan-face-swap",
"assets": {
"targetImage": "https://example.com/target-photo.png",
"faceImage": "https://example.com/source-face.png"
}
}
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({
model: 'wan-face-swap',
assets: {
targetImage: 'https://example.com/target-photo.png',
faceImage: 'https://example.com/source-face.png'
}
})
};
fetch('https://gengen.farm/api/gengen/v1/wan-face-swaps/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "wanfaceswap:550e8400-e29b-41d4-a716-446655440000",
"model": "wan-face-swap",
"status": "pending",
"outputs": {
"images": []
},
"createdAt": "2026-07-21T08:00:00.000Z",
"updatedAt": "2026-07-21T08:00:00.000Z",
"statusUpdateTime": "2026-07-21T08:00:00.000Z"
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}Image API
Create a Wan face swap task
Create an asynchronous Wan face swap task from two source images.
POST
/
wan-face-swaps
/
generations
Create task
curl --request POST \
--url https://gengen.farm/api/gengen/v1/wan-face-swaps/generations \
--header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"model": "wan-face-swap",
"assets": {
"targetImage": "https://example.com/target-photo.png",
"faceImage": "https://example.com/source-face.png"
},
"controls": {
"seed": 42
}
}'import requests
url = "https://gengen.farm/api/gengen/v1/wan-face-swaps/generations"
payload = {
"model": "wan-face-swap",
"assets": {
"targetImage": "https://example.com/target-photo.png",
"faceImage": "https://example.com/source-face.png"
}
}
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({
model: 'wan-face-swap',
assets: {
targetImage: 'https://example.com/target-photo.png',
faceImage: 'https://example.com/source-face.png'
}
})
};
fetch('https://gengen.farm/api/gengen/v1/wan-face-swaps/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "wanfaceswap:550e8400-e29b-41d4-a716-446655440000",
"model": "wan-face-swap",
"status": "pending",
"outputs": {
"images": []
},
"createdAt": "2026-07-21T08:00:00.000Z",
"updatedAt": "2026-07-21T08:00:00.000Z",
"statusUpdateTime": "2026-07-21T08:00:00.000Z"
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}{
"error_code": "<string>",
"error": "<string>",
"error_params": {}
}Authorizations
A workspace API key beginning with gengen_live_.
Body
application/json
⌘I