Swap faces in an existing video
face_swap_create_videoUse only with the user's own likeness or content they are authorized to use. Do not use for impersonation, deception, sexual content, or content involving minors.
MCP guidance:
Starts an async video job; returns
idandcredits_charged. For finished results, callwait_for_video_projectwith that id or pollGET /v1/video-projects/{id}untilcomplete,error, orcanceled. Results includedownloads; wait helpers addexact_download_urls. Preserve signed URLs and query parameters; never append expiration metadata.For
*_file_path, use an existing Magic Hour path or the upload-URL endpoint'sfile_pathafter uploading raw bytes to its presigned URL. Direct public media URLs may work if stable and fetchable as raw bytes; hotlinked URLs can fail. Prefer the upload-URL endpoint when unsure.
Requires start_seconds, end_seconds and assets.video_source with its matching assets.video_file_path or assets.youtube_url. Use assets.image_file_path for all-faces mode, or assets.face_mappings for individual-faces mode after face detection. Generation consumes credits; the queued video charge is an estimate, with the final charge available on the completed project.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Give your video a custom name for easy identification. | Face Swap - dateTime |
| style | No | Style of the face swap video. | |
| assets | Yes | Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used | |
| end_seconds | Yes | End time of your clip (seconds). Must be greater than start_seconds. | |
| start_seconds | Yes | Start time of your clip (seconds). Must be ≥ 0. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads. | |
| credits_charged | Yes | The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video. If video generation fails, credits will be refunded, and this field will be updated to include the refund. |