Skip to main content
Glama

create timeline lipsync

lipsync_create-timeline
Destructive

Lipsyncs a saved video with multiple audio clips placed on separate timeline ranges, letting you dub only selected shots or switch audio or speakers between segments.

Instructions

Lipsync one saved video with several audio clips, each on its own stretch of the video like a Studio timeline: to lipsync only some ranges, or to switch audio or speaker between shots. For one audio across the whole video use lipsync_create; to translate and dub a whole video use dubbing_create when available.

Each lipsynced clip takes exactly one of audioAssetId or audioUrl, a span in seconds or in frames (not a mix), and optionally audioStartTime and audioEndTime to play part of that audio. Clips may come in any order but must not overlap; parts no clip covers keep their original picture and, unless outputAudio plays, their original sound. Frame spans need the video's fps: read it from assets_get-playback-metadata when it returns one (signed-in users only) and never guess it; otherwise use seconds. Get speaker.faceTrackUrl from transcriptions_slice-speaker-face-track when available.

To lipsync only the speaking shots of a dub, pass the full dubbed track as outputAudio, give speaking shots clips that play their part of it, and mark the other shots lipsync: false. outputAudio replaces the sound of the whole output; if it is omitted while a clip sets lipsync: false, the one audio the other clips share plays instead, so pass it whenever they use several.

Before anything is created, the tool validates the input (options included), spans, audio ranges and overlaps, and per-clip errors name the clip index. Overlaps are compared only within one unit, so use one unit for every clip. Problems only the API detects, such as an unknown audio asset or a speaker point off the face, surface after a new project may already exist.

Paid generation, sync-3 unless model is set. Estimate and confirm before creating; this starts an asynchronous generation and returns its id and status. Poll that id with generations_get and wait: true.

Without projectId it first creates a NEW project, named projectName or a default; default new work to that. Pass projectId with projectIntent=explicit only when the user explicitly asks to work in that project, selects it in the interface, or it was just created for this request; a matching workflow or name or an open editor is never permission to modify it. Send a fresh idempotencyKey, plus a fresh projectCreationKey when there is no projectId, and after a lost or uncertain response retry only with identical arguments and the same keys. Never resend a request that had no idempotencyKey: it can start a second paid generation.

Input Schema

