Skip to main content
Glama

Estimate cost

estimate_pricing
Read-onlyIdempotent

Calculate fal.ai API costs before running batch operations using historical call pricing or unit price per image/video. Helps with budget planning and cost optimization.

Instructions

Computes cost estimates using one of two methods:

1. Historical API Price (historical_api_price):

  • Based on historical pricing per API call from past usage patterns

  • Takes call_quantity (number of API calls) per endpoint

  • Useful for estimating based on actual historical usage patterns

  • Example: "How much will 100 calls to flux/dev cost?"

2. Unit Price (unit_price):

  • Based on unit price × expected billing units from pricing service

  • Takes unit_quantity (number of billing units like images/videos) per endpoint

  • Useful when you know the expected output quantity

  • Example: "How much will 50 images from flux/dev cost?"

Authentication: Required. Users must provide a valid API key. Custom pricing or discounts may be applied based on account status.

Common Use Cases:

  • Pre-calculate costs for batch operations

  • Display cost estimates in user interfaces

  • Budget planning and cost optimization

See fal.ai pricing for more details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoExact private account key profile label, not an authenticated provider owner ID.
payloadNoComplete native JSON body, mutually exclusive with flat body flags and payload_file. Use schema for union bodies.
payload_fileNoAbsolute regular non-symlink private JSON file, at most 1 MiB. Cannot mix with other body inputs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Adds auth requirement (valid API key) and notes custom pricing/discounts may apply - useful context beyond the readOnly/idempotent/destructive annotations. Doesn't describe response format or rate limits, but annotations already establish the safe read-only profile.

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?

Well-structured with bold headers and bullet lists making the two methods scannable. Slightly verbose with redundant examples, but front-loaded and organized.

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?

For a 3-param tool with 100% schema coverage and no output schema, the description covers purpose, both methods, examples, auth, and use cases. Could mention response shape, but not a major gap given annotation coverage.

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 explains the semantic distinction between call_quantity and unit_quantity, adding real value, but this is largely mirrored in the schema descriptions themselves - baseline 3.

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?

Specific verb (computes cost estimates) plus the two distinct resource/method variants (historical_api_price, unit_price) are named and exemplified. An agent can clearly distinguish this from siblings like get_pricing or get_usage.

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?

Explicitly states when to use each method with concrete examples ('How much will 100 calls...' vs 'How much will 50 images...'). Also names common use cases (batch pre-calc, UI display, budget planning), giving clear context for tool selection.

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