Skip to main content
Glama

estimate_credit_cost

Read-onlyIdempotent

Price a video or image before making it. Returns the exact credit cost and a quote_id that generate_video and generate_image require. No account needed. Pass the duration and resolution you intend to use; some video models bill per second.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
durationNoVideo length in seconds you intend to generate. Affects the price of per-second models.
model_idYesModel ID, e.g. "kling_3_0" or "veo_3_fast".
quantityNoHow many generations to price. Defaults to 1. Only a quote for exactly 1 can be spent; larger quantities are for planning.
resolutionNoVideo resolution you intend to generate, e.g. "720p" or "1080p". Affects the price of per-second models.
reference_video_secondsNoLength in seconds of the reference video you will pass as reference_video_url (seedance_2_5 up to 30 s, or seedance_2_0_fast up to 15 s at 720p). Reference seconds are billed as input, so they change the price; the server measures the file and refuses a quote whose length does not match.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
typeYes
basisYes
model_idYesNormalized to underscores.
quantityYes
quote_idYesSigned quote. Pass it to generate_video or generate_image; it fixes the price and makes a retry safe.
next_stepYes
resolutionNoThe resolution actually priced, for per-second models.
credits_eachYes
credits_totalYes
duration_secondsNoThe duration actually priced, for per-second models.
quote_expires_atYesISO time after which the quote is refused.
reference_video_secondsNoReference-video seconds priced as input, when a reference was quoted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / reference_video_seconds
      Added value: +{
      +  "description": "Length in seconds of the reference video you will pass as reference_video_url (seedance_2_5 up to 30 s, or seedance_2_0_fast up to 15 s at 720p). Reference seconds are billed as input, so they change the price; the server measures the file and refuses a quote whose length does not match.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / reference_video_seconds
      Added value: +{
      +  "description": "Reference-video seconds priced as input, when a reference was quoted.",
      +  "type": "number"
      +}
  2. Changed10 schema fields changed
    • addedInput schema / properties / duration
      Added value: +{
      +  "description": "Video length in seconds you intend to generate. Affects the price of per-second models.",
      +  "type": "number"
      +}
    • changedInput schema / properties / quantity / description
      Previous value: -"How many generations. Defaults to 1."New value: +"How many generations to price. Defaults to 1. Only a quote for exactly 1 can be spent; larger quantities are for planning."
    • addedInput schema / properties / resolution
      Added value: +{
      +  "description": "Video resolution you intend to generate, e.g. \"720p\" or \"1080p\". Affects the price of per-second models.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / basis
      Added value: +{
      +  "enum": [
      +    "flat",
      +    "per_second"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / duration_seconds
      Added value: +{
      +  "description": "The duration actually priced, for per-second models.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / next_step
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / quote_expires_at
      Added value: +{
      +  "description": "ISO time after which the quote is refused.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / quote_id
      Added value: +{
      +  "description": "Signed quote. Pass it to generate_video or generate_image; it fixes the price and makes a retry safe.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / resolution
      Added value: +{
      +  "description": "The resolution actually priced, for per-second models.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "model_id",
      -  "name",
      -  "credits_each",
      -  "quantity",
      -  "credits_total",
      -  "type"
      -]New value: +[
      +  "model_id",
      +  "name",
      +  "credits_each",
      +  "quantity",
      +  "credits_total",
      +  "type",
      +  "basis",
      +  "quote_id",
      +  "quote_expires_at",
      +  "next_step"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already mark the tool read-only and idempotent, and the description adds meaningful behavioral context: it returns an exact credit cost and a spendable quote_id, requires no account, and notes that some video models bill per second. This clarifies auth needs and cost behavior beyond the structured annotations.

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 concise sentences, front-loaded with the purpose, followed by the key output and usage pointers. Every sentence earns its place with no filler or repetition.

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?

The description covers the tool's purpose, the required output, the no-account condition, and the pricing nuance. Since an output schema exists, return values are sufficiently specified, and the overall combination of description, schema, and annotations is complete for correct invocation.

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 description coverage is 100%, so the schema already documents all parameters. The description reminds users to pass duration and resolution, but that information is already present in the schema, so it adds little beyond the baseline.

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: "Price a video or image before making it." It further distinguishes the tool by stating it returns a quote_id required by generate_video and generate_image, which sets it apart from cost tools like estimate_ad_cost.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description clearly says to use this tool before generating and to pass the intended duration and resolution. It does not explicitly mention alternatives or when not to use it, but the precondition and typical workflow are unambiguous.

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.