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. The same key upscales photos to 2K, 4K or 8K.

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

Launch

curl -X POST "https://faceswap.ing/api/v1/faceswap/tasks" \
  -H "x-api-key: $FACESWAP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "faceImageUrl": "https://example.com/face.jpg",
    "targetFiles": [{ "url": "https://example.com/photo.jpg" }]
  }'
const API = "https://faceswap.ing/api/v1";
const headers = { "x-api-key": process.env.FACESWAP_API_KEY };

const response = await fetch(`${API}/faceswap/tasks`, {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({
    faceImageUrl: "https://example.com/face.jpg",
    targetFiles: [{ url: "https://example.com/photo.jpg" }],
  }),
  // Every file is screened before anything is priced: allow a minute.
  signal: AbortSignal.timeout(120_000),
});

const launch = await response.json();

// A refusal is an application/problem+json document: branch on its code.
if (!response.ok) throw new Error(`${response.status} ${launch.code}: ${launch.detail ?? launch.title}`);

// Set when the launch stopped part-way: data still lists the tasks it created.
if (launch.refusal) console.warn(launch.refusal.code, launch.refusal.detail);

const taskIds = launch.data.map((task) => task.taskId);
import os
import time

import requests

API = "https://faceswap.ing/api/v1"
HEADERS = {"x-api-key": os.environ["FACESWAP_API_KEY"]}

response = requests.post(
    f"{API}/faceswap/tasks",
    headers=HEADERS,
    json={
        "faceImageUrl": "https://example.com/face.jpg",
        "targetFiles": [{"url": "https://example.com/photo.jpg"}],
    },
    # Every file is screened before anything is priced: allow a minute.
    timeout=120,
)
launch = response.json()

# A refusal is an application/problem+json document: branch on its code.
if not response.ok:
    raise RuntimeError(f"{response.status_code} {launch['code']}: {launch.get('detail', launch['title'])}")

# Set when the launch stopped part-way: data still lists the tasks it created.
if launch["refusal"]:
    print(launch["refusal"]["code"], launch["refusal"].get("detail"))

task_ids = [task["taskId"] for task in launch["data"]]

Response, shortened

json
{
  "data": [
    {
      "taskId": "01a08066-5d70-7000-a3db-ff3ef6b651ca",
      "status": "queued",
      "files": [
        {
          "id": "01a08066-5d70-7fff-9e92-493cc98e0da6",
          "status": "pending",
          "targetUrl": "https://example.com/photo.jpg",
          "outputUrl": null
        }
      ]
    }
  ],
  "refusal": null
}

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.

Upscaling photos

One POST enlarges up to 50 photos to 2K, 4K or 8K, from a URL you host or a swap your team made. It has its own routes and its own webhook event.

7 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.
  • POST /api/v1/upscalesUpscale photos to 2K, 4K or 8K.
  • GET /api/v1/upscalesList your upscales.
  • GET /api/v1/upscales/:upscaleIdRead one upscale and its status.

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

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 1440p and 4 min 30 s up to 4K.
Webhooks
Signed with HMAC-SHA256. A delivery that fails is tried again, up to 6 attempts in all.

$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.

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

Fits the pipeline you already run

Plain HTTPS and JSON with one header. A batch script, a queue worker or an HTTP step in n8n, Make or Zapier can launch swaps and collect the results, and a signed webhook tells your system when each task ends.

  • QuickstartA first swap in curl, JavaScript or Python, then polling, webhooks, retries and batches.
  • Interactive referenceEvery endpoint and field, with generated code and a request you can send with your key.
  • Agent skillA skill for Claude, and a Markdown file and an OpenAPI document any other agent can read.

From the blog: Face swap is not dead in 2026, and agencies are the reason