Skip to main content
Glama

Estimate Cost (Free)

estimate_inference_cost
Read-onlyIdempotent

Estimate generation cost using the public /v2/inferences endpoint with check_cost=true.

Use input_image for the main source image, reference_images for extra per-inference guidance, and style_reference_images only on create_user_style/update_user_style.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthYesOutput width in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage. Genre-native sizes per item: Minecraft 16; items/icons/props 32-64; character sprites 16-48 retro or 96-128 showcase; tiles 16-32; portraits 96-128; full scenes 256 (RD Pro's max; 16:9 scenes = 256x144 — pixel art integer-upscales losslessly).
heightYesOutput height in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage.
promptYesDescribe the SUBJECT only, richly and concretely ('a squat round flask of glowing crimson liquid, cork stopper, bright highlight on the upper-left rim' beats 'a potion'). Never write 'pixel art' — the selected style handles all rendering. For standalone assets, state a flat background color that contrasts the subject (default 'on a plain white background') and pair with remove_bg=true; never write 'transparent background' (that is remove_bg's job), and never leave the background unstated (it drifts to drab dark gray). Scenes instead describe their real environment. For rd_advanced_animation__rotate the prompt is only an optional hint describing the uploaded subject — a few words or an empty string.
strengthNoHow strongly to change input_image, 0-1 (default 0.75). Lower values keep more of the original.
num_imagesNoHow many images to generate in one batch; a batch produces varied takes of one prompt (the right way to get N distinct items as individually usable images — never pack N items into a single sheet/grid image unless a sheet IS the deliverable). Style-specific maximums apply.
rd_api_keyNoRetroDiffusion API key (rdpk-...) for this call only; overrides session or header auth.
input_imageNoBase64 PNG used as the main source image for edits, variations, tilesets, animations, or styles that require a starting frame. Raw base64 or a data URL. Send the NATIVE-resolution image: an upscaled display copy (e.g. a 96px sprite exported at 4x = 384px) exceeds style ranges and gets rejected — downscale to the true pixel grid first. For advanced animations the frame's dimensions must equal width/height, and sprites whose opaque pixels touch the canvas edge animate badly (pad onto a larger transparent canvas first, e.g. 48x48 content onto 64x64).
extra_promptNoSecondary prompt for styles that use one (e.g. the transition texture in advanced tilesets).
prompt_styleYesStyle id from list_available_styles (e.g. 'rd_fast__default', 'rd_pro__isometric', or a custom 'user__...' style).
input_paletteNoBase64 image of a color palette; output colors are constrained to it.
frames_durationNoAnimation frame count for animation styles: 4, 6, 8, 10, 12, or 16. Pick deliberately: 8 is the sweet spot for loops (walking, idle), 6 for a snappy single action, 10-12 for flowing ambient motion. Ignored by rd_advanced_animation__rotate (always 8 views).
timeout_secondsNoRead-timeout override in seconds for this call; increase for animations or large batches.
reference_imagesNoExtra per-inference guidance images (base64), only for styles where supports_reference_images is true. Not for defining custom styles.
extra_input_imageNoSecond base64 input image for styles that use one (e.g. the second texture in rd_tile__tileset_advanced).
return_pre_paletteNoAlso return the render from before palette constraints were applied.
return_spritesheetNoFor animation styles: return a PNG sprite sheet instead of a GIF (for rd_advanced_animation__rotate, the 3x3 direction sheet whose views face the center).
return_non_bg_removedNoAlso return the render from before background removal was applied.
upscale_output_factorNoInteger upscale factor for the output image; 1 returns the native pixel size.
bypass_prompt_expansionNoSkip the automatic LLM prompt enrichment and use the prompt verbatim.
include_downloadable_dataNoInclude extra structured assets when available (e.g. tileset atlas JSON, animation frame data).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / frames_duration / description
      Previous value: -"Animation frame count for animation styles: 4, 6, 8, 10, 12, or 16. Pick deliberately: 8 is the sweet spot for loops (walking, idle), 6 for a snappy single action, 10-12 for flowing ambient motion."New value: +"Animation frame count for animation styles: 4, 6, 8, 10, 12, or 16. Pick deliberately: 8 is the sweet spot for loops (walking, idle), 6 for a snappy single action, 10-12 for flowing ambient motion. Ignored by rd_advanced_animation__rotate (always 8 views)."
    • changedInput schema / properties / prompt / description
      Previous value: -"Describe the SUBJECT only, richly and concretely ('a squat round flask of glowing crimson liquid, cork stopper, bright highlight on the upper-left rim' beats 'a potion'). Never write 'pixel art' — the selected style handles all rendering. For standalone assets, state a flat background color that contrasts the subject (default 'on a plain white background') and pair with remove_bg=true; never write 'transparent background' (that is remove_bg's job), and never leave the background unstated (it drifts to drab dark gray). Scenes instead describe their real environment."New value: +"Describe the SUBJECT only, richly and concretely ('a squat round flask of glowing crimson liquid, cork stopper, bright highlight on the upper-left rim' beats 'a potion'). Never write 'pixel art' — the selected style handles all rendering. For standalone assets, state a flat background color that contrasts the subject (default 'on a plain white background') and pair with remove_bg=true; never write 'transparent background' (that is remove_bg's job), and never leave the background unstated (it drifts to drab dark gray). Scenes instead describe their real environment. For rd_advanced_animation__rotate the prompt is only an optional hint describing the uploaded subject — a few words or an empty string."
    • changedInput schema / properties / return_spritesheet / description
      Previous value: -"For animation styles: return a PNG sprite sheet instead of a GIF."New value: +"For animation styles: return a PNG sprite sheet instead of a GIF (for rd_advanced_animation__rotate, the 3x3 direction sheet whose views face the center)."
  2. Changed5 schema fields changed
    • changedInput schema / properties / frames_duration / description
      Previous value: -"Animation frame count for animation styles: 4, 6, 8, 10, 12, or 16."New value: +"Animation frame count for animation styles: 4, 6, 8, 10, 12, or 16. Pick deliberately: 8 is the sweet spot for loops (walking, idle), 6 for a snappy single action, 10-12 for flowing ambient motion."
    • changedInput schema / properties / input_image / description
      Previous value: -"Base64 PNG used as the main source image for edits, variations, tilesets, animations, or styles that require a starting frame. Raw base64 or a data URL."New value: +"Base64 PNG used as the main source image for edits, variations, tilesets, animations, or styles that require a starting frame. Raw base64 or a data URL. Send the NATIVE-resolution image: an upscaled display copy (e.g. a 96px sprite exported at 4x = 384px) exceeds style ranges and gets rejected — downscale to the true pixel grid first. For advanced animations the frame's dimensions must equal width/height, and sprites whose opaque pixels touch the canvas edge animate badly (pad onto a larger transparent canvas first, e.g. 48x48 content onto 64x64)."
    • changedInput schema / properties / num_images / description
      Previous value: -"How many images to generate in one batch. Style-specific maximums apply."New value: +"How many images to generate in one batch; a batch produces varied takes of one prompt (the right way to get N distinct items as individually usable images — never pack N items into a single sheet/grid image unless a sheet IS the deliverable). Style-specific maximums apply."
    • changedInput schema / properties / prompt / description
      Previous value: -"Describe the SUBJECT only (e.g. 'a knight resting by a campfire'). Never write 'pixel art' — the selected style handles all rendering."New value: +"Describe the SUBJECT only, richly and concretely ('a squat round flask of glowing crimson liquid, cork stopper, bright highlight on the upper-left rim' beats 'a potion'). Never write 'pixel art' — the selected style handles all rendering. For standalone assets, state a flat background color that contrasts the subject (default 'on a plain white background') and pair with remove_bg=true; never write 'transparent background' (that is remove_bg's job), and never leave the background unstated (it drifts to drab dark gray). Scenes instead describe their real environment."
    • changedInput schema / properties / width / description
      Previous value: -"Output width in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage."New value: +"Output width in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage. Genre-native sizes per item: Minecraft 16; items/icons/props 32-64; character sprites 16-48 retro or 96-128 showcase; tiles 16-32; portraits 96-128; full scenes 256 (RD Pro's max; 16:9 scenes = 256x144 — pixel art integer-upscales losslessly)."
  3. Changed20 schema fields changed
    • addedInput schema / properties / bypass_prompt_expansion / description
      Added value: +"Skip the automatic LLM prompt enrichment and use the prompt verbatim."
    • addedInput schema / properties / extra_input_image / description
      Added value: +"Second base64 input image for styles that use one (e.g. the second texture in rd_tile__tileset_advanced)."
    • addedInput schema / properties / extra_prompt / description
      Added value: +"Secondary prompt for styles that use one (e.g. the transition texture in advanced tilesets)."
    • addedInput schema / properties / frames_duration / description
      Added value: +"Animation frame count for animation styles: 4, 6, 8, 10, 12, or 16."
    • addedInput schema / properties / height / description
      Added value: +"Output height in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage."
    • addedInput schema / properties / include_downloadable_data / description
      Added value: +"Include extra structured assets when available (e.g. tileset atlas JSON, animation frame data)."
    • addedInput schema / properties / input_image / description
      Added value: +"Base64 PNG used as the main source image for edits, variations, tilesets, animations, or styles that require a starting frame. Raw base64 or a data URL."
    • addedInput schema / properties / input_palette / description
      Added value: +"Base64 image of a color palette; output colors are constrained to it."
    • addedInput schema / properties / num_images / description
      Added value: +"How many images to generate in one batch. Style-specific maximums apply."
    • addedInput schema / properties / prompt / description
      Added value: +"Describe the SUBJECT only (e.g. 'a knight resting by a campfire'). Never write 'pixel art' — the selected style handles all rendering."
    • addedInput schema / properties / prompt_style / description
      Added value: +"Style id from list_available_styles (e.g. 'rd_fast__default', 'rd_pro__isometric', or a custom 'user__...' style)."
    • addedInput schema / properties / rd_api_key / description
      Added value: +"RetroDiffusion API key (rdpk-...) for this call only; overrides session or header auth."
    • addedInput schema / properties / reference_images / description
      Added value: +"Extra per-inference guidance images (base64), only for styles where supports_reference_images is true. Not for defining custom styles."
    • addedInput schema / properties / return_non_bg_removed / description
      Added value: +"Also return the render from before background removal was applied."
    • addedInput schema / properties / return_pre_palette / description
      Added value: +"Also return the render from before palette constraints were applied."
    • addedInput schema / properties / return_spritesheet / description
      Added value: +"For animation styles: return a PNG sprite sheet instead of a GIF."
    • addedInput schema / properties / strength / description
      Added value: +"How strongly to change input_image, 0-1 (default 0.75). Lower values keep more of the original."
    • addedInput schema / properties / timeout_seconds / description
      Added value: +"Read-timeout override in seconds for this call; increase for animations or large batches."
    • addedInput schema / properties / upscale_output_factor / description
      Added value: +"Integer upscale factor for the output image; 1 returns the native pixel size."
    • addedInput schema / properties / width / description
      Added value: +"Output width in pixels. Each style enforces its own limits; check list_available_styles or get_style_usage."
  4. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description adds the concrete mechanism (check_cost=true against the public endpoint), implying no credits are consumed and no job is created, which is useful context beyond the annotations. It stops short of saying whether a cost value or an error is returned when the estimate fails.

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?

It is short and front-loaded, leading with the action and the endpoint before secondary notes. The second paragraph is somewhat tangential and includes the off-schema parameter reference, but there is no padding or repetition.

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

Completeness3/5

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

With an output schema present, return values need no explanation, and all 20 parameters are documented in the schema. However, for a cost-estimation tool the description never confirms that the call is free/no-credit (only the title and annotations imply it) and gives no guidance on which sibling estimator to use, leaving coverage adequate but not complete.

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 20 parameters are already fully documented and a baseline of 3 applies. The description adds a little routing logic for input_image vs reference_images vs style_reference_images, but mentions style_reference_images, which is not present in this input schema, creating mild confusion rather than extra clarity.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Estimate generation cost') and names the mechanism ('the public /v2/inferences endpoint with check_cost=true'). It is clear on its own, but never distinguishes itself from the sibling estimate_edit_tool_cost or from create_inference, which an agent may be choosing between.

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

Usage Guidelines2/5

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

There is no statement of when to reach for this tool versus create_inference (the paid generation) or estimate_edit_tool_cost. The three usage hints present ('use input_image for...', 'style_reference_images only on create_user_style/update_user_style') are parameter-level guidance, not tool-selection guidance, and one of them references a parameter that does not appear in this schema.

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