Skip to main content
Glama

Estimate cost

estimate_pricing
Read-onlyIdempotent

Calculate fal.ai API call or output-unit costs before running batches. Use historical call pricing or per-unit pricing to plan budgets and show cost estimates.

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

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds genuine context beyond them: authentication is required, and custom pricing or discounts may apply based on account status.

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?

The purpose is front-loaded in the first line, and the header/bullet structure maps cleanly onto the union schema. Some bullets are redundant with the schema descriptions, but the size is defensible for a tool with two mutually exclusive call shapes.

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?

Auth requirements, method selection, and use cases are all covered, which is what an agent needs to invoke it. With no output schema, the description should ideally say what an estimate returns (cost, currency, per-endpoint breakdown), and that return-shape gap is the main omission.

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 baseline is 3. The two-method framing and the worked examples ('100 calls to flux/dev', '50 images from flux/dev') clarify how call_quantity and unit_quantity differ, but the text largely restates the union schema's own descriptions and says nothing about the `account` parameter or the payload/payload_file exclusivity.

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 names a specific verb+resource ('computes cost estimates') and breaks the operation into two concrete methods with examples. It does not, however, differentiate itself from closely related siblings such as get_pricing, get_billing_events, or get_analytics, so an agent must infer which pricing tool to reach for.

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?

It gives clear when-to-use guidance for each of the two methods (historical usage patterns vs known output quantity) plus common use cases and the authentication prerequisite. It stops short of any exclusion or routing advice relative to sibling pricing/usage tools.

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