Skip to main content
Glama

Estimate credit cost

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

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

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.3/5.0
Behavior4/5

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

Annotations already establish the safe, idempotent, closed-world read profile, so the bar is lower; the description adds genuinely non-structured context: the returned quote_id is a hard prerequisite for downstream generation, and no authentication is required. It does not restate the per-second billing nuance beyond a brief mention, and error/refusal behavior is left to the schema.

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?

Five short sentences, front-loaded with purpose and the return value before the usage caveats. Each sentence carries distinct information (what it does, what it returns, who needs it, auth, input guidance) with no restatement of the name or title.

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?

An output schema exists, so return values need not be explained, and annotations cover the safety profile. For a five-parameter, fully documented pricing tool the description supplies everything an agent needs: when to call it, the downstream dependency on quote_id, and the fact that no account is required.

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 all five parameters including the reference_video_seconds measurement rule are already documented in structured fields. The description only reinforces that duration and resolution should reflect intended use and that some video models bill per second, adding marginal meaning beyond the schema. Baseline 3 applies when the schema does the heavy lifting.

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?

Opens with a specific verb+resource framing ("Price a video or image before making it") and immediately states the return value (exact credit cost plus quote_id). It is clearly distinguishable from list_models and from the generate_* tools it feeds, so an agent knows this is the pre-flight pricing step rather than a generation or catalog call.

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?

Gives explicit timing ("before making it") and a concrete precondition (generate_video and generate_image require the quote_id it returns), plus the useful note that no account is needed. It also instructs the caller to pass intended duration and resolution. The one gap is that it never mentions the sibling estimate_ad_cost, leaving ad pricing to inference.

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.