create lipsync
lipsync_createCreate one lip-synced video from an image or video plus audio or a script, making the face speak or match supplied audio.
Instructions
Create one lipsync video from exactly one visual (videoUrl, videoAssetId, imageUrl or imageAssetId) and one driver (audioUrl, audioAssetId, or script plus voiceId), to make a photo or video say a script or match its lips to supplied audio. When available, use lipsync_create-timeline instead for several audio clips or to lipsync only some ranges of one video, batches_create for 20 or more independent generations, dubbing_create to translate speech, and the Edit Dialogue tools (starting with dialogue_get-options) to change words in existing speech.
For a local file, when the assets tools are available, call assets_create-upload-url, PUT the bytes to its uploadUrl with the same Content-Type, register the url it returned (not the uploadUrl) with assets_create, and pass that asset id. If you cannot read the file or send that PUT yourself (no shell, or a sandbox without network access), do not retry: ask the person to upload it in sync. Studio at sync.so, then find it with assets_list. provider, stability and similarityBoost apply only to script.
Hard shots can finish COMPLETED with lips that barely move: a face turned toward profile, a small face the model has to enlarge, several faces or a crowd, a microphone or hand over the mouth, a face hidden for part of the shot, or singing over music. Before paying for a video like that, when the faces tools are available run faces_detect, then faces_get-people or faces_get-timeline, and pick the face yourself with options.active_speaker_detection { frame_number, coordinates: [x, y] } (on lipsync_create-timeline, a clip speaker). A still image has no face choice: the faces tools read videos only and an image ignores active_speaker_detection, so for a small face or a group photo suggest a tighter crop of the one face instead. For a song, drive the lipsync with the vocals stem from stems_separate when available; the output then plays only that stem, so say so. Tell the person, before spending, that the shot is hard and why, what you will do about it, and that the lips may still barely move.
This uses the session's organization unless organizationId names another. Check account_get-usage for free coverage; a script also needs free speech allowance and no connected provider key. Fully covered work needs no price mention or spending confirmation; otherwise follow the paid-work instructions. It returns the generation id and status at once; poll generations_get with wait: true until it finishes, then copy outputMediaUrl verbatim (unless it ends NO_OP: nothing was lip-synced).
Without projectId it first creates a NEW project, named projectName or a default, even if that name matches existing work. The input combination is checked before that; rejections from the API itself come after the project exists. Pass projectId, with projectIntent=explicit and without projectName or projectCreationKey, only for a project the user explicitly chose or one just created for this request. continuation, from generations_get-continuation, requires the parent generation's projectId.
Before calling, persist an idempotencyKey and, without projectId, a fresh projectCreationKey. After a lost or uncertain response, never create again with new keys: if the error names a generationId, poll it with generations_get; otherwise resend the identical request with the same keys.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "lipsync_create"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Optional model override. Image and video inputs default to sync-3. | |
| script | No | Text for the image or video to say. | |
| options | No | Model-specific generation preferences. Keep unchanged when retrying the same idempotency key. | |
| voiceId | No | Voice id from voices_list. Required when script is provided. | |
| audioUrl | No | Public or Sync-hosted audio URL. Use this when the user supplies audio. | |
| imageUrl | No | Public or Sync-hosted still image URL. Use this for image-to-video lipsync with sync-3. | |
| provider | No | Voice provider for script-driven lipsync. Defaults to elevenlabs. | |
| videoUrl | No | Public or Sync-hosted video URL. Supply exactly one visual input. | |
| projectId | No | Existing Sync project ID returned by projects_list or projects_get. Use this to select the same project as the web app. Cannot be combined with projectName. | |
| stability | No | Optional ElevenLabs voice stability for script input. | |
| projectName | No | Name for a NEW project only. Never search or reuse a matching name. Cannot be combined with projectId. | |
| audioAssetId | No | Saved audio asset id in the same organization as this call, from assets_list or assets_create when available. Supply audio or script, not both. | |
| continuation | No | Only when the user explicitly continues an existing generation in this project: the parent generation and its workflow. | |
| imageAssetId | No | Saved still image asset id in the same organization as this call, from assets_list or assets_create when available, for image-to-video lipsync. Supply exactly one visual input. | |
| videoAssetId | No | Saved video asset id in the same organization as this call, from assets_list or assets_create when available. Supply exactly one visual input. | |
| projectIntent | No | Required 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. | |
| idempotencyKey | No | Unique key for one generation action. Persist and reuse the same key, projectCreationKey (for new projects) or explicit projectId, model, and inputs when retrying after a lost response. Use durable asset IDs or stable URLs; upload files before starting the keyed action. A new intentional generation needs a new key. Passed as the Sync API Idempotency-Key header. | |
| organizationId | No | Run 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. | |
| similarityBoost | No | Optional ElevenLabs similarity boost for script input. | |
| projectCreationKey | No | Fresh 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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||