NameRequiredDescriptionDefault
clipsYesClips placed on the video, in any order, without overlapping. Parts no clip covers keep their original picture, and their original sound unless outputAudio plays; clips with lipsync: false keep their picture but play outputAudio.
modelNoModel to use. Defaults to sync-3.
optionsNoOptional model controls. Omit any field to use its default.
projectIdNoExisting Sync project id, only for a project the user explicitly selected or one just created for this request.
outputAudioNoOne audio that plays over the whole finished output from its first second, replacing the sound of every part, such as the full dubbed track. Defaults, when a clip sets lipsync: false, to the only audio the clips use.
projectNameNoName for a NEW project only. Never search or reuse a matching name. Cannot be combined with projectId.
videoAssetIdYesSync asset id of the video.
projectIntentNoRequired with projectId. Set only for an explicit user project selection/update, or the new project just created for this request. Never infer intent from a matching project name, workflow name or active editor.
idempotencyKeyNoUnique key for this generation. Reuse it with identical arguments when retrying after a lost response. Passed as the Idempotency-Key header.
organizationIdNoRun only this call in another of the user’s Sync organizations, by id from organizations_list, when the user asks for it (for example “generate this in the Acme org”). The session keeps its organization; reads of the ids this call returns stay in this organization. Omit to use the session’s organization.
projectCreationKeyNoFresh random UUID identifying this NEW project creation, not a project ID. Required for keyed generation without projectId. Persist this key, name and generation key on retries; the server derives a separate project UUID.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.4
    • changedInput schema / properties / clips / description
      Previous value: -"Clips placed on the video, in any order, without overlapping. Parts no clip covers keep their original picture and sound; clips with lipsync: false keep their picture but play outputAudio."New value: +"Clips placed on the video, in any order, without overlapping. Parts no clip covers keep their original picture, and their original sound unless outputAudio plays; clips with lipsync: false keep their picture but play outputAudio."
  2. Changed7 schema fields changed
    • addedInput schema / properties / options / description
      Added value: +"Optional model controls. Omit any field to use its default."
    • changedInput schema / properties / options / properties / active_speaker_detection / anyOf
      Previous value: -[
      -  {
      -    "type": "boolean"
      -  },
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "auto_detect": {
      -        "type": "boolean"
      -      },
      -      "coordinates": {
      -        "items": false,
      -        "maxItems": 2,
      -        "minItems": 2,
      -        "prefixItems": [
      -          {
      -            "type": "number"
      -          },
      -          {
      -            "type": "number"
      -          }
      -        ],
      -        "type": "array"
      -      },
      -      "face_image": {
      -        "type": "string"
      -      },
      -      "frame_number": {
      -        "maximum": 9007199254740991,
      -        "minimum": 0,
      -        "type": "integer"
      -      },
      -      "use_v2": {
      -        "type": "boolean"
      -      },
      -      "v3": {
      -        "type": "boolean"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "boolean"
      +  },
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "auto_detect": {
      +        "description": "Find the person speaking automatically.",
      +        "type": "boolean"
      +      },
      +      "coordinates": {
      +        "description": "[x, y] pixel position of the speaker's face on frame_number.",
      +        "items": false,
      +        "maxItems": 2,
      +        "minItems": 2,
      +        "prefixItems": [
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "type": "number"
      +          }
      +        ],
      +        "type": "array"
      +      },
      +      "face_image": {
      +        "description": "URL of a reference image of the speaker's face.",
      +        "type": "string"
      +      },
      +      "frame_number": {
      +        "description": "Zero-based video frame that coordinates refer to.",
      +        "maximum": 9007199254740991,
      +        "minimum": 0,
      +        "type": "integer"
      +      },
      +      "use_v2": {
      +        "description": "Use the second-generation speaker detector.",
      +        "type": "boolean"
      +      },
      +      "v3": {
      +        "description": "Use the third-generation speaker detector.",
      +        "type": "boolean"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • addedInput schema / properties / options / properties / active_speaker_detection / description
      Added value: +"Which face to lipsync when several people are visible: true or { auto_detect: true } to find the speaker, or frame_number plus coordinates to pick one. Omit for a single face or an image."
    • addedInput schema / properties / options / properties / model_mode / description
      Added value: +"How much of the face the model may change: lips, face or head."
    • addedInput schema / properties / options / properties / occlusion_detection_enabled / description
      Added value: +"Keep hands, microphones and other objects that pass in front of the mouth in front of it. Slower."
    • addedInput schema / properties / options / properties / sync_mode / description
      Added value: +"How to fit audio and video of different lengths: bounce (play the video forward, then in reverse), loop, cut_off (stop at the shorter input), silence (pad with silence to the longer input) or remap (change the video speed to match the audio)."
    • addedInput schema / properties / options / properties / temperature / description
      Added value: +"How expressive the mouth movement is, from 0 to 1. Omit for the model default."
  3. Addedv0.1.5

TDQS

A4.8/5.0
Behavior5/5

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

Annotations flag it as destructive, non-idempotent and open-world, and the description goes well beyond them: it discloses that generation is paid, defaults to sync-3, launches asynchronously and must be polled with generations_get wait:true, that validation happens pre-creation but API-side failures can occur after a project exists, and the exact idempotency/retry contract including the warning never to resend a request lacking an idempotencyKey.

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?

The core purpose, the sibling boundary and the paid/async warning are front-loaded, and the dense paragraphing is largely earned by a genuinely complex operation. It is still a long description with some restatement of schema content (the seconds-or-frames rule appears twice), which keeps it from a 5.

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 an 11-parameter, deeply nested, destructive, paid, asynchronous tool, the description covers prerequisites (fps from assets_get-playback-metadata), the dub workflow, error surfacing, and the post-creation polling step. With an output schema present it correctly avoids describing return values while still naming the returned id and status.

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 coverage is 100%, so the schema already explains every field; the description still adds interaction semantics the schema cannot express, such as exactly-one-of audioAssetId/audioUrl per clip, no mixing seconds and frames, and non-overlap only being checked within one unit. It does not explain every options field (sync_mode, model_mode are left to the schema), so it is strong but not exhaustive.

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?

The opening sentence gives a specific verb and resource with scope: lipsync one saved video against several audio clips, each on its own stretch. It immediately distinguishes itself from siblings by naming lipsync_create for single-audio work and dubbing_create for full-video dubbing.

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 routing rules are given throughout: which sibling to use for one audio vs. many, when to pass outputAudio, when to mark clips lipsync:false, when to use frames vs. seconds, and when projectId is legitimate ('only when the user explicitly asks... never permission to modify it'). Alternatives and exclusions are both stated.

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