Face swap

Put your face into a video or a picture — estimate

Price the request without executing it. Same body as POST /v1/ai/face-swap.

post/v1/ai/face-swap/estimate

Request

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

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

Estimate

operationstring
estimated_creditsnumber
credits_to_reservenumber
estimated_usageobject
notestring nullable
sufficientboolean

Changes

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