curl --location --request POST 'https://api.pikzels.com/v1/faceswap' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_url": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d",
"face_url": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80"
}'
{
"output": "https://media.pikzels.com/temp/faceswap_3e4f5a6b7c8d.jpeg"
}
Seamlessly swap faces between images
curl --location --request POST 'https://api.pikzels.com/v1/faceswap' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_url": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d",
"face_url": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80"
}'
{
"output": "https://media.pikzels.com/temp/faceswap_3e4f5a6b7c8d.jpeg"
}
curl --location --request POST 'https://api.pikzels.com/v1/faceswap' \
--header 'X-Api-Key: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
"image_url": "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d",
"face_url": "https://images.unsplash.com/photo-1438761681033-6461ffad8d80"
}'
{
"output": "https://media.pikzels.com/temp/faceswap_3e4f5a6b7c8d.jpeg"
}
{
"error": {
"code": "ERROR_CODE_HERE",
"message": "Human readable message",
"details": "Additional context"
}
}
| Status Code | Code | Description |
|---|---|---|
| 400 | BAD_REQUEST | Invalid or missing fields |
| 400 | CONTENT_POLICY_VIOLATION | Request violates content policy |
| 401 | INVALID_AUTH_HEADER | Invalid API Key |
| 402 | INSUFFICIENT_BALANCE | Not enough credits |
| 429 | CONCURRENT_LIMIT_EXCEEDED | Too many concurrent requests |
| 500 | INTERNAL_ERROR | Server problem |
| 503 | MAINTENANCE_ACTIVE | Under maintenance |
| Status Code | Code | Description |
|---|---|---|
| 400 | INVALID_ORIGINAL_IMAGE | Target image is missing, corrupted, or contains no face |
| 400 | INVALID_FACE_IMAGE | Source face image is missing, corrupted, or contains no face |