Skip to main content
POST
/
v2
/
thumbnail
/
faceswap
cURL
curl -X POST "https://api.pikzels.com/v2/thumbnail/faceswap" \
  -H "X-Api-Key: pkz_yourapikey" \
  -H "Content-Type: application/json" \
  --data-raw '{
  "image_url": "https://cdn.pikzels.com/example.png",
  "image_base64": "I bought my own island",
  "face_image": "https://cdn.pikzels.com/example.png",
  "face_image_base64": "I bought my own island",
  "format": "16:9"
}'
{
  "output": "https://cdn.pikzels.com/example.png",
  "request_id": "18b2ad5e-2a9e-4d3f-b9a8-9f2a1e0b1234"
}

Headers

X-Api-Key
string
required

Your Pikzels API key (prefix: pkz_)

Body

application/json
image_url
string
required

Target image, HTTPS URL -- provide this or image_base64

image_base64
string
required

Target image, base64 data URL -- provide this or image_url

face_image
string
required

Face to swap in, HTTPS URL -- provide this or face_image_base64

face_image_base64
string
required

Face to swap in, base64 data URL -- provide this or face_image

format
string
required

Allowed values: "16:9", "9:16", "1:1".

mask_url
string

Optional mask selecting which face(s) or region to target, HTTPS URL -- provide this or mask_base64

mask_base64
string

Optional mask selecting which face(s) or region to target, base64 data URL -- provide this or mask_url

Response

Success

output
string

URL to generated thumbnail (expires in 24h)

request_id
string