Skip to main content
Glama

Calculate credits

calculate_credits
Read-only

Estimate credits for a new render_video workflow payload (requires workflow, or a legacy creationParams with slug). Do not pass an existing pid — this quotes a new render payload, not an existing project. For create_ad, create_motion_graphics, generate_media, or edit_project quotes, call those tools with dryRun: true.

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": "calculate_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoProject name, up to 200 characters. Set it here instead of calling `rename_project` afterward. Default: the start of the script or prompt.
audioNoLegacy alias of `music`.
inputNoGeneric content alias used by the public API.
mediaNo
musicNoRecommended for background music: `music: { generateMusic: true }`. Revid generates an original instrumental track from this video's script, so it fits the topic and mood (20 credits per started minute of video). Add `music.generationMusicPrompt` to steer the mood, tempo and instruments. Use `music.trackName` only when the user asks for a specific library track: an agent cannot listen to the library, so a track picked by name rarely fits the video. With music on and no track, file or generated music, the neutral `Presentation` track plays. To make the music quieter or louder, set `music.volume` to `low`, `normal` or `high`, or to an exact level from 0 to 100.
voiceNo
avatarNo
promptNoLegacy alias of `source.prompt`.
renderNo
sourceNo
optionsNo
webhookNo
advancedNo
captionsNo
metadataNo
workflowNo
inputTextNoLegacy alias of `source.text` or `source.url`.
webhookUrlNo
aspectRatioNoOutput aspect ratio.
inputMediasNoLegacy alias of `media.provided`.
characterIdsNo
creationParamsNoOptional legacy payload for calculate_credits.
customCreationParamsNo

Output Schema

NameRequiredDescriptionDefault
okYes
dataNo
errorNo
methodYes
statusYes
endpointYes
retryAfterSecondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / voice / properties / pronunciations
      Added value: +{
      +  "description": "Misread words: ipa (no slashes) and/or spoken respelling; captions keep written.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "ipa": {
      +        "type": "string"
      +      },
      +      "spoken": {
      +        "type": "string"
      +      },
      +      "written": {
      +        "maxLength": 64,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "written"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 50,
      +  "type": "array"
      +}
  2. Changed3 schema fields changed
    • changedInput schema / properties / media / properties / useProvidedInOrder / description
      Previous value: -"Map `media.provided` items to script sections in order. Forces provided-media-only mode. Fewer media groups adjacent script sections; extra media are ignored."New value: +"Map `media.provided` items to script sections in order. Forces provided-media-only mode. Requires `media.type: \"custom\"` (inferred automatically when `media.type` is omitted). Fewer media groups adjacent script sections; extra media are ignored."
    • removedInput schema / properties / pid
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / projectId
      Removed value: -{
      -  "type": "string"
      -}
  3. Changed4 schema fields changed
    • addedInput schema / properties / render / properties / frameRate / description
      Added value: +"Frames per second: 24, 25, 30, 50 or 60. Default 30."
    • addedInput schema / properties / render / properties / frameRate / enum
      Added value: +[
      +  24,
      +  25,
      +  30,
      +  50,
      +  60
      +]
    • removedInput schema / properties / render / properties / frameRate / maximum
      Removed value: -60
    • removedInput schema / properties / render / properties / frameRate / minimum
      Removed value: -1
  4. Changed3 schema fields changed
    • changedInput schema / properties / music / properties / soundWaveLook / description
      Previous value: -"Look of the sound wave when soundWave is on. Default bars."New value: +"Look of the sound wave when soundWave is on. Default bars. halo, release, terrain, neon, vinyl and nowPlaying put the song's cover, title and artist over the picture; the others leave the picture visible."
    • changedInput schema / properties / music / properties / soundWaveLook / enum
      Previous value: -[
      -  "bars",
      -  "halo",
      -  "release",
      -  "terrain",
      -  "neon",
      -  "vinyl",
      -  "nowPlaying"
      -]New value: +[
      +  "bars",
      +  "halo",
      +  "release",
      +  "terrain",
      +  "neon",
      +  "vinyl",
      +  "nowPlaying",
      +  "glowLine",
      +  "silk",
      +  "aurora",
      +  "floorLight",
      +  "glassPill",
      +  "edgeGlow",
      +  "sunburst",
      +  "pulseVignette"
      +]
    • changedInput schema / properties / music / properties / soundWaveTitle / description
      Previous value: -"Song title shown by a soundWaveLook other than bars."New value: +"Song title shown by the looks that show the song: halo, release, terrain, neon, vinyl, nowPlaying."
  5. Changed4 schema fields changed
    • addedInput schema / properties / music / properties / soundWaveArtist
      Added value: +{
      +  "description": "Artist shown under the title.",
      +  "type": "string"
      +}
    • addedInput schema / properties / music / properties / soundWaveCoverUrl
      Added value: +{
      +  "description": "URL of the song's cover image.",
      +  "type": "string"
      +}
    • addedInput schema / properties / music / properties / soundWaveLook
      Added value: +{
      +  "description": "Look of the sound wave when soundWave is on. Default bars.",
      +  "enum": [
      +    "bars",
      +    "halo",
      +    "release",
      +    "terrain",
      +    "neon",
      +    "vinyl",
      +    "nowPlaying"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / music / properties / soundWaveTitle
      Added value: +{
      +  "description": "Song title shown by a soundWaveLook other than bars.",
      +  "type": "string"
      +}
  6. Changed1 schema field changed
    • addedInput schema / properties / options / properties / coverPrompt / description
      Added value: +"What the cover should show, up to 1200 characters (longer is truncated). Words in quotes become the cover's title, otherwise it reads the video title; the cover's look (coverTextType, coverStyle) sets the title's layout, font and colors. Omit to design the cover from the script."
  7. Changed1 schema field changed
    • addedInput schema / properties / music / properties / enableLyricsLipSync / description
      Added value: +"Animate characters lip-syncing the lyrics. Requires media.type ai-video: singer lip-sync is only rendered on AI video, so music-to-video and lyrics-to-video refuse (400) a request turning it on with another media type. Both default to moving-image; song-ad is always AI video. Other workflows ignore this field. Workflows: music-to-video, lyrics-to-video, song-ad. Accepted aliases: options.enableLyricsLipSync, enableLyricsLipSync."
  8. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, openWorldHint=false, so safety is covered. The description adds the meaningful behavioral fact that this is a quote for a new payload rather than an existing project, plus the input requirement (workflow or legacy creationParams with slug). It does not discuss pricing model or rounding, which would be the remaining useful detail.

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

Conciseness5/5

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

Three short sentences, front-loaded with the core purpose, then the input requirement, then the exclusion and sibling routing. No filler or restatement of the name.

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

Completeness4/5

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

An output schema exists, so return-value explanation is unnecessary, and the annotations carry the safety profile. The description covers how to call it and where to go for other quote types; only minor gaps remain, such as how the estimate maps to actual billing.

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

Parameters3/5

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

Schema coverage is only 39% across 23 parameters, so the description must compensate and it does so for the two decisive ones: `workflow` is required, and legacy `creationParams` needs a `slug`. The other 21 nested options are left entirely to the schema's own inline descriptions.

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: estimate credits for a new `render_video` workflow payload. It also clarifies what is being quoted (a new payload, not an existing project), which separates it from any project-scoped sibling.

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 (render_video payloads), when-not ("Do not pass an existing `pid`"), and alternatives (use create_ad, create_motion_graphics, generate_media, or edit_project with `dryRun: true`). It names the exact routing condition for each case.

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