Skip to main content
Glama

estimate generation cost

generations_estimate-cost
Read-only

Estimate lipsync, image-to-video, or translate-and-dub generation cost and check duration eligibility before creating a job or reserving credits.

Instructions

Estimate a lipsync, image-to-video or translate-and-dub generation and check duration eligibility; creates no job and reserves no credits. Use it before lipsync_create or dubbing_create, and price one representative item before batches_create. The base-rate estimate can be nonzero for a free account: read account_get-usage to check coverage and, when the whole request is covered, do not mention prices or request spending confirmation. Not for what a past generation cost (generations_get-costs, when available), the final Edit Dialogue video (dialogue-videos_estimate) or a translated-audio preview (translation-previews_estimate). Give one length: duration, or for replacement speech script or measured audioDuration, which replace duration; never quote the full source video length for a shorter replacement script. Without workflow=translate-and-dub the quote covers lipsync only, never the full translation workflow. Returns estimatedGenerationCost in USD, estimatedCredits for credit-billed organizations (null otherwise), estimatedFrameCount, durationCheck (whether that length fits the plan and model limits; a price does not guarantee admission), breakdown for translate-and-dub, and durationEstimate for script or audio quotes. When presenting a paid or unknown-coverage quote, explain durationEstimate, label script quotes approximate, show the breakdown, and disclose that speech synthesis and external provider charges are excluded.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "model": "<model>"
    },
    "name": "generations_estimate-cost"
  }
}

Input Schema

