Skip to main content
Glama

Lip-sync existing video to replacement audio

lip_sync_create_video

Use 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 id and credits_charged. For finished results, call wait_for_video_project with that id or poll GET /v1/video-projects/{id} until complete, error, or canceled. Results include downloads; wait helpers add exact_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's file_path after 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.

Match existing video to replacement audio. Requires assets.audio_file_path, assets.video_source and its matching assets.video_file_path or assets.youtube_url, plus start_seconds and end_seconds. For a still portrait plus audio, use ai_talking_photo_create_talking_photo. Text alone is not an audio input. Generation consumes credits; the queued video charge is an estimate, with the final charge available on the completed project.

Input Schema

NameRequiredDescriptionDefault
nameNoGive your video a custom name for easy identification.Lip Sync - dateTime
styleNoAttributes used to dictate the style of the output
assetsYesProvide the assets for lip-sync. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used
end_secondsYesEnd time of your clip (seconds). Must be greater than start_seconds.
max_fps_limitNoDefines 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.
start_secondsYesStart time of your clip (seconds). Must be ≥ 0.

Output Schema

NameRequiredDescriptionDefault
idYesUnique 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_chargedYesThe 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / assets / example
      Added value: +{
      +  "audio_file_path": "api-assets/id/1234.mp3",
      +  "video_file_path": "api-assets/id/1234.mp4",
      +  "video_source": "file"
      +}
    • changedInput schema / properties / end_seconds / example
      Previous value: -15New value: +5
  2. Changed1 schema field changed
    • changedInput schema / properties / style / properties / generation_mode / description
      Previous value: -"A specific version of our lip sync system, optimized for different needs.\n* `lite` -  Fast lip sync - best for simple videos. Costs 1 credit per frame of video.\n* `standard` -  Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video.\n* `pro` -  Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video.\n\nNote: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers.\n              "New value: +"A specific version of our lip sync system, optimized for different needs.\n* `lite` -  Fast lip sync - best for simple videos. Costs 1 credit per frame of video.\n* `standard` -  Natural, accurate lip sync - best for most creators. Requires visible mouth movement in the opening seconds of the input video. Costs 1 credit per frame of video.\n* `pro` -  Premium fidelity with enhanced detail - best for professionals. Requires visible mouth movement in the opening seconds of the input video. Costs 2 credits per frame of video.\n\nIf your source is a still image, including a still image saved as a static video, use [AI Talking Photo](https://docs.magichour.ai/api-reference/video-projects/ai-talking-photo) with the original image and your audio instead.\n\nNote: `pro` is only available for users on Creator, Pro, and Business tiers.\n              "
  3. Changed2 schema fields changed
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      -  "type": "string"
      -}
    • changedInput schema / properties / style / properties / generation_mode / description
      Previous value: -"A specific version of our lip sync system, optimized for different needs.\n* `lite` -  Fast and affordable lip sync - best for simple videos. Costs 1 credit per frame of video.\n* `standard` -  Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video.\n* `pro` -  Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video.\n\nNote: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers.\n              "New value: +"A specific version of our lip sync system, optimized for different needs.\n* `lite` -  Fast lip sync - best for simple videos. Costs 1 credit per frame of video.\n* `standard` -  Natural, accurate lip sync - best for most creators. Costs 1 credit per frame of video.\n* `pro` -  Premium fidelity with enhanced detail - best for professionals. Costs 2 credits per frame of video.\n\nNote: `standard` and `pro` are only available for users on Creator, Pro, and Business tiers.\n              "
  4. Changed1 schema field changed
    • addedInput schema / properties / context
      Added value: +{
      +  "description": "Explain in 15-25 words, in third person, why this tool is called and how it supports the user's goal. For analytics only. You MUST describe only the abstract purpose of the tool call. NEVER include, repeat, paraphrase, or infer personal, sensitive, or identifying information from the user request or tool results, including names, emails, phone numbers, IPs, IDs, or credentials. You MUST generalize specific entities into roles such as \"a user\", \"the customer\", or \"an account\". Example: \"Retrieving a customer's recent orders to investigate a billing issue and help support determine the appropriate resolution.\"",
      +  "type": "string"
      +}
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint=false, openWorldHint=true, destructiveHint=false. The description goes well beyond them: it discloses async job semantics, the returned `id` and `credits_charged`, polling/wait-helper flow, signed-URL preservation rules, credit consumption with queued-estimate vs final-charge distinction, and content-policy restrictions. That is substantial behavioral context an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Content is front-loaded with the legal/policy guardrail, then operational guidance, then requirements. The bulleted 'MCP guidance' structure is scannable, though the block is dense and some sentences (URL query-parameter handling) could be tightened. Nothing is truly wasteful, but it is longer than strictly necessary.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a nested, async, credit-consuming generation tool, the description covers job lifecycle, polling alternatives, asset sourcing, credit implications, and policy limits. An output schema exists, so return values need not be re-explained, and the description still notes `downloads` and wait-helper `exact_download_urls`. Nothing critical is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by spelling out the cross-field dependency between assets.video_source and either video_file_path or youtube_url, and by explaining how `*_file_path` values are obtained. It does not add detail on max_fps_limit or style.generation_mode beyond what the schema already documents, so it stops short of a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — 'Match existing video to replacement audio' — and the title confirms it lip-syncs an existing video to new audio. It explicitly names the sibling it is not ('For a still portrait plus audio, use ai_talking_photo_create_talking_photo'), so an agent can route correctly without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use and when-not-to-use: requires assets.audio_file_path plus a matching video source, and routes still-image cases to ai_talking_photo_create_talking_photo. It also clarifies that text alone is not a valid audio input, and gives guidance on when to prefer the upload-URL endpoint over direct public URLs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources