Skip to main content
Glama

estimate an edited dialogue video

dialogue-videos_estimate
Read-only

Estimate the cost and credits for a lipsynced Edit Dialogue video before generating it. Returns USD cost, credits, frame count, and duration allowance.

Instructions

Quote the final lipsynced Edit Dialogue video for a finished preview without charging: returns estimatedGenerationCost in US dollars, estimatedCredits (1 credit = $0.01; null when the organization is billed in dollars), estimatedFrameCount and, when present, durationCheck (whether the plan and model allow that length). Call it before dialogue-videos_create with the same projectId, videoAssetId, dialogueEditId, model, options and organizationId, and show the user the quote; it holds only for that model and options. Not for other workflows (generations_estimate-cost) or what a past generation actually cost (generations_get-costs). It checks project and source access but creates no job, reserves no credits and does not guarantee admission. The API rejects a preview that is missing or not COMPLETED or COMPLETED_PARTIAL, and returns 422 cost_estimate_unavailable when the source duration cannot be resolved.

Input Schema

NameRequiredDescriptionDefault
modelYesLipsync model name from models_list, such as sync-3. Use the same model on dialogue-videos_create.
optionsNoOptional model controls. Omit any field to use its default.
projectIdYesProject the Edit Dialogue work belongs to, from projects_create.
videoAssetIdYesSaved VIDEO asset being edited. Use the videoAssetId dialogue-transcriptions_create returned when it made a copy.
dialogueEditIdYesId of the COMPLETED or COMPLETED_PARTIAL preview from dialogue-previews_create that the user approved; not a transcription or generation id.
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.2.4
    • changedInput schema / properties / dialogueEditId / description
      Previous value: -"Id of the completed, user-approved preview from dialogue-previews_create."New value: +"Id of the COMPLETED or COMPLETED_PARTIAL preview from dialogue-previews_create that the user approved; not a transcription or generation id."
    • changedInput schema / properties / model / description
      Previous value: -"Lipsync model name from models_list, such as sync-3."New value: +"Lipsync model name from models_list, such as sync-3. Use the same model on dialogue-videos_create."
  2. Changed11 schema fields changed
    • addedInput schema / properties / dialogueEditId / description
      Added value: +"Id of the completed, user-approved preview from dialogue-previews_create."
    • addedInput schema / properties / model / description
      Added value: +"Lipsync model name from models_list, such as sync-3."
    • 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."
    • addedInput schema / properties / projectId / description
      Added value: +"Project the Edit Dialogue work belongs to, from projects_create."
    • addedInput schema / properties / videoAssetId / description
      Added value: +"Saved VIDEO asset being edited. Use the videoAssetId dialogue-transcriptions_create returned when it made a copy."
  3. Addedv0.1.5

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/destructive annotations, it discloses that no job is created, no credits are reserved, no charge is incurred, and admission is not guaranteed. It also reports access checks, the COMPLETED/COMPLETED_PARTIAL precondition, and the specific 422 cost_estimate_unavailable failure mode — behavior an agent could not infer from annotations alone.

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?

Front-loaded with purpose and value, then usage, then exclusions, then failure modes — a sensible order. It is dense but nearly every clause carries information; the enumerations of return fields and parameters make the first two sentences longer than ideal, though not wasteful.

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?

With no output schema, the description carries the burden of describing returns and does so (estimatedGenerationCost, estimatedCredits with unit and null semantics, estimatedFrameCount, durationCheck). Preconditions, side-effect guarantees, and error behavior are all covered for a six-parameter tool with a nested options object.

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 documents each field and the tool sits at the baseline 3. The description adds real meaning by requiring the parameters to match the subsequent dialogue-videos_create call and by noting the quote is valid only for the supplied model and options.

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 description opens with a specific verb and resource ('Quote the final lipsynced Edit Dialogue video for a finished preview') and immediately clarifies the operation is free and non-committal. It also names the sibling tools it is not (generations_estimate-cost, generations_get-costs), so an agent can distinguish it without opening the 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?

It states exactly when to call it ('before dialogue-videos_create with the same projectId, videoAssetId, dialogueEditId, model, options and organizationId') and adds the operative instruction to show the user the quote. It gives explicit exclusions for other workflows and past-generation costs, and notes the quote only holds for that model and options.

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