Face swap

Put your face into a video or a picture

Puts the face of a photo into a video (up to 15 s) or a picture. Two engines: wan-replace (video — the person in the video becomes the one in the photo, the scene's light and colour kept; 480p / 580p / 720p) and seedream (picture — the face of the photo on the person in the picture, the pose, clothes and scene kept; hair keeps the photo's hair or the picture's). engine: "auto" (the default) picks the one for the target; name one to compare them.

Rules, always on:

  • consent (or consent_id) is required: the face is yours, or the person gave you explicit permission. It is stored with the time, your account and the files.
  • The face is checked before anything is made: a well-known public figure (a politician, a celebrity…) is refused with public_figure_refused, a person who appears to be under 18 with minor_refused. A refused request is not charged.
  • Every result is marked as AI-generated inside the file (IPTC trainedAlgorithmicMedia, a comment), and — unless you send visible_label: false — carries a small "AI" mark in the corner.
  • Each run is logged (who, which face, which target, which engine); the face is kept 30 days, then deleted. The result is kept 24 hours.
  • The answer has abuse_report: where anyone can report a misuse of the file.

Asynchronous: wait with x-wait-ms or poll GET /v1/executions/{id}. Price: per second of the output video by resolution (a picture: one price), plus the face check — see the estimate first (POST /v1/ai/face-swap/estimate).

Billing: Per second of the output video, by resolution (a picture: one price per picture), plus the face's safety check. A refused or failed request is not charged. · Rate limit: 6/min · Asynchronous

post/v1/ai/face-swap

Request

  • Base URL: https://apihub.co.il
  • URL: https://apihub.co.il/v1/ai/face-swap
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Replay-safe: the same execution is returned instead of charging twice

X-Tagstring

Group calls into one job (e.g. one video) — see GET /v1/usage?tag=…

x-wait-msinteger

Wait for the job inside this call (ms)

Request body

hair'face' | 'target'

The picture engine: keep the hair of the face photo (face) or of the target (target)

seedinteger

Repeat a result exactly

engine'auto' | 'wan-replace' | 'seedream'

auto (the default) = the better engine for the target: wan-replace for a video (the person in the video becomes the one in the photo, the scene's light kept), seedream for a picture (the face of the photo on the person in the picture, the pose, clothes and scene kept). Name one to compare them

gender'male' | 'female' | 'non-binary'

The person in face_url — an optional hint for the picture engine

face_urlstring uri required

A clear photo of the face to put in — your own, or of a person who gave you explicit permission (PNG / JPEG / WebP, one face, up to 15 MB). It is checked first: a public figure or a person who appears to be under 18 is refused

consent_idstring

A consent you recorded before (the dashboard records one when you tick the box)

resolution'480p' | '580p' | '720p'

A video's output resolution (wan-replace). 480p is the cheapest; the price per second grows with it

target_urlstring uri required

The video (up to 15 s) or the picture to put the face into (public https link — upload it first if needed)

target_type'video' | 'image'

Whether target_url is a video or a picture — read from the file when omitted

visible_labelboolean

Draw a small "AI" mark in the corner (on by default). The file is always marked as AI-generated in its metadata

duration_secondsnumber

The video's length if you know it (only for the estimate; the charge uses the real length)

Response

Completed (or 202 while processing)

idstring

Execution id — stable across internal retries; use it with GET /v1/executions/{id}

status'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
operationstring
tagstring nullable

Your X-Tag, if sent

created_atstring date-time
completed_atstring date-time nullable
outputobject

Operation result (see each operation). While a Studio render is processing: stage (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), phase (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), progress (a percent, 0–100) and progress_fraction (0–1), eta_seconds (seconds left, never below 0) and estimate_seconds

errorstring nullable

Changes

No recorded changes to this operation across all 2 revisions of this API.