NameRequiredDescriptionDefault
fpsNoSource video frame rate. When omitted, credit-billed organizations are quoted at 25, the rate generation admission holds credits at when the source frame rate cannot be read; other organizations at 30.
modelYesModel name from models_list, such as sync-3; use the same model the create call will use.
scriptNoReplacement speech text. Estimates spoken duration without synthesizing audio. Use for script-driven lipsync instead of pricing the full source video. An approximate quote; final speech length may differ.
durationNoBillable output seconds, or source seconds for translate-and-dub. For replacement speech, supply script or measured audioDuration instead. Never use the source video length for a shorter replacement script.
syncModeNoThe sync_mode the generation will use; only valid alongside script or audioDuration. For a video, cut_off bills the shorter of speech and videoDuration and silence the longer; images and other modes follow the speech length.
workflowNotranslate-and-dub prices dubbing plus lipsync from the source duration in duration, and returns a breakdown with external provider charges excluded; it rejects script and audioDuration. Omit for lipsync only.
visualTypeNoVisual input type. Set image for image-to-video quotes; images always follow speech duration, including with cut_off or silence. Videos require videoDuration for those modes.
audioDurationNoMeasured replacement audio duration in seconds. Prefer this over a script estimate once speech audio exists.
videoDurationNoSource video length in seconds. Needed with syncMode cut_off or silence when quoting script or audioDuration for a video; only valid alongside script or audioDuration, and rejected for an image.
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.
reasoningEnabledNoQuote with reasoning on. Only lipsync-2-pro supports it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.11
    • changedInput schema / properties / workflow / description
      Previous value: -"translate-and-dub prices dubbing plus lip sync from the source duration in duration, and returns a breakdown with external provider charges excluded; it rejects script and audioDuration. Omit for lip sync only."New value: +"translate-and-dub prices dubbing plus lipsync from the source duration in duration, and returns a breakdown with external provider charges excluded; it rejects script and audioDuration. Omit for lipsync only."
  2. Changed4 schema fields changedv0.2.4
    • changedInput schema / properties / model / description
      Previous value: -"Model name from models_list, such as sync-3."New value: +"Model name from models_list, such as sync-3; use the same model the create call will use."
    • changedInput schema / properties / syncMode / description
      Previous value: -"The same sync_mode selected for generation. For videos, cut_off uses the shorter input and silence the longer input. Images and other modes follow replacement audio duration."New value: +"The sync_mode the generation will use; only valid alongside script or audioDuration. For a video, cut_off bills the shorter of speech and videoDuration and silence the longer; images and other modes follow the speech length."
    • changedInput schema / properties / videoDuration / description
      Previous value: -"Source video duration in seconds, used with syncMode to account for cut_off or silence. Omit for an image."New value: +"Source video length in seconds. Needed with syncMode cut_off or silence when quoting script or audioDuration for a video; only valid alongside script or audioDuration, and rejected for an image."
    • changedInput schema / properties / workflow / description
      Previous value: -"Omit for lip-sync only. translate-and-dub includes dubbing and lip-sync, estimated using the source duration. Actual output duration may differ."New value: +"translate-and-dub prices dubbing plus lip sync from the source duration in duration, and returns a breakdown with external provider charges excluded; it rejects script and audioDuration. Omit for lip sync only."
  3. Changed2 schema fields changed
    • addedInput schema / properties / model / description
      Added value: +"Model name from models_list, such as sync-3."
    • addedInput schema / properties / reasoningEnabled / description
      Added value: +"Quote with reasoning on. Only lipsync-2-pro supports it."
  4. Changed12 schema fields changedv0.1.5
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / audioDuration
      Added value: +{
      +  "description": "Measured replacement audio duration in seconds. Prefer this over a script estimate once speech audio exists.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / duration / description
      Added value: +"Billable output seconds, or source seconds for translate-and-dub. For replacement speech, supply script or measured audioDuration instead. Never use the source video length for a shorter replacement script."
    • addedInput schema / properties / fps / description
      Added value: +"Source video frame rate. When omitted, credit-billed organizations are quoted at 25, the rate generation admission holds credits at when the source frame rate cannot be read; other organizations at 30."
    • addedInput schema / properties / organizationId
      Added value: +{
      +  "description": "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.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • addedInput schema / properties / script
      Added value: +{
      +  "description": "Replacement speech text. Estimates spoken duration without synthesizing audio. Use for script-driven lipsync instead of pricing the full source video. An approximate quote; final speech length may differ.",
      +  "maxLength": 5000,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / syncMode
      Added value: +{
      +  "description": "The same sync_mode selected for generation. For videos, cut_off uses the shorter input and silence the longer input. Images and other modes follow replacement audio duration.",
      +  "enum": [
      +    "bounce",
      +    "loop",
      +    "cut_off",
      +    "silence",
      +    "remap"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / videoDuration
      Added value: +{
      +  "description": "Source video duration in seconds, used with syncMode to account for cut_off or silence. Omit for an image.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • addedInput schema / properties / visualType
      Added value: +{
      +  "description": "Visual input type. Set image for image-to-video quotes; images always follow speech duration, including with cut_off or silence. Videos require videoDuration for those modes.",
      +  "enum": [
      +    "image",
      +    "video"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / workflow
      Added value: +{
      +  "description": "Omit for lip-sync only. translate-and-dub includes dubbing and lip-sync, estimated using the source duration. Actual output duration may differ.",
      +  "enum": [
      +    "lipsync",
      +    "translate-and-dub"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "model",
      -  "duration"
      -]New value: +[
      +  "model"
      +]
  5. First observedv0.1.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/non-destructive, but the description adds substantial behavior: no job created, no credits reserved, base-rate estimates can be nonzero on free accounts, and 'a price does not guarantee admission.' It also prescribes how to present paid or unknown-coverage quotes, which is the main residual risk. Slightly dense but genuinely additive beyond annotations.

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 the not-for list before the return fields and presentation rules, so readers can stop early. The final sentence is a long multi-clause presentation instruction that could be split, but nearly every clause carries operational information.

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 11 parameters and no output schema, the description compensates by enumerating the returned fields (estimatedGenerationCost, estimatedCredits, estimatedFrameCount, durationCheck, breakdown, durationEstimate) and explaining the admission-vs-price distinction. Nothing essential for a correct call or correct quoting 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 coverage is 100%, so the baseline is 3, but the description adds cross-parameter rules the schema states only locally: give exactly one length, script/audioDuration replace duration, never quote full source video length for a shorter replacement script, and the lipsync-only default without workflow=translate-and-dub. That meaningfully reduces misuse of the 11-parameter surface.

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 ('Estimate') with the exact resources covered (lipsync, image-to-video, translate-and-dub) plus the eligibility check, and immediately distinguishes itself from generations_get-costs, dialogue-videos_estimate and translation-previews_estimate. An agent can identify the tool's job 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?

Explicit sequencing ('Use it before lipsync_create or dubbing_create', 'price one representative item before batches_create') plus named exclusions with the correct alternatives for each. It even handles the free-account coverage case by routing to account_get-usage before quoting.

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