POST
/
v1
/
lip-sync
curl --request POST \
  --url https://api.magichour.ai/v1/lip-sync \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Lip Sync video",
  "height": 960,
  "width": 512,
  "start_seconds": 0,
  "end_seconds": 15,
  "max_fps_limit": 12,
  "assets": {
    "audio_file_path": "api-assets/id/1234.mp3",
    "video_source": "file",
    "video_file_path": "api-assets/id/1234.mp4",
    "youtube_url": "<string>"
  }
}'
{
  "id": "clx7uu86w0a5qp55yxz315r6r",
  "estimated_frame_cost": 450
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
Body
height
integer
required

The height of the final output video. The maximum height depends on your subscription. Please refer to our pricing page for more details

Required range: x >= 64
Example:

960

width
integer
required

The width of the final output video. The maximum width depends on your subscription. Please refer to our pricing page for more details

Required range: x >= 64
Example:

512

start_seconds
number
required

The start time of the input video in seconds

Required range: x >= 0
Example:

0

end_seconds
number
required

The end time of the input video in seconds

Required range: x >= 0.1
Example:

15

assets
object
required

Provide the assets for lip-sync. For video, The video_source field determines whether video_file_path or youtube_url field is used

name
string
default:Lip Sync - dateTime

The name of video

Example:

"Lip Sync video"

max_fps_limit
number

Defines the maximum FPS (frames per second) for the output video. If the input video's FPS is lower than this limit, the output video will retain the input FPS. This is useful for reducing unnecessary frame usage in scenarios where high FPS is not required.

Required range: x >= 1
Example:

12

Response

200
application/json

Success

id
string
required

Unique ID of the video. This value can be used in the get video project API to fetch additional details such as status

Example:

"clx7uu86w0a5qp55yxz315r6r"

estimated_frame_cost
integer
required

Estimated cost of the video in terms of number of frames needed to render the video. Frames will be adjusted when the video completes

Example:

450