# Video Merge Face - Documentation

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown is available with `Accept: text/markdown` and `.md` URL variants.

Source: /docs/api-reference/model-apis-video-merge-face

# Video Merge Face

POST

/

v3

/

async

/

video-merge-face

Try it

Video Merge Face

cURL

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

200

```
{
"task_id": "&#x3C;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)

Request Headers

[​](#param-content-type)

Content-Type

string

required

Enum: `application/json`

[​](#param-authorization)

Authorization

string

required

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

##

[​](#request-body)

Request Body

[​](#param-extra)

extra

object

Optional extra parameters for the request.

Show properties

[​](#param-response-video-type)

response_video_type

string

The returned video type. Default is mp4.

Enum: `mp4`, `gif`

[​](#param-request)

request

object

required

Hide properties

[​](#param-video-assets-id)

video_assets_id

string

required

Upload your input video to our temporary secure storage following the instructions in the guide [Get video assets id](#_1-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.

[​](#param-enable-restore)

enable_restore

boolean

required

Whether to restore the output face image. If enabled, the output face video will be more detailed, but the API latency will be longer.

[​](#param-face-image-base64)

face_image_base64

string

required

The base64-encoded face image, with a maximum resolution of 2048 x 2048 and a maximum file size of 30 MB.

##

[​](#response)

Response

[​](#param-task-id)

task_id

string

Use the task_id to request the [Task Result API](/docs/api-reference/model-apis-task-result) to retrieve the generated outputs.

##

[​](#example)

Example

###

[​](#1-get-video-assets-id)

1. Get Video Assets ID

`Request:`

```
curl -X PUT -T "{{video file path}}" 'https://assets.novitai.com/video'
```

`Response:`

```
{
"assets_id": "cjIvbm92aXRhLWFpLWFzc2V0L3ZpZGVvL0NLd0N3aHJwS0ZyYVduNWVoejVFV0tleGlzN0toNmRq"
}
```

Last modified on December 26, 2024
