Face swap API.Photos and video, from your own code.

Send a face and the files to put it in. Poll the task, or take a signed webhook when it finishes. It is the same engine as the app at the same prices, paid from the prepaid swapz in the wallet your key is bound to.

Create a key

4 endpoints and an x-api-key header. Read the reference

How a task runs.

Launch
One POST starts a task with a face and up to 200 target files. Photos and videos can share it.
Result
Read the task until it finishes, or take a signed webhook when it does.
Wallet
A key is bound to one wallet and spends its prepaid swapz. Prices are the same as in the app.

4 endpoints, one header.

Every request carries your key in the x-api-key header.

  • GET /api/v1/facesList the faces saved in the key's team.
  • POST /api/v1/faceswap/tasksLaunch a swap on photos and videos.
  • GET /api/v1/faceswap/tasksList your tasks.
  • GET /api/v1/faceswap/tasks/:taskIdRead one task and its status.

An OpenAPI document is served at /api/v1/openapi.json.

$0.05 a photo, from $0.03 a second of video.

One swapz is $0.01. A call costs what the swap costs. There is no fee per request.

Prices per photo and per second of video
One photo5 swapz$0.05
A photo, in a task of 20 or more3 swapz$0.03
A second of 480p video, up to 0.6 MP a frame3 swapz$0.03
A second of 720p video, up to 1 MP a frame4 swapz$0.04
A second of 1080p video, up to 2.3 MP a frame6 swapz$0.06
A second of 1440p video, up to 4 MP a frame9 swapz$0.09
A second of 4K video, up to 8.9 MP a frame15 swapz$0.15

List prices, before options. A video is billed for at least 10 seconds. A task reserves its price at launch and settles once, against the generations that completed, so a generation that fails is refunded. See every price

30 launches every 60 seconds, up to 200 files each.

Reads
120 requests every 60 seconds for each key.
Launches
30 task launches every 60 seconds for each key, counted apart from reads.
Over the limit
The request is answered 429 with a Retry-After header that says when to try again.
Files per task
Up to 200 target files and 4 GB of input.
Photos
Up to 50 MB and 50 MP each.
Video
Up to 1 GB a file and 8.9 MP a frame. The longest clip depends on the frame: 5 min up to 720p, 3 min up to 1080p, 1 min 50 s up to 1440p, and 50 s up to 4K.
Webhooks
Signed with HMAC-SHA256. A delivery that fails is tried again, up to 6 attempts in all.

One request starts a swap.

Put in your key and two URLs of your own.

curl -X POST "https://faceswap.ing/api/v1/faceswap/tasks" \
  -H "x-api-key: fsper_YOUR_KEY" \
  -H "content-type: application/json" \
  -d '{
    "faceImageUrl": "https://example.com/face.jpg",
    "targetFiles": [{ "url": "https://example.com/target.jpg" }]
  }'

The API reference lists every field and every response.