Face Swap Video
What this API does
Create the same Face Swap you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
Good for
- Automation and batch processing
- Adding face swap into apps, pipelines, or tools
How it works (3 steps)
- Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.
- Send a request to create a face swap job with the basic fields.
- Check the job status until it's complete, then download the result from downloads.
Key options
- Inputs: usually a file, sometimes a YouTube link, depending on project type
- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
- Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt
Cost
Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
For detailed examples, see the product page.
Request body
Example request
{
"name": "My Face Swap video",
"end_seconds": 15,
"style": {
"version": "default"
},
"assets": {
"face_swap_mode": "all-faces",
"image_file_path": "image/id/1234.png",
"face_mappings": [
{
"original_face": "api-assets/id/0-0.png",
"new_face": "api-assets/id/1234.png"
}
],
"video_source": "file",
"video_file_path": "api-assets/id/1234.mp4"
}
}Response
Success
Example response
{
"id": "cuid-example",
"credits_charged": 450
}Changes
Changed in 3 of the 58 revisions of this API.129
- ○
added the non-success response with the status
response-non-success-status-added
- ○
removed the
Not Foundenum value from theresponse property for the response statusresponse-property-enum-value-removed
- ○
removed the
Unauthorizedenum value from theresponse property for the response statusresponse-property-enum-value-removed
- ○
added the required property
to the response with the statusresponse-required-property-added
- ○
added the required property
to the response with the statusresponse-required-property-added
- ○
added the required property
to the response with the statusresponse-required-property-added
- ○
added the required property
to the response with the statusresponse-required-property-added
- ○
added the required property
to the response with the statusresponse-required-property-added
- ○
- ○
added the non-success response with the status
response-non-success-status-added
- ○
- ▲
removed the required property
from the response with the statusresponse-required-property-removed
- ●
removed the request property
request-property-removed
- ●
removed the request property
request-property-removed
- ▲