POST
/
v3
/
async
/
video-merge-face
curl --request POST \
  --url https://api.novita.ai/v3/async/video-merge-face \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '{
  "extra": {
    "response_video_type": "<string>"
  },
  "request": {
    "video_assets_id": "<string>",
    "enable_restore": true,
    "face_image_base64": "<string>"
  }
}'
{
  "task_id": "<string>"
}

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

Request Headers

Content-Type
string
required

Enum: application/json

Authorization
string
required

Bearer authentication format, for example: Bearer {{API Key}}.

Request Body

extra
object

Optional extra parameters for the request.

request
object
required

Response

task_id
string

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"
}