Estimate cost
estimate_pricingCalculate 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 endpointUseful 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 endpointUseful 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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "estimate_pricing"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | Exact private account key profile label, not an authenticated provider owner ID. | |
| payload | No | Complete native JSON body, mutually exclusive with flat body flags and payload_file. Use schema for union bodies. | |
| payload_file | No | Absolute regular non-symlink private JSON file, at most 1 MiB. Cannot mix with other body inputs. |