This API endpoint seamlessly integrates a face image into a target video, allowing you to replace the face in the video with the face from the image.
Pricing: $0.0005 / Video Frame
Bearer authentication format, for example: Bearer {{API Key}}.
Request Body
Optional extra parameters for the request. The returned video type. Default is mp4.
Enum: mp4
, gif
Upload your input video to our temporary secure storage following the instructions in the guide Get video assets id , and the video_assets_id is the identifier for your input video. Supported video formats: MP4, with a maximum resolution of 3840 x 2160 and a maximum file size of 100 Mb. Whether to restore the output face image. If enabled, the output face video will be more detailed, but the API latency will be longer.
The base64-encoded face image, with a maximum resolution of 2048 x 2048 and a maximum file size of 30 MB.
Response
Use the task_id to request the Task Result API to retrieve the generated outputs.
Example
1. Get Video Assets ID
Request:
curl -X PUT -T "{{video file path}}" 'https://assets.novitai.com/video'
Response:
{
"assets_id" : "cjIvbm92aXRhLWFpLWFzc2V0L3ZpZGVvL0NLd0N3aHJwS0ZyYVduNWVoejVFV0tleGlzN0toNmRq"
}